Skip to content

Commit

Permalink
lavc/qsvenc: add VP9 profiles
Browse files Browse the repository at this point in the history
Signed-off-by: Zhong Li <[email protected]>
  • Loading branch information
xhaihao authored and lizhong1008 committed Dec 19, 2021
1 parent 50c38e1 commit 2544f70
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libavcodec/qsvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
}
Expand Down

0 comments on commit 2544f70

Please sign in to comment.