Unified · Split
| @@ -81,14 +81,6 @@ static const AVOption codecview_options[] = { · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | AVFILTER_DEFINE_CLASS(codecview); | 82 | AVFILTER_DEFINE_CLASS(codecview); |
| 83 | 83 | ||
| 84 | static 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 | |||
| 92 | static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx) | 84 | static 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 | }; |