1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec: rename the AV1 profiles

Use the proper names instead of numbers

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2018-03-29 13:02:56 -03:00
parent a2fc8dbae8
commit f6171471e6
2 changed files with 6 additions and 6 deletions

View File

@@ -2551,9 +2551,9 @@ typedef struct AVCodecContext {
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
#define FF_PROFILE_HEVC_REXT 4
#define FF_PROFILE_AV1_0 0
#define FF_PROFILE_AV1_1 1
#define FF_PROFILE_AV1_2 2
#define FF_PROFILE_AV1_MAIN 0
#define FF_PROFILE_AV1_HIGH 1
#define FF_PROFILE_AV1_PROFESSIONAL 2
/**
* level

View File

@@ -302,13 +302,13 @@ static av_cold int aom_init(AVCodecContext *avctx)
if (avctx->profile != FF_PROFILE_UNKNOWN)
enccfg.g_profile = avctx->profile;
else if (avctx->pix_fmt == AV_PIX_FMT_YUV420P)
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_0;
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_MAIN;
else {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
if (desc->comp[0].depth < 12)
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_1;
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_HIGH;
else
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_2;
avctx->profile = enccfg.g_profile = FF_PROFILE_AV1_PROFESSIONAL;
}