summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs')
-rw-r--r--lib/rbcodec/codecs/libfaad/common.h4
-rw-r--r--lib/rbcodec/codecs/libfaad/specrec.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libfaad/common.h b/lib/rbcodec/codecs/libfaad/common.h
index 8f66a14ce0..938f64e14c 100644
--- a/lib/rbcodec/codecs/libfaad/common.h
+++ b/lib/rbcodec/codecs/libfaad/common.h
@@ -135,9 +135,11 @@ extern "C" {
135 #undef ERROR_RESILIENCE 135 #undef ERROR_RESILIENCE
136#endif 136#endif
137 137
138#if CODEC_SIZE >= 0x80000 138#ifdef CODEC_AAC_SBR_DEC
139#define SBR_DEC 139#define SBR_DEC
140//#define SBR_LOW_POWER /* Does not work yet in rockbox. */ 140//#define SBR_LOW_POWER /* Does not work yet in rockbox. */
141#endif
142#if CODEC_SIZE >= 0x80000
141#define PS_DEC 143#define PS_DEC
142#endif 144#endif
143 145
diff --git a/lib/rbcodec/codecs/libfaad/specrec.c b/lib/rbcodec/codecs/libfaad/specrec.c
index 200239bddc..02deb298b9 100644
--- a/lib/rbcodec/codecs/libfaad/specrec.c
+++ b/lib/rbcodec/codecs/libfaad/specrec.c
@@ -850,9 +850,13 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
850#if (defined(PS_DEC) || defined(DRM_PS)) 850#if (defined(PS_DEC) || defined(DRM_PS))
851 if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0)) 851 if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0))
852 { 852 {
853 uint8_t ele = hDecoder->fr_ch_ele;
854 uint8_t ch = sce->channel; 853 uint8_t ch = sce->channel;
855 uint16_t frame_size = (hDecoder->sbr_alloced[ele]) ? 2 : 1; 854 uint16_t frame_size =
855#ifdef SBR_DEC
856 (hDecoder->sbr_alloced[hDecoder->fr_ch_ele]) ? 2 : 1;
857#else
858 1;
859#endif
856 frame_size *= hDecoder->frameLength*sizeof(real_t); 860 frame_size *= hDecoder->frameLength*sizeof(real_t);
857 861
858 memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size); 862 memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size);