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

pull/153/merge
Anton Khirnov 3 months ago
parent 014a4214a9
commit 3824ee2faf
  1. 2
      libavfilter/stack_internal.c
  2. 7
      libavfilter/vf_stack_qsv.c
  3. 7
      libavfilter/vf_stack_vaapi.c

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

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

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

Loading…
Cancel
Save