aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libfdk-aacenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-02 14:57:41 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-07 00:39:02 +0200
commit8238bc0b5e3dba271217b1223a901b3f9713dc6e (patch)
tree2809c5b9d9b26042d584c92afeb76b059484c00f /libavcodec/libfdk-aacenc.c
parent0c6e5f321bf5c4054e8b98232692465b342b42b4 (diff)
downloadffmpeg-8238bc0b5e3dba271217b1223a901b3f9713dc6e.tar.gz
avcodec/defs: Add AV_PROFILE_* defines, deprecate FF_PROFILE_* defines
These defines are also used in other contexts than just AVCodecContext ones, e.g. in libavformat. Furthermore, given that these defines are public, the AV-prefix is the right one, so deprecate (and not just move) the FF-macros. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/libfdk-aacenc.c')
-rw-r--r--libavcodec/libfdk-aacenc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index e08c6a0c6c..d400ac2e7c 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -179,7 +179,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
AACENC_InfoStruct info = { 0 };
CHANNEL_MODE mode;
AACENC_ERROR err;
- int aot = FF_PROFILE_AAC_LOW + 1;
+ int aot = AV_PROFILE_AAC_LOW + 1;
int sce = 0, cpe = 0;
if ((err = aacEncOpen(&s->handle, 0, avctx->ch_layout.nb_channels)) != AACENC_OK) {
@@ -188,7 +188,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
goto error;
}
- if (avctx->profile != FF_PROFILE_UNKNOWN)
+ if (avctx->profile != AV_PROFILE_UNKNOWN)
aot = avctx->profile + 1;
if ((err = aacEncoder_SetParam(s->handle, AACENC_AOT, aot)) != AACENC_OK) {
@@ -197,7 +197,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
goto error;
}
- if (aot == FF_PROFILE_AAC_ELD + 1 && s->eld_sbr) {
+ if (aot == AV_PROFILE_AAC_ELD + 1 && s->eld_sbr) {
if ((err = aacEncoder_SetParam(s->handle, AACENC_SBR_MODE,
1)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to enable SBR for ELD: %s\n",
@@ -227,7 +227,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
case 2:
#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0
// (profile + 1) to map from profile range to AOT range
- if (aot == FF_PROFILE_AAC_ELD + 1 && s->eld_v2) {
+ if (aot == AV_PROFILE_AAC_ELD + 1 && s->eld_v2) {
if ((err = aacEncoder_SetParam(s->handle, AACENC_CHANNELMODE,
128)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to enable ELDv2: %s\n",
@@ -310,14 +310,14 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
}
} else {
if (avctx->bit_rate <= 0) {
- if (avctx->profile == FF_PROFILE_AAC_HE_V2) {
+ if (avctx->profile == AV_PROFILE_AAC_HE_V2) {
sce = 1;
cpe = 0;
}
avctx->bit_rate = (96*sce + 128*cpe) * avctx->sample_rate / 44;
- if (avctx->profile == FF_PROFILE_AAC_HE ||
- avctx->profile == FF_PROFILE_AAC_HE_V2 ||
- avctx->profile == FF_PROFILE_MPEG2_AAC_HE ||
+ if (avctx->profile == AV_PROFILE_AAC_HE ||
+ avctx->profile == AV_PROFILE_AAC_HE_V2 ||
+ avctx->profile == AV_PROFILE_MPEG2_AAC_HE ||
s->eld_sbr)
avctx->bit_rate /= 2;
}
@@ -544,12 +544,12 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
static const AVProfile profiles[] = {
- { FF_PROFILE_AAC_LOW, "LC" },
- { FF_PROFILE_AAC_HE, "HE-AAC" },
- { FF_PROFILE_AAC_HE_V2, "HE-AACv2" },
- { FF_PROFILE_AAC_LD, "LD" },
- { FF_PROFILE_AAC_ELD, "ELD" },
- { FF_PROFILE_UNKNOWN },
+ { AV_PROFILE_AAC_LOW, "LC" },
+ { AV_PROFILE_AAC_HE, "HE-AAC" },
+ { AV_PROFILE_AAC_HE_V2, "HE-AACv2" },
+ { AV_PROFILE_AAC_LD, "LD" },
+ { AV_PROFILE_AAC_ELD, "ELD" },
+ { AV_PROFILE_UNKNOWN },
};
static const FFCodecDefault aac_encode_defaults[] = {