diff mbox series

[FFmpeg-devel,3/5] lavc/qsvenc: add VP9 profiles

Message ID 20211213065038.26898-3-haihao.xiang@intel.com
State Accepted
Commit 2544f709ba8ae2b4929183ddf37f3e3acc6cac5a
Headers show
Series [FFmpeg-devel,1/5] lavc/qsvenc: remove VC1 profiles | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Xiang, Haihao Dec. 13, 2021, 6:50 a.m. UTC
---
 libavcodec/qsvenc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 7dab8bab0f..a2a8a79189 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -76,6 +76,15 @@  static const struct profile_names hevc_profiles[] = {
 #endif
 };
 
+static const struct profile_names vp9_profiles[] = {
+#if QSV_VERSION_ATLEAST(1, 19)
+    { MFX_PROFILE_VP9_0,                        "0"                     },
+    { MFX_PROFILE_VP9_1,                        "1"                     },
+    { MFX_PROFILE_VP9_2,                        "2"                     },
+    { MFX_PROFILE_VP9_3,                        "3"                     },
+#endif
+};
+
 static const char *print_profile(enum AVCodecID codec_id, mfxU16 profile)
 {
     const struct profile_names *profiles;
@@ -97,6 +106,11 @@  static const char *print_profile(enum AVCodecID codec_id, mfxU16 profile)
         num_profiles = FF_ARRAY_ELEMS(hevc_profiles);
         break;
 
+    case AV_CODEC_ID_VP9:
+        profiles = vp9_profiles;
+        num_profiles = FF_ARRAY_ELEMS(vp9_profiles);
+        break;
+
     default:
         return "unknown";
     }