aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/qc_main.cpp
diff options
context:
space:
mode:
authorpiratfm <piratfm@gmail.com>2013-04-16 16:45:20 +0300
committerMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-14 17:42:35 +0100
commit83293a2bb69f96a5fa7f14cfdea45441c9cec0d9 (patch)
tree2c1430567d6ec3683e378999e3810b2a6504a4f0 /libAACenc/src/qc_main.cpp
parent4cd6dde61ee3115a1d4b5bec50996c8e708370fa (diff)
downloadODR-AudioEnc-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.tar.gz
ODR-AudioEnc-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.tar.bz2
ODR-AudioEnc-83293a2bb69f96a5fa7f14cfdea45441c9cec0d9.zip
AU alignment changed (last AU takes all possible space in superframe).
Now player works more stable.
Diffstat (limited to 'libAACenc/src/qc_main.cpp')
-rw-r--r--libAACenc/src/qc_main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libAACenc/src/qc_main.cpp b/libAACenc/src/qc_main.cpp
index e09769e..9866a3a 100644
--- a/libAACenc/src/qc_main.cpp
+++ b/libAACenc/src/qc_main.cpp
@@ -1378,7 +1378,7 @@ AAC_ENCODER_ERROR FDKaacEnc_FinalizeBitConsumption(CHANNEL_MAPPING *cm,
/* Get total consumed bits in AU */
qcOut->totalBits = qcOut->staticBits + qcOut->usedDynBits + qcOut->totFillBits +
qcOut->elementExtBits + qcOut->globalExtBits;
-
+#if 1
if (qcKernel->bitrateMode==QCDATA_BR_MODE_CBR) {
/* Now we can get the exact transport bit amount, and hopefully it is equal to the estimated value */
@@ -1420,7 +1420,7 @@ AAC_ENCODER_ERROR FDKaacEnc_FinalizeBitConsumption(CHANNEL_MAPPING *cm,
}
} /* MODE_CBR */
-
+#endif
/* Update exact number of consumed header bits. */
qcKernel->globHdrBits = transportEnc_GetStaticBits(hTpEnc, qcOut->totalBits);
@@ -1441,6 +1441,8 @@ AAC_ENCODER_ERROR FDKaacEnc_FinalizeBitConsumption(CHANNEL_MAPPING *cm,
aot,
epConfig );
+ //fprintf(stderr, "FinalizeBitConsumption(): totFillBits=%d, qcOut->totFillBits=%d \n", totFillBits, qcOut->totFillBits);
+
/* now distribute extra fillbits and alignbits */
alignBits = 7 - (qcOut->staticBits + qcOut->usedDynBits + qcOut->elementExtBits
+ qcOut->totFillBits + qcOut->globalExtBits -1)%8;