summaryrefslogtreecommitdiffstats
path: root/libSBRenc/src/mh_det.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRenc/src/mh_det.cpp')
-rw-r--r--libSBRenc/src/mh_det.cpp51
1 files changed, 32 insertions, 19 deletions
diff --git a/libSBRenc/src/mh_det.cpp b/libSBRenc/src/mh_det.cpp
index 739dd74..73d1b8b 100644
--- a/libSBRenc/src/mh_det.cpp
+++ b/libSBRenc/src/mh_det.cpp
@@ -1244,25 +1244,38 @@ FDKsbrEnc_InitSbrMissingHarmonicsDetector (
FDK_ASSERT(totNoEst <= MAX_NO_OF_ESTIMATES);
- switch(frameSize){
- case 2048:
- hs->transientPosOffset = FRAME_MIDDLE_SLOT_2048;
- hs->timeSlots = NUMBER_TIME_SLOTS_2048;
- break;
- case 1920:
- hs->transientPosOffset = FRAME_MIDDLE_SLOT_1920;
- hs->timeSlots = NUMBER_TIME_SLOTS_1920;
- break;
- case 1024:
- hs->transientPosOffset = FRAME_MIDDLE_SLOT_512LD;
- hs->timeSlots = 16;
- break;
- case 960:
- hs->transientPosOffset = FRAME_MIDDLE_SLOT_512LD;
- hs->timeSlots = 15;
- break;
- default:
- return -1;
+ if (sbrSyntaxFlags & SBR_SYNTAX_LOW_DELAY)
+ {
+ switch(frameSize){
+ case 1024:
+ case 512:
+ hs->transientPosOffset = FRAME_MIDDLE_SLOT_512LD;
+ hs->timeSlots = 16;
+ break;
+ case 960:
+ case 480:
+ hs->transientPosOffset = FRAME_MIDDLE_SLOT_512LD;
+ hs->timeSlots = 15;
+ break;
+ default:
+ return -1;
+ }
+ } else
+ {
+ switch(frameSize){
+ case 2048:
+ case 1024:
+ hs->transientPosOffset = FRAME_MIDDLE_SLOT_2048;
+ hs->timeSlots = NUMBER_TIME_SLOTS_2048;
+ break;
+ case 1920:
+ case 960:
+ hs->transientPosOffset = FRAME_MIDDLE_SLOT_1920;
+ hs->timeSlots = NUMBER_TIME_SLOTS_1920;
+ break;
+ default:
+ return -1;
+ }
}
if (sbrSyntaxFlags & SBR_SYNTAX_LOW_DELAY) {