int size;
int mode;
+ int bypass;
int eof;
int depth;
{ "cm", "cubic mean", 0, AV_OPT_TYPE_CONST, {.i64=CUBIC_MEAN}, 0, 0, FLAGS, "mode" },
{ "pm", "power mean", 0, AV_OPT_TYPE_CONST, {.i64=POWER_MEAN}, 0, 0, FLAGS, "mode" },
{ "median", "median", 0, AV_OPT_TYPE_CONST, {.i64=MEDIAN}, 0, 0, FLAGS, "mode" },
+ { "bypass", "leave frames unchanged", OFFSET(bypass), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ NULL }
};
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pixel_fmts[] = {
- AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10,
+ AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
}
s->get_factor(ctx, &f);
- s->deflicker(ctx, in->data[0], in->linesize[0], out->data[0], out->linesize[0],
- outlink->w, outlink->h, f);
- for (y = 1; y < s->nb_planes; y++) {
+ if (!s->bypass)
+ s->deflicker(ctx, in->data[0], in->linesize[0], out->data[0], out->linesize[0],
+ outlink->w, outlink->h, f);
+ for (y = 1 - s->bypass; y < s->nb_planes; y++) {
av_image_copy_plane(out->data[y], out->linesize[y],
in->data[y], in->linesize[y],
s->planewidth[y] * (1 + (s->depth > 8)), s->planeheight[y]);
}
av_frame_copy_props(out, in);
- metadata = avpriv_frame_get_metadatap(out);
+ metadata = &out->metadata;
if (metadata) {
uint8_t value[128];