diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2016-04-05 17:43:33 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-05 17:43:33 +0000 |
commit | 65750eae6583754ea9d84fed41dc12d1fc3d73d0 (patch) | |
tree | a8dc54ef8dba931c72627e7bbebf1844b81a31f7 /libAACenc/src/qc_main.cpp | |
parent | 0713b4acff1a489e7d49725dc7c5e3dad370b5c8 (diff) | |
parent | e1c78ed73faa51f2c7fcb0c4a17a92be9cc747f5 (diff) | |
download | fdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.tar.gz fdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.tar.bz2 fdk-aac-65750eae6583754ea9d84fed41dc12d1fc3d73d0.zip |
SBR/AAC encoder updates, code clean up
am: e1c78ed
* commit 'e1c78ed73faa51f2c7fcb0c4a17a92be9cc747f5':
SBR/AAC encoder updates, code clean up
Change-Id: I908adc47823de593c3e258c67f360da9321780f5
Diffstat (limited to 'libAACenc/src/qc_main.cpp')
-rw-r--r-- | libAACenc/src/qc_main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libAACenc/src/qc_main.cpp b/libAACenc/src/qc_main.cpp index 278bcb2..7503309 100644 --- a/libAACenc/src/qc_main.cpp +++ b/libAACenc/src/qc_main.cpp @@ -1248,6 +1248,8 @@ AAC_ENCODER_ERROR FDKaacEnc_updateFillBits(CHANNEL_MAPPING* cm, case QCDATA_BR_MODE_VBR_4: case QCDATA_BR_MODE_VBR_5: qcOut[0]->totFillBits = (qcOut[0]->grantedDynBits - qcOut[0]->usedDynBits)&7; /* precalculate alignment bits */ + qcOut[0]->totalBits = qcOut[0]->staticBits + qcOut[0]->usedDynBits + qcOut[0]->totFillBits + qcOut[0]->elementExtBits + qcOut[0]->globalExtBits; + qcOut[0]->totFillBits += ( fixMax(0, qcKernel->minBitsPerFrame - qcOut[0]->totalBits) + 7) & ~7; break; case QCDATA_BR_MODE_CBR: @@ -1257,6 +1259,8 @@ AAC_ENCODER_ERROR FDKaacEnc_updateFillBits(CHANNEL_MAPPING* cm, /* processing fill-bits */ INT deltaBitRes = qcOut[0]->grantedDynBits - qcOut[0]->usedDynBits ; qcOut[0]->totFillBits = fixMax((deltaBitRes&7), (deltaBitRes - (fixMax(0,bitResSpace-7)&~7))); + qcOut[0]->totalBits = qcOut[0]->staticBits + qcOut[0]->usedDynBits + qcOut[0]->totFillBits + qcOut[0]->elementExtBits + qcOut[0]->globalExtBits; + qcOut[0]->totFillBits += ( fixMax(0, qcKernel->minBitsPerFrame - qcOut[0]->totalBits) + 7) & ~7; break; } /* switch (qcKernel->bitrateMode) */ |