Skip to content

Commit

Permalink
vaapi: support VAProfileH264High10 decoding
Browse files Browse the repository at this point in the history
see intel/libva#664

Signed-off-by: jianfeng.zheng <[email protected]>
  • Loading branch information
gitgjogh authored and xhaihao committed Apr 17, 2023
1 parent a3f4916 commit 802425f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libavcodec/h264_slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
5 changes: 5 additions & 0 deletions libavcodec/vaapi_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ static const struct {
MAP(MPEG4, MPEG4_ADVANCED_SIMPLE,
MPEG4AdvancedSimple),
MAP(MPEG4, MPEG4_MAIN, MPEG4Main ),
#if VA_CHECK_VERSION(1, 18, 0)
MAP(H264, H264_HIGH_10_INTRA,
H264High10 ),
MAP(H264, H264_HIGH_10, H264High10 ),
#endif
MAP(H264, H264_CONSTRAINED_BASELINE,
H264ConstrainedBaseline),
MAP(H264, H264_MAIN, H264Main ),
Expand Down

0 comments on commit 802425f

Please sign in to comment.