diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-01-08 15:47:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-01-08 15:47:48 +0000 |
commit | 5d8224586cdab3e96647a2fa7243ec5110b2146a (patch) | |
tree | 3907998d7ca9d6c2d05884d11a266df6351434c8 /libAACenc/src/aacenc_lib.cpp | |
parent | b831187d3a47f3cbe5d0060f4f064621eb484efd (diff) | |
parent | e499f9485e9e310425bf483ebc03a97f8a5e9864 (diff) | |
download | fdk-aac-5d8224586cdab3e96647a2fa7243ec5110b2146a.tar.gz fdk-aac-5d8224586cdab3e96647a2fa7243ec5110b2146a.tar.bz2 fdk-aac-5d8224586cdab3e96647a2fa7243ec5110b2146a.zip |
Merge "Adjust VBR mode depending on given peak bitrate and fix crash recovery usage."
Diffstat (limited to 'libAACenc/src/aacenc_lib.cpp')
-rw-r--r-- | libAACenc/src/aacenc_lib.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index c3977f3..0ae329b 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -1028,6 +1028,13 @@ static AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder, case AACENC_BR_MODE_VBR_3: case AACENC_BR_MODE_VBR_4: case AACENC_BR_MODE_VBR_5: + /* Adjust bitrate mode in case given peak bitrate is lower than expected + * VBR bitrate. */ + if ((INT)config->userPeakBitrate != -1) { + hAacConfig->bitrateMode = FDKaacEnc_AdjustVBRBitrateMode( + hAacConfig->bitrateMode, config->userPeakBitrate, + hAacConfig->channelMode); + } /* Get bitrate in VBR configuration */ /* In VBR mode; SBR-modul depends on bitrate, core encoder on bitrateMode. */ |