summaryrefslogtreecommitdiffstats
path: root/libSBRdec/src/sbr_dec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRdec/src/sbr_dec.cpp')
-rw-r--r--libSBRdec/src/sbr_dec.cpp22
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));
}
}