aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_xmedian.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-05 13:58:06 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-07 23:53:26 +0200
commit2e1b95283efb046b5ad5af22d57d3853dca18c7e (patch)
tree6246af81c2c746f32fc5f9992df54f11f8ca5449 /libavfilter/vf_xmedian.c
parentdb53ee915d220679f4193d322cde678a44580641 (diff)
downloadffmpeg-2e1b95283efb046b5ad5af22d57d3853dca18c7e.tar.gz
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_xmedian.c')
-rw-r--r--libavfilter/vf_xmedian.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c
index 334d4018a2..4e83b48843 100644
--- a/libavfilter/vf_xmedian.c
+++ b/libavfilter/vf_xmedian.c
@@ -60,6 +60,10 @@ typedef struct XMedianContext {
int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
} XMedianContext;
+#define OFFSET(x) offsetof(XMedianContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
+#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
+
static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_GRAY9,
@@ -361,10 +365,6 @@ static av_cold int xmedian_init(AVFilterContext *ctx)
return init(ctx);
}
-#define OFFSET(x) offsetof(XMedianContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
-#define TFLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
-
static const AVOption xmedian_options[] = {
{ "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags =TFLAGS },