summaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libAACenc/src/aacenc.cpp')
-rw-r--r--libAACenc/src/aacenc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libAACenc/src/aacenc.cpp b/libAACenc/src/aacenc.cpp
index 28ba895..29e588f 100644
--- a/libAACenc/src/aacenc.cpp
+++ b/libAACenc/src/aacenc.cpp
@@ -558,6 +558,13 @@ AAC_ENCODER_ERROR FDKaacEnc_Initialize(HANDLE_AAC_ENC hAacEnc,
qcInit.channelMapping = &hAacEnc->channelMapping;
qcInit.sceCpe = 0;
+ if ((config->bitrateMode>=1) && (config->bitrateMode<=5)) {
+ qcInit.averageBits = (averageBitsPerFrame+7)&~7;
+ qcInit.bitRes = MIN_BUFSIZE_PER_EFF_CHAN*cm->nChannelsEff;
+ qcInit.maxBits = MIN_BUFSIZE_PER_EFF_CHAN*cm->nChannelsEff;
+ qcInit.minBits = 0;
+ }
+ else
{
int maxBitres;
qcInit.averageBits = (averageBitsPerFrame+7)&~7;