They are currently defined inside the #if CONFIG_XMEDIAN_FILTER block. Fixes standalone compilation of the tmedian filter. Broken in f58939affe39f39038cbdfc6b731b1c9caed3caf.
Unified · Split
| @@ -60,6 +60,10 @@ typedef struct XMedianContext { · 59 unmodified lines | ||
| 60 | 60 | int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); |
| 61 | 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 | + | |
| 63 | 67 | static const enum AVPixelFormat pixel_fmts[] = { |
| 64 | 68 | AV_PIX_FMT_GRAY8, |
| 65 | 69 | AV_PIX_FMT_GRAY9, |
| @@ -361,10 +365,6 @@ static av_cold int xmedian_init(AVFilterContext *ctx) · 295 unmodified lines | ||
| 361 | 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 | − | |
| 368 | 368 | static const AVOption xmedian_options[] = { |
| 369 | 369 | { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS }, |
| 370 | 370 | { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags =TFLAGS }, |