summaryrefslogtreecommitdiffstats
path: root/libfaad2/is.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-02 22:59:04 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-02 22:59:04 +0000
commit228ca70d485e2660c2e381d7112cbcca65c156a0 (patch)
treef7ab4303f2daa68c76271787a60d50cb1ada2e46 /libfaad2/is.c
parenteb1dee5cbf86fba8d5081bae6071cc4a4fd68306 (diff)
downloadmpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.bz2
mpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.xz
update to the 2.0 release of faad, patch by adland
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12528 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/is.c')
-rw-r--r--libfaad2/is.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libfaad2/is.c b/libfaad2/is.c
index e062a61e74..2577de2d94 100644
--- a/libfaad2/is.c
+++ b/libfaad2/is.c
@@ -1,6 +1,6 @@
/*
** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
-** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: is.c,v 1.12 2003/09/09 18:09:52 menno Exp $
+** $Id: is.c,v 1.2 2003/10/03 22:22:27 alex Exp $
**/
#include "common.h"
@@ -47,7 +47,7 @@ void is_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
uint16_t frame_len)
{
uint8_t g, sfb, b;
- uint16_t i, k;
+ uint16_t i;
#ifndef FIXED_POINT
real_t scale;
#else
@@ -76,26 +76,25 @@ void is_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
#ifndef FIXED_POINT
scale = (real_t)pow(0.5, (0.25*icsr->scale_factors[g][sfb]));
#else
- exp = icsr->scale_factors[g][sfb] / 4;
- frac = icsr->scale_factors[g][sfb] % 4;
+ exp = icsr->scale_factors[g][sfb] >> 2;
+ frac = icsr->scale_factors[g][sfb] & 3;
#endif
/* Scale from left to right channel,
do not touch left channel */
for (i = icsr->swb_offset[sfb]; i < icsr->swb_offset[sfb+1]; i++)
{
- k = (group*nshort)+i;
#ifndef FIXED_POINT
- r_spec[k] = MUL(l_spec[k], scale);
+ r_spec[(group*nshort)+i] = MUL_R(l_spec[(group*nshort)+i], scale);
#else
if (exp < 0)
- r_spec[k] = l_spec[k] << -exp;
+ r_spec[(group*nshort)+i] = l_spec[(group*nshort)+i] << -exp;
else
- r_spec[k] = l_spec[k] >> exp;
- r_spec[k] = MUL_R_C(r_spec[k], pow05_table[frac + 3]);
+ r_spec[(group*nshort)+i] = l_spec[(group*nshort)+i] >> exp;
+ r_spec[(group*nshort)+i] = MUL_C(r_spec[(group*nshort)+i], pow05_table[frac + 3]);
#endif
if (is_intensity(icsr, g, sfb) != invert_intensity(ics, g, sfb))
- r_spec[k] = -r_spec[k];
+ r_spec[(group*nshort)+i] = -r_spec[(group*nshort)+i];
}
}
}