diff options
Diffstat (limited to 'apps/codecs/libfaad/ps_dec.c')
-rw-r--r-- | apps/codecs/libfaad/ps_dec.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/apps/codecs/libfaad/ps_dec.c b/apps/codecs/libfaad/ps_dec.c index f5d5ca9489..9a176235d0 100644 --- a/apps/codecs/libfaad/ps_dec.c +++ b/apps/codecs/libfaad/ps_dec.c | |||
@@ -181,10 +181,16 @@ static void map20indexto34(int8_t *index, uint8_t bins); | |||
181 | static void map34indexto20(int8_t *index, uint8_t bins); | 181 | static void map34indexto20(int8_t *index, uint8_t bins); |
182 | #endif | 182 | #endif |
183 | static void ps_data_decode(ps_info *ps); | 183 | static void ps_data_decode(ps_info *ps); |
184 | static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64], | 184 | static void ps_decorrelate(ps_info *ps, |
185 | qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]); | 185 | qmf_t X_left[MAX_NTSRPS][64], |
186 | static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64], | 186 | qmf_t X_right[MAX_NTSRPS][64], |
187 | qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]); | 187 | qmf_t X_hybrid_left[32][32], |
188 | qmf_t X_hybrid_right[32][32]); | ||
189 | static void ps_mix_phase(ps_info *ps, | ||
190 | qmf_t X_left[MAX_NTSRPS][64], | ||
191 | qmf_t X_right[MAX_NTSRPS][64], | ||
192 | qmf_t X_hybrid_left[32][32], | ||
193 | qmf_t X_hybrid_right[32][32]); | ||
188 | 194 | ||
189 | /* */ | 195 | /* */ |
190 | 196 | ||
@@ -1027,8 +1033,11 @@ static void ps_data_decode(ps_info *ps) | |||
1027 | } | 1033 | } |
1028 | 1034 | ||
1029 | /* decorrelate the mono signal using an allpass filter */ | 1035 | /* decorrelate the mono signal using an allpass filter */ |
1030 | static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64], | 1036 | static void ps_decorrelate(ps_info *ps, |
1031 | qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]) | 1037 | qmf_t X_left[MAX_NTSRPS][64], |
1038 | qmf_t X_right[MAX_NTSRPS][64], | ||
1039 | qmf_t X_hybrid_left[32][32], | ||
1040 | qmf_t X_hybrid_right[32][32]) | ||
1032 | { | 1041 | { |
1033 | uint8_t gr, n, m, bk; | 1042 | uint8_t gr, n, m, bk; |
1034 | uint8_t temp_delay = 0; | 1043 | uint8_t temp_delay = 0; |
@@ -1423,8 +1432,11 @@ static const real_t ipdopd_sin_tab[] = { | |||
1423 | FRAC_CONST(-0.000000000000000) | 1432 | FRAC_CONST(-0.000000000000000) |
1424 | }; | 1433 | }; |
1425 | 1434 | ||
1426 | static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64], | 1435 | static void ps_mix_phase(ps_info *ps, |
1427 | qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]) | 1436 | qmf_t X_left[MAX_NTSRPS][64], |
1437 | qmf_t X_right[MAX_NTSRPS][64], | ||
1438 | qmf_t X_hybrid_left[32][32], | ||
1439 | qmf_t X_hybrid_right[32][32]) | ||
1428 | { | 1440 | { |
1429 | uint8_t n; | 1441 | uint8_t n; |
1430 | uint8_t gr; | 1442 | uint8_t gr; |
@@ -1939,13 +1951,15 @@ ps_info *ps_init(uint8_t sr_index) | |||
1939 | } | 1951 | } |
1940 | 1952 | ||
1941 | /* main Parametric Stereo decoding function */ | 1953 | /* main Parametric Stereo decoding function */ |
1942 | uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]) | 1954 | uint8_t ps_decode(ps_info *ps, |
1955 | qmf_t X_left[MAX_NTSRPS][64], | ||
1956 | qmf_t X_right[MAX_NTSRPS][64]) | ||
1943 | { | 1957 | { |
1944 | static qmf_t X_hybrid_left[32][32]; | 1958 | static qmf_t X_hybrid_left[32][32]; |
1945 | static qmf_t X_hybrid_right[32][32]; | 1959 | static qmf_t X_hybrid_right[32][32]; |
1946 | 1960 | ||
1947 | memset(&X_hybrid_left,0,sizeof(X_hybrid_left)); | 1961 | memset(&X_hybrid_left , 0, sizeof(X_hybrid_left)); |
1948 | memset(&X_hybrid_right,0,sizeof(X_hybrid_right)); | 1962 | memset(&X_hybrid_right, 0, sizeof(X_hybrid_right)); |
1949 | 1963 | ||
1950 | /* delta decoding of the bitstream data */ | 1964 | /* delta decoding of the bitstream data */ |
1951 | ps_data_decode(ps); | 1965 | ps_data_decode(ps); |