aboutsummaryrefslogtreecommitdiffstats
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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libSBRdec/src/sbr_dec.cpp b/libSBRdec/src/sbr_dec.cpp
index e5922f1..1282338 100644
--- a/libSBRdec/src/sbr_dec.cpp
+++ b/libSBRdec/src/sbr_dec.cpp
@@ -760,6 +760,8 @@ createSbrDec (SBR_CHANNEL * hSbrChannel,
*/
{
int qmfErr;
+ /* Adapted QMF analysis post-twiddles for down-sampled HQ SBR */
+ const UINT downSampledFlag = (downsampleFac==2) ? QMF_FLAG_DOWNSAMPLED : 0;
qmfErr = qmfInitAnalysisFilterBank (
&hs->AnalysiscQMF,
@@ -768,7 +770,7 @@ createSbrDec (SBR_CHANNEL * hSbrChannel,
hHeaderData->freqBandData.lowSubband,
hHeaderData->freqBandData.highSubband,
hHeaderData->numberOfAnalysisBands,
- qmfFlags & (~QMF_FLAG_KEEP_STATES)
+ (qmfFlags & (~QMF_FLAG_KEEP_STATES)) | downSampledFlag
);
if (qmfErr != 0) {
return SBRDEC_UNSUPPORTED_CONFIG;