diff mbox series

[FFmpeg-devel,32/38] avfilter/vf_grayworld: Remove empty options and AVClass

Message ID AM7PR03MB6660875488A744EF5545E3918FD89@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Sept. 12, 2021, 10:53 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(-)

Comments

Paul B Mahol Sept. 13, 2021, 11:53 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c
index fd424527e2..b6b39af677 100644
--- a/libavfilter/vf_grayworld.c
+++ b/libavfilter/vf_grayworld.c
@@ -26,7 +26,6 @@ 
   */
 
 #include "libavutil/imgutils.h"
-#include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
 
 #include "avfilter.h"
@@ -42,20 +41,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 int query_formats(AVFilterContext *ctx)
 {
     static const enum AVPixelFormat pix_fmts[] = {
@@ -328,7 +318,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,
     .query_formats = query_formats,
     FILTER_INPUTS(grayworld_inputs),
     FILTER_OUTPUTS(grayworld_outputs),