1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi/vf_stack_{vaapi,qsv}: replace query_formats with a pixfmt list

This commit is contained in:
Anton Khirnov 2024-10-01 12:40:51 +02:00
parent 014a4214a9
commit 3824ee2faf
3 changed files with 11 additions and 21 deletions

View File

@ -350,7 +350,7 @@ static const AVFilterPad stack_outputs[] = {
.init = api##_stack_init, \
.uninit = api##_stack_uninit, \
.activate = stack_activate, \
FILTER_QUERY_FUNC(api##_stack_query_formats), \
FILTER_PIXFMTS_ARRAY(api ## _stack_pix_fmts), \
FILTER_OUTPUTS(stack_outputs), \
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | filter_flags, \

View File

@ -223,17 +223,12 @@ static av_cold void qsv_stack_uninit(AVFilterContext *ctx)
av_freep(&sctx->qsv_param.ext_buf);
}
static int qsv_stack_query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pixel_formats[] = {
AV_PIX_FMT_NV12,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE,
};
return ff_set_common_formats_from_list(ctx, pixel_formats);
}
static const enum AVPixelFormat qsv_stack_pix_fmts[] = {
AV_PIX_FMT_NV12,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE,
};
#include "stack_internal.c"

View File

@ -220,15 +220,10 @@ static av_cold void vaapi_stack_uninit(AVFilterContext *avctx)
av_freep(&sctx->rects);
}
static int vaapi_stack_query_formats(AVFilterContext *avctx)
{
static const enum AVPixelFormat pixel_formats[] = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
};
return ff_set_common_formats_from_list(avctx, pixel_formats);
}
static const enum AVPixelFormat vaapi_stack_pix_fmts[] = {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
};
#include "stack_internal.c"