diff options
author | Martin Storsjo <martin@martin.st> | 2012-11-01 11:08:03 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-11-01 11:08:03 +0200 |
commit | 54dfe1ec6972ca0d56dcb671448f84fea5e37e35 (patch) | |
tree | 5d26aa077f3aa32d3e5113546abc5a4219332640 /libSBRdec/src/sbr_dec.cpp | |
parent | fea3c1d0ffaf5975bb15462e11edf9c7a664890d (diff) | |
parent | 6ab36997af5d5acda4f21d33031f4e45c85f96b7 (diff) | |
download | ODR-AudioEnc-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.tar.gz ODR-AudioEnc-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.tar.bz2 ODR-AudioEnc-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.zip |
Merge remote-tracking branch 'aosp/jb-mr1-release' into master
Conflicts:
libAACenc/src/band_nrg.cpp
libAACenc/src/grp_data.cpp
libSBRenc/src/env_est.cpp
Diffstat (limited to 'libSBRdec/src/sbr_dec.cpp')
-rw-r--r-- | libSBRdec/src/sbr_dec.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libSBRdec/src/sbr_dec.cpp b/libSBRdec/src/sbr_dec.cpp index 208120c..bd3cd10 100644 --- a/libSBRdec/src/sbr_dec.cpp +++ b/libSBRdec/src/sbr_dec.cpp @@ -581,18 +581,20 @@ sbr_dec ( HANDLE_SBR_DEC hSbrDec, /*!< handle to Decoder channel */ outScalefactor += (SCAL_HEADROOM+1); /* psDiffScale! */ { - C_ALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, 2*(64)); + C_AALLOC_SCRATCH_START(pWorkBuffer, FIXP_DBL, 2*(64)); int maxShift = 0; - if (hSbrDec->sbrDrcChannel.prevFact_exp > maxShift) { - maxShift = hSbrDec->sbrDrcChannel.prevFact_exp; - } - if (hSbrDec->sbrDrcChannel.currFact_exp > maxShift) { - maxShift = hSbrDec->sbrDrcChannel.currFact_exp; - } - if (hSbrDec->sbrDrcChannel.nextFact_exp > maxShift) { - maxShift = hSbrDec->sbrDrcChannel.nextFact_exp; + if (hSbrDec->sbrDrcChannel.enable != 0) { + if (hSbrDec->sbrDrcChannel.prevFact_exp > maxShift) { + maxShift = hSbrDec->sbrDrcChannel.prevFact_exp; + } + if (hSbrDec->sbrDrcChannel.currFact_exp > maxShift) { + maxShift = hSbrDec->sbrDrcChannel.currFact_exp; + } + if (hSbrDec->sbrDrcChannel.nextFact_exp > maxShift) { + maxShift = hSbrDec->sbrDrcChannel.nextFact_exp; + } } /* copy DRC data to right channel (with PS both channels use the same DRC gains) */ @@ -682,7 +684,7 @@ sbr_dec ( HANDLE_SBR_DEC hSbrDec, /*!< handle to Decoder channel */ synQmf->lsb, synQmf->no_col ); - C_ALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, 2*(64)); + C_AALLOC_SCRATCH_END(pWorkBuffer, FIXP_DBL, 2*(64)); } } |