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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-28 00:42:44 +02:00
parent be8bc645b6
commit 4c0adcd07e
6 changed files with 4 additions and 14 deletions

View File

@ -404,7 +404,7 @@ const AVFilter ff_vf_avgblur_vulkan = {
.uninit = &avgblur_vulkan_uninit,
FILTER_INPUTS(avgblur_vulkan_inputs),
FILTER_OUTPUTS(avgblur_vulkan_outputs),
FILTER_QUERY_FUNC(&ff_vk_filter_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &avgblur_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};

View File

@ -339,7 +339,7 @@ const AVFilter ff_vf_chromaber_vulkan = {
.uninit = &chromaber_vulkan_uninit,
FILTER_INPUTS(chromaber_vulkan_inputs),
FILTER_OUTPUTS(chromaber_vulkan_outputs),
FILTER_QUERY_FUNC(&ff_vk_filter_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &chromaber_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};

View File

@ -482,7 +482,7 @@ const AVFilter ff_vf_overlay_vulkan = {
.activate = &overlay_vulkan_activate,
FILTER_INPUTS(overlay_vulkan_inputs),
FILTER_OUTPUTS(overlay_vulkan_outputs),
FILTER_QUERY_FUNC(&ff_vk_filter_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &overlay_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};

View File

@ -530,7 +530,7 @@ const AVFilter ff_vf_scale_vulkan = {
.uninit = &scale_vulkan_uninit,
FILTER_INPUTS(scale_vulkan_inputs),
FILTER_OUTPUTS(scale_vulkan_outputs),
FILTER_QUERY_FUNC(&ff_vk_filter_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN),
.priv_class = &scale_vulkan_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};

View File

@ -589,15 +589,6 @@ err:
return AVERROR(ENOMEM);
}
int ff_vk_filter_query_formats(AVFilterContext *avctx)
{
static const enum AVPixelFormat pixel_formats[] = {
AV_PIX_FMT_VULKAN, AV_PIX_FMT_NONE,
};
return ff_set_common_formats_from_list(avctx, pixel_formats);
}
static int vulkan_filter_set_device(AVFilterContext *avctx,
AVBufferRef *device)
{

View File

@ -197,7 +197,6 @@ extern const VkComponentMapping ff_comp_identity_map;
/**
* General lavfi IO functions
*/
int ff_vk_filter_query_formats (AVFilterContext *avctx);
int ff_vk_filter_init (AVFilterContext *avctx);
int ff_vk_filter_config_input (AVFilterLink *inlink);
int ff_vk_filter_config_output (AVFilterLink *outlink);