Unified · Split
| @@ -56,8 +56,6 @@ typedef struct ChromaNRContext { · 55 unmodified lines | |||
| 56 | int (*filter_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); | 56 | int (*filter_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); |
| 57 | } ChromaNRContext; | 57 | } ChromaNRContext; |
| 58 | 58 | ||
| 59 | static int query_formats(AVFilterContext *ctx) | ||
| 60 | { | ||
| 61 | static const enum AVPixelFormat pix_fmts[] = { | 59 | static const enum AVPixelFormat pix_fmts[] = { |
| 62 | AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV444P, | 60 | AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV444P, |
| 63 | AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P, | 61 | AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P, |
| @@ -74,9 +72,6 @@ static int query_formats(AVFilterContext *ctx) · 10 unmodified lines | |||
| 74 | AV_PIX_FMT_NONE | 72 | AV_PIX_FMT_NONE |
| 75 | }; | 73 | }; |
| 76 | 74 | ||
| 77 | return ff_set_common_formats_from_list(ctx, pix_fmts); | ||
| 78 | } | ||
| 79 | |||
| 80 | #define SQR(x) ((x)*(x)) | 75 | #define SQR(x) ((x)*(x)) |
| 81 | 76 | ||
| 82 | #define FILTER_FUNC(distance, name, ctype, type, fun) \ | 77 | #define FILTER_FUNC(distance, name, ctype, type, fun) \ |
| @@ -282,7 +277,7 @@ const AVFilter ff_vf_chromanr = { · 199 unmodified lines | |||
| 282 | .priv_class = &chromanr_class, | 277 | .priv_class = &chromanr_class, |
| 283 | FILTER_OUTPUTS(outputs), | 278 | FILTER_OUTPUTS(outputs), |
| 284 | FILTER_INPUTS(inputs), | 279 | FILTER_INPUTS(inputs), |
| 285 | FILTER_QUERY_FUNC(query_formats), | 280 | FILTER_PIXFMTS_ARRAY(pix_fmts), |
| 286 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, | 281 | .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, |
| 287 | .process_command = ff_filter_process_command, | 282 | .process_command = ff_filter_process_command, |
| 288 | }; | 283 | }; |