diff mbox series

[FFmpeg-devel,08/10] avfilter/vf_grayworld: Remove empty options and AVClass

Message ID GV1P250MB07374C72AF055F5EBC8E39DB8F382@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 8d3fdb42c03084f84101edad9f49cc3e01e1d2da
Headers show
Series [FFmpeg-devel,01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 31, 2024, 5:31 a.m. UTC
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_grayworld.c | 11 -----------
 1 file changed, 11 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c
index 61ed832253..0b6d673168 100644
--- a/libavfilter/vf_grayworld.c
+++ b/libavfilter/vf_grayworld.c
@@ -27,7 +27,6 @@ 
 
 #include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
-#include "libavutil/opt.h"
 
 #include "avfilter.h"
 #include "internal.h"
@@ -41,20 +40,11 @@  typedef struct ThreadData {
 } ThreadData;
 
 typedef struct GrayWorldContext {
-    const AVClass *class;
     float *tmpplab;
     int *line_count_pels;
     float *line_sum;
 } GrayWorldContext;
 
-#define OFFSET(x) offsetof(GrayWorldContext, x)
-#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
-static const AVOption grayworld_options[] = {
-    { NULL }
-};
-
-AVFILTER_DEFINE_CLASS(grayworld);
-
 static void apply_matrix(const float matrix[3][3], const float input[3], float output[3])
 {
     output[0] = matrix[0][0] * input[0] + matrix[0][1] * input[1] + matrix[0][2] * input[2];
@@ -311,7 +301,6 @@  const AVFilter ff_vf_grayworld = {
     .name          = "grayworld",
     .description   = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray world algorithm"),
     .priv_size     = sizeof(GrayWorldContext),
-    .priv_class    = &grayworld_class,
     FILTER_INPUTS(grayworld_inputs),
     FILTER_OUTPUTS(ff_video_default_filterpad),
     FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),