Unified · Split
| @@ -143,14 +143,6 @@ static void nppscale_uninit(AVFilterContext *ctx) · 142 unmodified lines | |||
| 143 | av_frame_free(&s->tmp_frame); | 143 | av_frame_free(&s->tmp_frame); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static int nppscale_query_formats(AVFilterContext *ctx) | ||
| 147 | { | ||
| 148 | static const enum AVPixelFormat pixel_formats[] = { | ||
| 149 | AV_PIX_FMT_CUDA, AV_PIX_FMT_NONE, | ||
| 150 | }; | ||
| 151 | return ff_set_common_formats_from_list(ctx, pixel_formats); | ||
| 152 | } | ||
| 153 | |||
| 154 | static int init_stage(NPPScaleStageContext *stage, AVBufferRef *device_ctx) | 146 | static int init_stage(NPPScaleStageContext *stage, AVBufferRef *device_ctx) |
| 155 | { | 147 | { |
| 156 | AVBufferRef *out_ref = NULL; | 148 | AVBufferRef *out_ref = NULL; |
| @@ -601,7 +593,7 @@ const AVFilter ff_vf_scale_npp = { · 444 unmodified lines | |||
| 601 | FILTER_INPUTS(nppscale_inputs), | 593 | FILTER_INPUTS(nppscale_inputs), |
| 602 | FILTER_OUTPUTS(nppscale_outputs), | 594 | FILTER_OUTPUTS(nppscale_outputs), |
| 603 | 595 | ||
| 604 | FILTER_QUERY_FUNC(nppscale_query_formats), | 596 | FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), |
| 605 | 597 | ||
| 606 | .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, | 598 | .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, |
| 607 | }; | 599 | }; |