Skip to content

Commit 802425f

Browse files
gitgjoghxhaihao
authored andcommitted
vaapi: support VAProfileH264High10 decoding
see intel/libva#664 Signed-off-by: jianfeng.zheng <[email protected]>
1 parent a3f4916 commit 802425f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

libavcodec/h264_slice.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
809809
*fmt++ = AV_PIX_FMT_YUV444P10;
810810
} else if (CHROMA422(h))
811811
*fmt++ = AV_PIX_FMT_YUV422P10;
812-
else
812+
else {
813+
#if CONFIG_H264_VAAPI_HWACCEL
814+
// Just add as candidate. Whether VAProfileH264High10 usable or
815+
// not is decided by vaapi_decode_make_config() defined in FFmpeg
816+
// and vaQueryCodingProfile() defined in libva.
817+
*fmt++ = AV_PIX_FMT_VAAPI;
818+
#endif
813819
*fmt++ = AV_PIX_FMT_YUV420P10;
820+
}
814821
break;
815822
case 12:
816823
if (CHROMA444(h)) {

libavcodec/vaapi_decode.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ static const struct {
398398
MAP(MPEG4, MPEG4_ADVANCED_SIMPLE,
399399
MPEG4AdvancedSimple),
400400
MAP(MPEG4, MPEG4_MAIN, MPEG4Main ),
401+
#if VA_CHECK_VERSION(1, 18, 0)
402+
MAP(H264, H264_HIGH_10_INTRA,
403+
H264High10 ),
404+
MAP(H264, H264_HIGH_10, H264High10 ),
405+
#endif
401406
MAP(H264, H264_CONSTRAINED_BASELINE,
402407
H264ConstrainedBaseline),
403408
MAP(H264, H264_MAIN, H264Main ),

0 commit comments

Comments
 (0)