... | ... |
@@ -85,14 +85,6 @@ AVFILTER_DEFINE_CLASS(histeq); |
85 | 85 |
static av_cold int init(AVFilterContext *ctx, const char *args) |
86 | 86 |
{ |
87 | 87 |
HisteqContext *histeq = ctx->priv; |
88 |
- const char *shorthand[] = { "strength", "intensity", "antibanding", NULL }; |
|
89 |
- int ret; |
|
90 |
- |
|
91 |
- histeq->class = &histeq_class; |
|
92 |
- av_opt_set_defaults(histeq); |
|
93 |
- |
|
94 |
- if ((ret = av_opt_set_from_string(histeq, args, shorthand, "=", ":")) < 0) |
|
95 |
- return ret; |
|
96 | 88 |
|
97 | 89 |
av_log(ctx, AV_LOG_VERBOSE, |
98 | 90 |
"strength:%0.3f intensity:%0.3f antibanding:%d\n", |
... | ... |
@@ -101,12 +93,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) |
101 | 101 |
return 0; |
102 | 102 |
} |
103 | 103 |
|
104 |
-static av_cold void uninit(AVFilterContext *ctx) |
|
105 |
-{ |
|
106 |
- HisteqContext *histeq = ctx->priv; |
|
107 |
- av_opt_free(histeq); |
|
108 |
-} |
|
109 |
- |
|
110 | 104 |
static int query_formats(AVFilterContext *ctx) |
111 | 105 |
{ |
112 | 106 |
static const enum PixelFormat pix_fmts[] = { |
... | ... |
@@ -283,15 +269,17 @@ static const AVFilterPad histeq_outputs[] = { |
283 | 283 |
{ NULL } |
284 | 284 |
}; |
285 | 285 |
|
286 |
+static const char *const shorthand[] = { "strength", "intensity", "antibanding", NULL }; |
|
287 |
+ |
|
286 | 288 |
AVFilter avfilter_vf_histeq = { |
287 | 289 |
.name = "histeq", |
288 | 290 |
.description = NULL_IF_CONFIG_SMALL("Apply global color histogram equalization."), |
289 | 291 |
.priv_size = sizeof(HisteqContext), |
290 | 292 |
.init = init, |
291 |
- .uninit = uninit, |
|
292 | 293 |
.query_formats = query_formats, |
293 | 294 |
|
294 | 295 |
.inputs = histeq_inputs, |
295 | 296 |
.outputs = histeq_outputs, |
296 | 297 |
.priv_class = &histeq_class, |
298 |
+ .shorthand = shorthand, |
|
297 | 299 |
}; |