diff options
Diffstat (limited to 'apps/codecs/libfaad/sbr_dec.c')
-rw-r--r-- | apps/codecs/libfaad/sbr_dec.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/codecs/libfaad/sbr_dec.c b/apps/codecs/libfaad/sbr_dec.c index 78c9c79d5d..4d9f9c4c45 100644 --- a/apps/codecs/libfaad/sbr_dec.c +++ b/apps/codecs/libfaad/sbr_dec.c | |||
@@ -42,6 +42,11 @@ | |||
42 | #include "sbr_hfadj.h" | 42 | #include "sbr_hfadj.h" |
43 | 43 | ||
44 | 44 | ||
45 | /* globals */ | ||
46 | static qmf_t X_left [MAX_NTSRHFG][64] MEM_ALIGN_ATTR;// = {{0}}; | ||
47 | static qmf_t X_right[MAX_NTSRHFG][64] MEM_ALIGN_ATTR;// = {{0}}; /* must set this to 0 */ | ||
48 | |||
49 | |||
45 | /* static function declarations */ | 50 | /* static function declarations */ |
46 | static uint8_t sbr_save_prev_data(sbr_info *sbr, uint8_t ch); | 51 | static uint8_t sbr_save_prev_data(sbr_info *sbr, uint8_t ch); |
47 | static void sbr_save_matrix(sbr_info *sbr, uint8_t ch); | 52 | static void sbr_save_matrix(sbr_info *sbr, uint8_t ch); |
@@ -227,7 +232,7 @@ static void sbr_save_matrix(sbr_info *sbr, uint8_t ch) | |||
227 | } | 232 | } |
228 | 233 | ||
229 | #ifdef SBR_LOW_POWER | 234 | #ifdef SBR_LOW_POWER |
230 | ALIGN real_t deg[64]; | 235 | real_t deg[64] MEM_ALIGN_ATTR; |
231 | #endif | 236 | #endif |
232 | 237 | ||
233 | static void sbr_process_channel(sbr_info *sbr, real_t *channel_buf, qmf_t X[MAX_NTSR][64], | 238 | static void sbr_process_channel(sbr_info *sbr, real_t *channel_buf, qmf_t X[MAX_NTSR][64], |
@@ -370,7 +375,6 @@ static void sbr_process_channel(sbr_info *sbr, real_t *channel_buf, qmf_t X[MAX_ | |||
370 | } | 375 | } |
371 | } | 376 | } |
372 | 377 | ||
373 | ALIGN qmf_t X[MAX_NTSR][64]; | ||
374 | uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan, | 378 | uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan, |
375 | const uint8_t just_seeked, const uint8_t downSampledSBR) | 379 | const uint8_t just_seeked, const uint8_t downSampledSBR) |
376 | { | 380 | { |
@@ -401,22 +405,22 @@ uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_cha | |||
401 | sbr->just_seeked = 0; | 405 | sbr->just_seeked = 0; |
402 | } | 406 | } |
403 | 407 | ||
404 | sbr_process_channel(sbr, left_chan, X, 0, dont_process, downSampledSBR); | 408 | sbr_process_channel(sbr, left_chan, X_left, 0, dont_process, downSampledSBR); |
405 | /* subband synthesis */ | 409 | /* subband synthesis */ |
406 | if (downSampledSBR) | 410 | if (downSampledSBR) |
407 | { | 411 | { |
408 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, left_chan); | 412 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X_left, left_chan); |
409 | } else { | 413 | } else { |
410 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, left_chan); | 414 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X_left, left_chan); |
411 | } | 415 | } |
412 | 416 | ||
413 | sbr_process_channel(sbr, right_chan, X, 1, dont_process, downSampledSBR); | 417 | sbr_process_channel(sbr, right_chan, X_right, 1, dont_process, downSampledSBR); |
414 | /* subband synthesis */ | 418 | /* subband synthesis */ |
415 | if (downSampledSBR) | 419 | if (downSampledSBR) |
416 | { | 420 | { |
417 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X, right_chan); | 421 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X_right, right_chan); |
418 | } else { | 422 | } else { |
419 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X, right_chan); | 423 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X_right, right_chan); |
420 | } | 424 | } |
421 | 425 | ||
422 | if (sbr->bs_header_flag) | 426 | if (sbr->bs_header_flag) |
@@ -453,8 +457,6 @@ uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_cha | |||
453 | return 0; | 457 | return 0; |
454 | } | 458 | } |
455 | 459 | ||
456 | ALIGN qmf_t X[MAX_NTSR][64]; | ||
457 | |||
458 | uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel, | 460 | uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel, |
459 | const uint8_t just_seeked, const uint8_t downSampledSBR) | 461 | const uint8_t just_seeked, const uint8_t downSampledSBR) |
460 | { | 462 | { |
@@ -485,13 +487,13 @@ uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel, | |||
485 | sbr->just_seeked = 0; | 487 | sbr->just_seeked = 0; |
486 | } | 488 | } |
487 | 489 | ||
488 | sbr_process_channel(sbr, channel, X, 0, dont_process, downSampledSBR); | 490 | sbr_process_channel(sbr, channel, X_left, 0, dont_process, downSampledSBR); |
489 | /* subband synthesis */ | 491 | /* subband synthesis */ |
490 | if (downSampledSBR) | 492 | if (downSampledSBR) |
491 | { | 493 | { |
492 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, channel); | 494 | sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X_left, channel); |
493 | } else { | 495 | } else { |
494 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, channel); | 496 | sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X_left, channel); |
495 | } | 497 | } |
496 | 498 | ||
497 | if (sbr->bs_header_flag) | 499 | if (sbr->bs_header_flag) |
@@ -521,8 +523,6 @@ uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel, | |||
521 | return 0; | 523 | return 0; |
522 | } | 524 | } |
523 | 525 | ||
524 | qmf_t X_left [MAX_NTSRHFG][64] MEM_ALIGN_ATTR;// = {{0}}; | ||
525 | qmf_t X_right[MAX_NTSRHFG][64] MEM_ALIGN_ATTR;// = {{0}}; /* must set this to 0 */ | ||
526 | 526 | ||
527 | #if (defined(PS_DEC) || defined(DRM_PS)) | 527 | #if (defined(PS_DEC) || defined(DRM_PS)) |
528 | uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel, | 528 | uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel, |