Commit 8bd0baee authored by Jean-Michel Trivi's avatar Jean-Michel Trivi

Fix HE-AAC SBR ignored high-freq data


Change-Id: I12d284477f07349368e714ba52cbb2a47b024554
(cherry picked from commit a889574e60a02bbc647d3b078d2727cb48d82e5a)
parent dd68dcdb
...@@ -110,6 +110,8 @@ const UCHAR FDK_sbrDecoder_sbr_start_freq_32[16] = {10, 12, 14, 15, 16, 17, 18, ...@@ -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_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_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_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};
//@} //@}
......
...@@ -106,6 +106,8 @@ extern const UCHAR FDK_sbrDecoder_sbr_start_freq_32[16]; ...@@ -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_40[16];
extern const UCHAR FDK_sbrDecoder_sbr_start_freq_44[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_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 Low-Power-Profile Transposer
......
...@@ -124,6 +124,13 @@ getStartBand(UINT fs, /*!< Output sampling frequency */ ...@@ -124,6 +124,13 @@ getStartBand(UINT fs, /*!< Output sampling frequency */
fsMapped = fs; fsMapped = fs;
switch (fsMapped) { 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: case 48000:
band = FDK_sbrDecoder_sbr_start_freq_48[startFreq]; band = FDK_sbrDecoder_sbr_start_freq_48[startFreq];
break; break;
......
...@@ -217,14 +217,14 @@ SBR_ERROR sbrDecoder_ResetElement ( ...@@ -217,14 +217,14 @@ SBR_ERROR sbrDecoder_ResetElement (
/* Check in/out samplerates */ /* Check in/out samplerates */
if ( sampleRateIn < 6400 if ( sampleRateIn < 6400
|| sampleRateIn > 24000 || sampleRateIn > 48000
) )
{ {
sbrError = SBRDEC_UNSUPPORTED_CONFIG; sbrError = SBRDEC_UNSUPPORTED_CONFIG;
goto bail; goto bail;
} }
if ( sampleRateOut > 48000 ) if ( sampleRateOut > 96000 )
{ {
sbrError = SBRDEC_UNSUPPORTED_CONFIG; sbrError = SBRDEC_UNSUPPORTED_CONFIG;
goto bail; goto bail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment