History

avfilter/vf_chromakey: Deduplicate inputs and outputs

Andreas Rheinhardt committed 3 years ago

Commit e557d891 parent 2e2c2811 file · +6 −24Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_chromakey.c+6−24
@@ -323,7 +323,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar · 322 unmodified lines
323323 return config_output(ctx->outputs[0]);
324324 }
325325
326−static const AVFilterPad chromakey_inputs[] = {
326+static const AVFilterPad inputs[] = {
327327 {
328328 .name = "default",
329329 .type = AVMEDIA_TYPE_VIDEO,
@@ -333,7 +333,7 @@ static const AVFilterPad chromakey_inputs[] = { · 3 unmodified lines
333333 },
334334 };
335335
336−static const AVFilterPad chromakey_outputs[] = {
336+static const AVFilterPad outputs[] = {
337337 {
338338 .name = "default",
339339 .type = AVMEDIA_TYPE_VIDEO,
@@ -370,8 +370,8 @@ const AVFilter ff_vf_chromakey = { · 30 unmodified lines
370370 .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on YUV colors."),
371371 .priv_size = sizeof(ChromakeyContext),
372372 .priv_class = &chromakey_class,
373− FILTER_INPUTS(chromakey_inputs),
374− FILTER_OUTPUTS(chromakey_outputs),
373+ FILTER_INPUTS(inputs),
374+ FILTER_OUTPUTS(outputs),
375375 FILTER_PIXFMTS_ARRAY(chromakey_fmts),
376376 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
377377 .process_command = process_command,
@@ -385,24 +385,6 @@ static const AVOption chromahold_options[] = { · 7 unmodified lines
385385 { NULL }
386386 };
387387
388−static const AVFilterPad chromahold_inputs[] = {
389− {
390− .name = "default",
391− .type = AVMEDIA_TYPE_VIDEO,
392− .flags = AVFILTERPAD_FLAG_NEEDS_WRITABLE,
393− .filter_frame = filter_frame,
394− .config_props = config_input,
395− },
396−};
397−
398−static const AVFilterPad chromahold_outputs[] = {
399− {
400− .name = "default",
401− .type = AVMEDIA_TYPE_VIDEO,
402− .config_props = config_output,
403− },
404−};
405−
406388 static const enum AVPixelFormat hold_pixel_fmts[] = {
407389 AV_PIX_FMT_YUV420P,
408390 AV_PIX_FMT_YUV422P,
@@ -429,8 +411,8 @@ const AVFilter ff_vf_chromahold = { · 20 unmodified lines
429411 .description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray."),
430412 .priv_size = sizeof(ChromakeyContext),
431413 .priv_class = &chromahold_class,
432− FILTER_INPUTS(chromahold_inputs),
433− FILTER_OUTPUTS(chromahold_outputs),
414+ FILTER_INPUTS(inputs),
415+ FILTER_OUTPUTS(outputs),
434416 FILTER_PIXFMTS_ARRAY(hold_pixel_fmts),
435417 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
436418 .process_command = process_command,

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