summaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/sbrdec_drc.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-08-27 16:20:46 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2013-08-27 16:20:46 -0700
commitb9774f90651be61065ae40171fc321f6ced60e49 (patch)
tree77fe672840459d261fd7abeb08c001c85a9d4ddf /libSBRdec/src/sbrdec_drc.cpp
parent2ddc922da87bb675b8ab8c305566436e806df0d9 (diff)
downloadODR-AudioEnc-b9774f90651be61065ae40171fc321f6ced60e49.tar.gz
ODR-AudioEnc-b9774f90651be61065ae40171fc321f6ced60e49.tar.bz2
ODR-AudioEnc-b9774f90651be61065ae40171fc321f6ced60e49.zip
Decode dynamic range control improvements
* AAC-Decoder - Only set the program reference level if it has changed compared to the previous value. This allows setting it on a frame-by-frame basis without limitations. Modified file(s): libAACdec/src/aacdec_drc.cpp libAACdec/src/aacdec_drc.h - Add expiry counter for the program reference level. Modified file(s): libAACdec/src/aacdec_drc.cpp libAACdec/src/aacdec_drc_types.h - Disable scaling of light compression gain values when heavy compression mode is enabled to have the full light compression as fallback if no heavy values are available. Modified file(s): libAACdec/src/aacdec_drc.cpp libAACdec/src/aacdecoder_lib.cpp libAACdec/src/aacdec_drc_types.h - Change initialization and channel disabling to improve start-up behavior in SBR decoder. Modified file(s): libSBRdec/src/sbrdecoder.cpp libSBRdec/src/sbrdec_drc.cpp Bug 9428126 Change-Id: Ie1d3949c53910506da2547d32fe3bf6ee7606eb4
Diffstat (limited to 'libSBRdec/src/sbrdec_drc.cpp')
-rw-r--r--libSBRdec/src/sbrdec_drc.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libSBRdec/src/sbrdec_drc.cpp b/libSBRdec/src/sbrdec_drc.cpp
index af71c41..a834c0b 100644
--- a/libSBRdec/src/sbrdec_drc.cpp
+++ b/libSBRdec/src/sbrdec_drc.cpp
@@ -127,8 +127,8 @@ void sbrDecoder_drcInitChannel (
hDrcData->currFact_exp = 1;
hDrcData->nextFact_exp = 1;
- hDrcData->numBandsCurr = 0;
- hDrcData->numBandsNext = 0;
+ hDrcData->numBandsCurr = 1;
+ hDrcData->numBandsNext = 1;
hDrcData->winSequenceCurr = 0;
hDrcData->winSequenceNext = 0;
@@ -490,9 +490,7 @@ void sbrDecoder_drcApply (
if (hDrcData == NULL) {
return;
}
- if ( (hDrcData->enable == 0)
- || ((hDrcData->numBandsCurr == 0) && (hDrcData->numBandsNext == 0))
- ) {
+ if (hDrcData->enable == 0) {
return; /* Avoid changing the scaleFactor even though the processing is disabled. */
}