History

avfilter/vf_grayworld: Remove empty options and AVClass

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.

Andreas Rheinhardt committed 5 years ago

Commit 8d3fdb41 parent de288e41 file · +0 −11Browse files

Unified · Split

libavfilter/vf_grayworld.c+0−11
@@ -27,7 +27,6 @@ · 26 unmodified lines
2727
2828 #include "libavutil/imgutils.h"
2929 #include "libavutil/mem.h"
30−#include "libavutil/opt.h"
3130
3231 #include "avfilter.h"
3332 #include "internal.h"
@@ -41,20 +40,11 @@ typedef struct ThreadData { · 7 unmodified lines
4140 } ThreadData;
4241
4342 typedef struct GrayWorldContext {
44− const AVClass *class;
4543 float *tmpplab;
4644 int *line_count_pels;
4745 float *line_sum;
4846 } GrayWorldContext;
4947
50−#define OFFSET(x) offsetof(GrayWorldContext, x)
51−#define FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
52−static const AVOption grayworld_options[] = {
53− { NULL }
54−};
55−
56−AVFILTER_DEFINE_CLASS(grayworld);
57−
5848 static void apply_matrix(const float matrix[3][3], const float input[3], float output[3])
5949 {
6050 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 = { · 250 unmodified lines
311301 .name = "grayworld",
312302 .description = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray world algorithm"),
313303 .priv_size = sizeof(GrayWorldContext),
314− .priv_class = &grayworld_class,
315304 FILTER_INPUTS(grayworld_inputs),
316305 FILTER_OUTPUTS(ff_video_default_filterpad),
317306 FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32),

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