69 #define OFFSET(x) offsetof(DejudderContext, x)
70 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
73 {
"cycle",
"set the length of the cycle to use for dejuddering",
126 int64_t next_pts = frame->
pts;
136 if (next_pts < judbuff[s->
i2]) {
137 offset = next_pts + judbuff[s->
i3] - judbuff[s->
i4] - judbuff[s->
i1];
138 for (k = 0; k < s->
cycle + 2; k++)
139 judbuff[k] += offset;
142 + (s->
cycle + 1) * (next_pts - judbuff[s->
i4]);
145 judbuff[s->
i2] = next_pts;
153 for (k = 0; k < s->
cycle + 2; k++)
182 .priv_class = &dejudder_class,
183 .
inputs = dejudder_inputs,
This structure describes decoded (raw) audio or video data.
static const AVFilterPad outputs[]
Main libavfilter public API header.
static av_cold int init(AVCodecContext *avctx)
static AVRational av_make_q(int num, int den)
Create a rational.
static const AVFilterPad dejudder_inputs[]
static const AVFilterPad dejudder_outputs[]
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static av_cold int uninit(AVCodecContext *avctx)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
#define AV_LOG_VERBOSE
Detailed information.
A filter pad used for either input or output.
A link between two filters.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown; if left to 0/0, will be automatically be cop...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
void * priv
private data for use by the filter
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
static av_cold void dejudder_uninit(AVFilterContext *ctx)
static const uint8_t offset[127][2]
static int config_out_props(AVFilterLink *outlink)
AVFilterContext * src
source filter
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
static const AVOption dejudder_options[]
AVFilterContext * dst
dest filter
AVFILTER_DEFINE_CLASS(dejudder)
static void * av_mallocz_array(size_t nmemb, size_t size)
static av_cold int dejudder_init(AVFilterContext *ctx)
#define AV_NOPTS_VALUE
Undefined timestamp value.