[FFmpeg-devel] [PATCH 2/5] lavu/hwcontext_vaapi: add vaapi_format_map for Y210/AYUV/Y410
Li, Zhong
zhong.li at intel.com
Thu Jun 27 18:41:01 EEST 2019
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Linjie Fu
> Sent: Friday, June 28, 2019 10:27 AM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Fu, Linjie <linjie.fu at intel.com>
> Subject: [FFmpeg-devel] [PATCH 2/5] lavu/hwcontext_vaapi: add
> vaapi_format_map for Y210/AYUV/Y410
>
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
> libavutil/hwcontext_vaapi.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index
> 4227c3c..6378d0e 100644
> --- a/libavutil/hwcontext_vaapi.c
> +++ b/libavutil/hwcontext_vaapi.c
> @@ -116,6 +116,14 @@ static const VAAPIFormatDescriptor
> vaapi_format_map[] = { #endif
> MAP(UYVY, YUV422, UYVY422, 0),
> MAP(YUY2, YUV422, YUYV422, 0),
> +#ifdef VA_FOURCC_Y210
> + MAP(Y210, YUV422_10,Y210LE, 0),
> +#endif
> +#define VA_RT_FORMAT_AYUV VA_FOURCC_AYUV
Probably you want to add "#ifdef VA_FOURCC_AYUV" too.
And would better to #undef VA_RT_FORMAT_AYUV here once map is done.
(If you want to get a longer life cycle, would better define it outside)
> + MAP(AYUV, AYUV, AYUV, 0),
> +#ifdef VA_FOURCC_Y410
> + MAP(Y410, YUV444_10,Y410LE, 0),
> +#endif
> MAP(411P, YUV411, YUV411P, 0),
> MAP(422V, YUV422, YUV440P, 0),
> MAP(444P, YUV444, YUV444P, 0),
> --
> 2.7.4
More information about the ffmpeg-devel
mailing list