summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorjianfeng.zheng <ggjogh@gmail.com>2023-03-31 19:54:06 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-04-17 15:11:22 +0800
commit1cd5a383d49f94b05699b234b0d3c98f2969b810 (patch)
treea46da859aea15b05a3eb21ddfabafa9412a88a4a /libavcodec/h264_slice.c
parentb9ba036680b4164f6e415a85877dfa659ae4dde1 (diff)
downloadffmpeg-1cd5a383d49f94b05699b234b0d3c98f2969b810.tar.gz
vaapi: support VAProfileH264High10 decoding
see https://github.com/intel/libva/pull/664 Signed-off-by: jianfeng.zheng <jianfeng.zheng@mthreads.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 7767e16cf1..d05b83a121 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -809,8 +809,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
*fmt++ = AV_PIX_FMT_YUV444P10;
} else if (CHROMA422(h))
*fmt++ = AV_PIX_FMT_YUV422P10;
- else
+ else {
+#if CONFIG_H264_VAAPI_HWACCEL
+ // Just add as candidate. Whether VAProfileH264High10 usable or
+ // not is decided by vaapi_decode_make_config() defined in FFmpeg
+ // and vaQueryCodingProfile() defined in libva.
+ *fmt++ = AV_PIX_FMT_VAAPI;
+#endif
*fmt++ = AV_PIX_FMT_YUV420P10;
+ }
break;
case 12:
if (CHROMA444(h)) {