Skip to content

Commit

Permalink
lavc/vaapi_hevc: Add support for Main Intra & Main 10 Intra
Browse files Browse the repository at this point in the history
Both Main Intra and Main 10 Intra are Rext, we may use Main and Main 10
instead for decoding. This patch fixes the error below:

[hevc @ 0x55a771b80a00] No support for codec hevc profile 4.
[hevc @ 0x55a771b80a00] Failed setup for format vaapi: hwaccel
initialisation returned error.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
  • Loading branch information
xhaihao committed Aug 14, 2024
1 parent 5ad28cb commit f06551c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libavcodec/vaapi_hevc.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,13 @@ VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx)
av_log(avctx, AV_LOG_VERBOSE, "HEVC profile %s is found.\n", profile->name);
}

#if VA_CHECK_VERSION(0, 37, 0)
if (!strcmp(profile->name, "Main Intra"))
return VAProfileHEVCMain;
else if (!strcmp(profile->name, "Main 10 Intra"))
return VAProfileHEVCMain10;
#endif

#if VA_CHECK_VERSION(1, 2, 0)
if (!strcmp(profile->name, "Main 12") ||
!strcmp(profile->name, "Main 12 Intra"))
Expand Down

0 comments on commit f06551c

Please sign in to comment.