diff mbox

[FFmpeg-devel,2/2] hwcontext_vaapi: add the fourcc of I420 format map.

Message ID 10a4fcbc-501a-227e-039d-302fb0090c5e@gmail.com
State Accepted
Commit 3db5961727d300ed048f1fae87e3e4fd339b8456
Headers show

Commit Message

Jun Zhao Nov. 20, 2017, 12:36 a.m. UTC
From f31e492201b7a8c59bdf7c266c2df016057897c4 Mon Sep 17 00:00:00 2001
From: Jun Zhao <jun.zhao@intel.com>
Date: Sat, 18 Nov 2017 11:57:41 +0800
Subject: [PATCH 2/2] hwcontext_vaapi: add the fourcc of I420 format map.

VA-API 2.0 have enable the I420, so enable this map.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
---
 libavutil/hwcontext_vaapi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Mark Thompson Nov. 20, 2017, 11:39 a.m. UTC | #1
On 20/11/17 00:36, Jun Zhao wrote:
> From f31e492201b7a8c59bdf7c266c2df016057897c4 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao@intel.com>
> Date: Sat, 18 Nov 2017 11:57:41 +0800
> Subject: [PATCH 2/2] hwcontext_vaapi: add the fourcc of I420 format map.
> 
> VA-API 2.0 have enable the I420, so enable this map.
> 
> Signed-off-by: Jun Zhao <jun.zhao@intel.com>
> ---
>  libavutil/hwcontext_vaapi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
> index f246639021..d536bc93a1 100644
> --- a/libavutil/hwcontext_vaapi.c
> +++ b/libavutil/hwcontext_vaapi.c
> @@ -101,7 +101,9 @@ static const struct {
>      MAP(NV12, YUV420,  NV12),
>      MAP(YV12, YUV420,  YUV420P), // With U/V planes swapped.
>      MAP(IYUV, YUV420,  YUV420P),
> -  //MAP(I420, YUV420,  YUV420P), // Not in libva but used by Intel driver.
> +#ifdef VA_FOURCC_I420
> +    MAP(I420, YUV420,  YUV420P),
> +#endif
>  #ifdef VA_FOURCC_YV16
>      MAP(YV16, YUV422,  YUV422P), // With U/V planes swapped.
>  #endif
> -- 
> 2.14.1
> 

Sure, will apply.

Should IYUV be removed for newer versions at the same time?

Thanks,

- Mark
diff mbox

Patch

diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index f246639021..d536bc93a1 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -101,7 +101,9 @@  static const struct {
     MAP(NV12, YUV420,  NV12),
     MAP(YV12, YUV420,  YUV420P), // With U/V planes swapped.
     MAP(IYUV, YUV420,  YUV420P),
-  //MAP(I420, YUV420,  YUV420P), // Not in libva but used by Intel driver.
+#ifdef VA_FOURCC_I420
+    MAP(I420, YUV420,  YUV420P),
+#endif
 #ifdef VA_FOURCC_YV16
     MAP(YV16, YUV422,  YUV422P), // With U/V planes swapped.
 #endif