[FFmpeg-devel,5/6] lavc/qsv: add pixfmt fourcc map for AYUV/Y210/Y410

Submitted by Linjie Fu on Sept. 10, 2019, 4:08 p.m.

Details

Message ID 1568131700-19883-1-git-send-email-linjie.fu@intel.com
State New
Headers show

Commit Message

Linjie Fu Sept. 10, 2019, 4:08 p.m.
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
---
 libavcodec/qsv.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 65ad070..adfe09a 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -218,6 +218,9 @@  enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc)
     case MFX_FOURCC_NV12: return AV_PIX_FMT_NV12;
     case MFX_FOURCC_P010: return AV_PIX_FMT_P010;
     case MFX_FOURCC_P8:   return AV_PIX_FMT_PAL8;
+    case MFX_FOURCC_Y210: return AV_PIX_FMT_Y210;
+    case MFX_FOURCC_AYUV: return AV_PIX_FMT_AYUV;
+    case MFX_FOURCC_Y410: return AV_PIX_FMT_Y410;
     }
     return AV_PIX_FMT_NONE;
 }
@@ -230,6 +233,18 @@  int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc)
     case AV_PIX_FMT_NV12:
         *fourcc = MFX_FOURCC_NV12;
         return AV_PIX_FMT_NV12;
+    case AV_PIX_FMT_YUV422P:
+        *fourcc = MFX_FOURCC_YUY2;
+        return AV_PIX_FMT_YUYV422;
+    case AV_PIX_FMT_YUV422P10:
+        *fourcc = MFX_FOURCC_Y210;
+        return AV_PIX_FMT_Y210;
+    case AV_PIX_FMT_YUV444P:
+        *fourcc = MFX_FOURCC_AYUV;
+        return AV_PIX_FMT_AYUV;
+    case AV_PIX_FMT_YUV444P10:
+        *fourcc = MFX_FOURCC_Y410;
+        return AV_PIX_FMT_Y410;
     case AV_PIX_FMT_YUV420P10:
     case AV_PIX_FMT_P010:
         *fourcc = MFX_FOURCC_P010;