History

avfilter/vf_codecview: Store format in filter, remove query function

Andreas Rheinhardt committed 5 years ago

Commit be263481 parent 4317cea1 file · +3 −9Browse files

Unified · Split

libavfilter/vf_codecview.c+3−9
@@ -81,14 +81,6 @@ static const AVOption codecview_options[] = { · 80 unmodified lines
81 81
82AVFILTER_DEFINE_CLASS(codecview);82AVFILTER_DEFINE_CLASS(codecview);
83 83
84static int query_formats(AVFilterContext *ctx)
85{
86 // TODO: we can probably add way more pixel formats without any other
87 // changes; anything with 8-bit luma in first plane should be working
88 static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE};
89 return ff_set_common_formats_from_list(ctx, pix_fmts);
90}
91
92static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)84static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
93{85{
94 if(*sx > *ex)86 if(*sx > *ex)
@@ -354,7 +346,9 @@ const AVFilter ff_vf_codecview = { · 259 unmodified lines
354 .priv_size = sizeof(CodecViewContext),346 .priv_size = sizeof(CodecViewContext),
355 FILTER_INPUTS(codecview_inputs),347 FILTER_INPUTS(codecview_inputs),
356 FILTER_OUTPUTS(codecview_outputs),348 FILTER_OUTPUTS(codecview_outputs),
357 FILTER_QUERY_FUNC(query_formats),349 // TODO: we can probably add way more pixel formats without any other
350 // changes; anything with 8-bit luma in first plane should be working
351 FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P),
358 .priv_class = &codecview_class,352 .priv_class = &codecview_class,
359 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,353 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
360};354};

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