History

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

Andreas Rheinhardt committed 5 years ago

Commit d7b72601 parent 6c735431 file · +1 −9Browse files

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

Unified · Split

libavfilter/vf_scale_npp.c+1−9
@@ -143,14 +143,6 @@ static void nppscale_uninit(AVFilterContext *ctx) · 142 unmodified lines
143143 av_frame_free(&s->tmp_frame);
144144 }
145145
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−
154146 static int init_stage(NPPScaleStageContext *stage, AVBufferRef *device_ctx)
155147 {
156148 AVBufferRef *out_ref = NULL;
@@ -601,7 +593,7 @@ const AVFilter ff_vf_scale_npp = { · 444 unmodified lines
601593 FILTER_INPUTS(nppscale_inputs),
602594 FILTER_OUTPUTS(nppscale_outputs),
603595
604− FILTER_QUERY_FUNC(nppscale_query_formats),
596+ FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA),
605597
606598 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
607599 };

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