History

avfilter/vf_xmedian: Define OFFSET, FLAGS macros unconditionally

They are currently defined inside the #if CONFIG_XMEDIAN_FILTER block. Fixes standalone compilation of the tmedian filter. Broken in f58939affe39f39038cbdfc6b731b1c9caed3caf.

Andreas Rheinhardt committed 2 years ago

Commit 2e1b9521 parent db53ee91 file · +4 −4Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_xmedian.c+4−4
@@ -60,6 +60,10 @@ typedef struct XMedianContext { · 59 unmodified lines
60 int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);60 int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
61} XMedianContext;61} XMedianContext;
62 62
63#define OFFSET(x) offsetof(XMedianContext, x)
64#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
65#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
66
63static const enum AVPixelFormat pixel_fmts[] = {67static const enum AVPixelFormat pixel_fmts[] = {
64 AV_PIX_FMT_GRAY8,68 AV_PIX_FMT_GRAY8,
65 AV_PIX_FMT_GRAY9,69 AV_PIX_FMT_GRAY9,
@@ -361,10 +365,6 @@ static av_cold int xmedian_init(AVFilterContext *ctx) · 295 unmodified lines
361 return init(ctx);365 return init(ctx);
362}366}
363 367
364#define OFFSET(x) offsetof(XMedianContext, x)
365#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
366#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
367
368static const AVOption xmedian_options[] = {368static const AVOption xmedian_options[] = {
369 { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS },369 { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS },
370 { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags =TFLAGS },370 { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags =TFLAGS },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t