summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/specrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libfaad/specrec.c')
-rw-r--r--apps/codecs/libfaad/specrec.c18
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*/
526ALIGN 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};
526static uint8_t quant_to_spec(NeAACDecHandle hDecoder, 533static 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;