diff options
author | Martin Storsjo <martin@martin.st> | 2013-11-01 10:46:40 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2013-11-01 10:46:40 +0200 |
commit | 321233ee92e138f44294c7bb9a375eadad9d24fa (patch) | |
tree | 1de928ad26325302f64c56603157f50095dcf2b1 /libSBRenc/src/mh_det.cpp | |
parent | fcb5f1b692cb8343de35e69f9084328c652cf690 (diff) | |
parent | fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff) | |
download | ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.gz ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.bz2 ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.zip |
Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts:
libAACenc/src/quantize.cpp
Diffstat (limited to 'libSBRenc/src/mh_det.cpp')
-rw-r--r-- | libSBRenc/src/mh_det.cpp | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/libSBRenc/src/mh_det.cpp b/libSBRenc/src/mh_det.cpp index a7fa208..73d1b8b 100644 --- a/libSBRenc/src/mh_det.cpp +++ b/libSBRenc/src/mh_det.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -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) { |