From 83293a2bb69f96a5fa7f14cfdea45441c9cec0d9 Mon Sep 17 00:00:00 2001 From: piratfm Date: Tue, 16 Apr 2013 16:45:20 +0300 Subject: AU alignment changed (last AU takes all possible space in superframe). Now player works more stable. --- libAACenc/src/qc_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libAACenc/src/qc_main.cpp') 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; -- cgit v1.2.3