You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT
Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
@@ -38,34 +38,6 @@ typedef struct OverlayVAAPIContext {
|
|||||||
float alpha;
|
float alpha;
|
||||||
} OverlayVAAPIContext;
|
} OverlayVAAPIContext;
|
||||||
|
|
||||||
static int overlay_vaapi_query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
enum {
|
|
||||||
MAIN = 0,
|
|
||||||
OVERLAY = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
|
||||||
AV_PIX_FMT_VAAPI,
|
|
||||||
AV_PIX_FMT_NONE
|
|
||||||
};
|
|
||||||
|
|
||||||
ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[MAIN]->outcfg.formats);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[OVERLAY]->outcfg.formats);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->outputs[0]->incfg.formats);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int overlay_vaapi_build_filter_params(AVFilterContext *avctx)
|
static int overlay_vaapi_build_filter_params(AVFilterContext *avctx)
|
||||||
{
|
{
|
||||||
VAAPIVPPContext *vpp_ctx = avctx->priv;
|
VAAPIVPPContext *vpp_ctx = avctx->priv;
|
||||||
@@ -418,6 +390,6 @@ const AVFilter ff_vf_overlay_vaapi = {
|
|||||||
.activate = &overlay_vaapi_activate,
|
.activate = &overlay_vaapi_activate,
|
||||||
FILTER_INPUTS(overlay_vaapi_inputs),
|
FILTER_INPUTS(overlay_vaapi_inputs),
|
||||||
FILTER_OUTPUTS(overlay_vaapi_outputs),
|
FILTER_OUTPUTS(overlay_vaapi_outputs),
|
||||||
FILTER_QUERY_FUNC(overlay_vaapi_query_formats),
|
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VAAPI),
|
||||||
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
|
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user