Fix HE-AAC SBR ignored high-freq data

Change-Id: I12d284477f07349368e714ba52cbb2a47b024554
(cherry picked from commit a889574e60a02bbc647d3b078d2727cb48d82e5a)
This commit is contained in:
Jean-Michel Trivi 2013-04-18 10:59:16 -07:00
parent dd68dcdb75
commit 8bd0baee9e
4 changed files with 13 additions and 2 deletions

View File

@ -110,6 +110,8 @@ const UCHAR FDK_sbrDecoder_sbr_start_freq_32[16] = {10, 12, 14, 15, 16, 17, 18,
const UCHAR FDK_sbrDecoder_sbr_start_freq_40[16] = {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 28, 30, 32};
const UCHAR FDK_sbrDecoder_sbr_start_freq_44[16] = { 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 28, 32};
const UCHAR FDK_sbrDecoder_sbr_start_freq_48[16] = { 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 27, 31};
const UCHAR FDK_sbrDecoder_sbr_start_freq_64[16] = { 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 23, 26, 30};
const UCHAR FDK_sbrDecoder_sbr_start_freq_88[16] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 23, 27, 31};
//@}

View File

@ -106,6 +106,8 @@ extern const UCHAR FDK_sbrDecoder_sbr_start_freq_32[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_40[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_44[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_48[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_64[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_88[16];
/*
Low-Power-Profile Transposer

View File

@ -124,6 +124,13 @@ getStartBand(UINT fs, /*!< Output sampling frequency */
fsMapped = fs;
switch (fsMapped) {
case 96000:
case 88200:
band = FDK_sbrDecoder_sbr_start_freq_88[startFreq];
break;
case 64000:
band = FDK_sbrDecoder_sbr_start_freq_64[startFreq];
break;
case 48000:
band = FDK_sbrDecoder_sbr_start_freq_48[startFreq];
break;

View File

@ -217,14 +217,14 @@ SBR_ERROR sbrDecoder_ResetElement (
/* Check in/out samplerates */
if ( sampleRateIn < 6400
|| sampleRateIn > 24000
|| sampleRateIn > 48000
)
{
sbrError = SBRDEC_UNSUPPORTED_CONFIG;
goto bail;
}
if ( sampleRateOut > 48000 )
if ( sampleRateOut > 96000 )
{
sbrError = SBRDEC_UNSUPPORTED_CONFIG;
goto bail;