History

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

Andreas Rheinhardt committed 5 years ago

Commit 548cb8e1 parent d7b72601 file · +1 −10Browse files

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

Unified · Split

libavfilter/vf_scale_cuda.c+1−10
@@ -145,15 +145,6 @@ static av_cold void cudascale_uninit(AVFilterContext *ctx) · 144 unmodified lines
145145 av_frame_free(&s->tmp_frame);
146146 }
147147
148−static int cudascale_query_formats(AVFilterContext *ctx)
149−{
150− static const enum AVPixelFormat pixel_formats[] = {
151− AV_PIX_FMT_CUDA, AV_PIX_FMT_NONE,
152− };
153−
154− return ff_set_common_formats_from_list(ctx, pixel_formats);
155−}
156−
157148 static av_cold int init_hwframe_ctx(CUDAScaleContext *s, AVBufferRef *device_ctx, int width, int height)
158149 {
159150 AVBufferRef *out_ref = NULL;
@@ -648,7 +639,7 @@ const AVFilter ff_vf_scale_cuda = { · 488 unmodified lines
648639 FILTER_INPUTS(cudascale_inputs),
649640 FILTER_OUTPUTS(cudascale_outputs),
650641
651− FILTER_QUERY_FUNC(cudascale_query_formats),
642+ FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA),
652643
653644 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
654645 };

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