diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-09 18:32:37 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-09 18:32:37 +0000 |
commit | 811af5968ae3015af04804aa774728f90a897c05 (patch) | |
tree | 18aadf8c4a535fef2de069e968fcb23824fdd20a /apps/codecs/libfaad/specrec.c | |
parent | f3e0207384af483d31e43e3d1f326a138007faf8 (diff) | |
download | rockbox-811af5968ae3015af04804aa774728f90a897c05.tar.gz rockbox-811af5968ae3015af04804aa774728f90a897c05.zip |
Submit FS#11461. Major speedup for aac he profile (PP5002 +20%, PP5020 +15%, PP5022 +19%, MCF5249 +35%, MCF5250 +80%), still not realtime on most targets though. This change does a lot of refactoring in the sbr filters and the dct, switching to our optimized codeclib fft and tweaking IRAM usage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27358 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/specrec.c')
-rw-r--r-- | apps/codecs/libfaad/specrec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c index 74bf1f36f6..d21a923384 100644 --- a/apps/codecs/libfaad/specrec.c +++ b/apps/codecs/libfaad/specrec.c | |||
@@ -458,14 +458,14 @@ static INLINE real_t iquant(int16_t q, const real_t *tab, uint8_t *error) | |||
458 | if (q < 0) | 458 | if (q < 0) |
459 | { | 459 | { |
460 | /* tab contains a value for all possible q [0,8192] */ | 460 | /* tab contains a value for all possible q [0,8192] */ |
461 | if (-q < IQ_TABLE_SIZE) | 461 | if (LIKELY(-q < IQ_TABLE_SIZE)) |
462 | return -tab[-q]; | 462 | return -tab[-q]; |
463 | 463 | ||
464 | *error = 17; | 464 | *error = 17; |
465 | return 0; | 465 | return 0; |
466 | } else { | 466 | } else { |
467 | /* tab contains a value for all possible q [0,8192] */ | 467 | /* tab contains a value for all possible q [0,8192] */ |
468 | if (q < IQ_TABLE_SIZE) | 468 | if (LIKELY(q < IQ_TABLE_SIZE)) |
469 | return tab[q]; | 469 | return tab[q]; |
470 | 470 | ||
471 | *error = 17; | 471 | *error = 17; |
@@ -523,17 +523,17 @@ ALIGN static const real_t pow2sf_tab[] = { | |||
523 | - Within a scalefactor window band, the coefficients are in ascending | 523 | - Within a scalefactor window band, the coefficients are in ascending |
524 | spectral order. | 524 | spectral order. |
525 | */ | 525 | */ |
526 | ALIGN static const real_t pow2_table[] ICONST_ATTR = | ||
527 | { | ||
528 | COEF_CONST(1.0), | ||
529 | COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ | ||
530 | COEF_CONST(1.4142135623730950488016887242097), /* 2^0.50 */ | ||
531 | COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */ | ||
532 | }; | ||
526 | static uint8_t quant_to_spec(NeAACDecHandle hDecoder, | 533 | static uint8_t quant_to_spec(NeAACDecHandle hDecoder, |
527 | ic_stream *ics, int16_t *quant_data, | 534 | ic_stream *ics, int16_t *quant_data, |
528 | real_t *spec_data, uint16_t frame_len) | 535 | real_t *spec_data, uint16_t frame_len) |
529 | { | 536 | { |
530 | ALIGN static const real_t pow2_table[] ICONST_ATTR = | ||
531 | { | ||
532 | COEF_CONST(1.0), | ||
533 | COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ | ||
534 | COEF_CONST(1.4142135623730950488016887242097), /* 2^0.5 */ | ||
535 | COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */ | ||
536 | }; | ||
537 | const real_t *tab = iq_table; | 537 | const real_t *tab = iq_table; |
538 | 538 | ||
539 | (void)frame_len; | 539 | (void)frame_len; |