[FFmpeg-devel] [PATCH v2 13/22] lavfi/scale_qsv: add more input / output pixel formats

Linjie Fu linjie.justin.fu at gmail.com
Sun Jun 6 17:53:12 EEST 2021


On Mon, May 17, 2021 at 11:30 AM Haihao Xiang <haihao.xiang at intel.com> wrote:
>
> NV12 and P010 are added
>
> $ ffmpeg -init_hw_device qsv -c:v h264_qsv -i input.h264 -vf
> "scale_qsv=format=p010" -f null -
> ---
>  libavfilter/vf_vpp_qsv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> index bceee8c4df..29ba220665 100644
> --- a/libavfilter/vf_vpp_qsv.c
> +++ b/libavfilter/vf_vpp_qsv.c
> @@ -665,7 +665,10 @@ DEFINE_QSV_FILTER(vpp, vpp, "VPP");
>  static int qsvscale_query_formats(AVFilterContext *ctx)
>  {
>      static const enum AVPixelFormat pixel_formats[] = {
> -        AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
> +        AV_PIX_FMT_NV12,
> +        AV_PIX_FMT_P010,
> +        AV_PIX_FMT_QSV,
> +        AV_PIX_FMT_NONE,
>      };
>      AVFilterFormats *pix_fmts = ff_make_format_list(pixel_formats);
>

LGTM, also verified it works as expected, thx.

- Linjie


More information about the ffmpeg-devel mailing list