[FFmpeg-devel] [PATCH] AAC decoder round 8

Michael Niedermayer michaelni
Mon Aug 18 13:55:50 CEST 2008


On Mon, Aug 18, 2008 at 05:31:04AM +0100, Robert Swain wrote:
> 2008/8/18 Robert Swain <robert.swain at gmail.com>:
> > 2008/8/17 Michael Niedermayer <michaelni at gmx.at>:
> >> On Sun, Aug 17, 2008 at 11:12:55PM +0100, Robert Swain wrote:
> >>> 2008/8/15 Robert Swain <robert.swain at gmail.com>:
> >>> > 2008/8/15 Michael Niedermayer <michaelni at gmx.at>:
> >>> >> On Fri, Aug 15, 2008 at 09:04:24AM +0100, Robert Swain wrote:
> 
> >>> [...]
> >>>
> >>> >>> Index: libavcodec/aacdectab.h
> >>> >>> ===================================================================
> >>> >>> --- libavcodec/aacdectab.h    (revision 14767)
> >>> >>> +++ libavcodec/aacdectab.h    (working copy)
> >>> >
> >>> >>> +
> >>> >>> +/* @name tns_tmp2_map
> >>> >>> + * Tables of the tmp2[] arrays of LPC coefficients used for TNS.
> >>> >>> + * The suffix _M_N[] indicate the values of coef_compress and coef_res
> >>> >>> + * respectively.
> >>> >>> + * @{
> >>> >>> + */
> >>> >>> +static const float tns_tmp2_map_1_3[TNS_MAX_ORDER] = {
> >>> >>> +     0.00000000,  0.43388373, -0.64278758, -0.34202015,
> >>> >>> +     0.97492790,  0.78183150, -0.64278758, -0.34202015,
> >>> >>> +    -0.43388373, -0.78183150, -0.64278758, -0.34202015,
> >>> >>> +    -0.78183150, -0.43388373, -0.64278758, -0.34202015,
> >>> >>> +     0.78183150,  0.97492790, -0.64278758, -0.34202015
> >>> >>> +};
> >>> >>> +
> >>> >>> +static const float tns_tmp2_map_0_3[TNS_MAX_ORDER] = {
> >>> >>> +     0.00000000,  0.43388373,  0.78183150,  0.97492790,
> >>> >>> +    -0.98480773, -0.86602539, -0.64278758, -0.34202015,
> >>> >>> +    -0.43388373, -0.78183150, -0.97492790, -0.97492790,
> >>> >>> +    -0.98480773, -0.86602539, -0.64278758, -0.34202015,
> >>> >>> +     0.78183150,  0.97492790,  0.97492790,  0.78183150
> >>> >>> +};
> >>> >>> +
> >>> >>> +static const float tns_tmp2_map_1_4[TNS_MAX_ORDER] = {
> >>> >>> +     0.00000000,  0.20791170,  0.40673664,  0.58778524,
> >>> >>> +    -0.67369562, -0.52643216, -0.36124167, -0.18374951,
> >>> >>> +     0.99452192,  0.95105648,  0.86602539,  0.74314481,
> >>> >>> +    -0.67369562, -0.52643216, -0.36124167, -0.18374951,
> >>> >>> +    -0.20791176, -0.40673670, -0.58778530, -0.74314487
> >>> >>> +};
> >>> >>> +
> >>> >>> +static const float tns_tmp2_map_0_4[TNS_MAX_ORDER] = {
> >>> >>> +     0.00000000,  0.20791170,  0.40673664,  0.58778524,
> >>> >>> +     0.74314481,  0.86602539,  0.95105654,  0.99452192,
> >>> >>> +    -0.99573416, -0.96182561, -0.89516330, -0.79801720,
> >>> >>> +    -0.67369562, -0.52643216, -0.36124167, -0.18374951,
> >>> >>> +    -0.20791176, -0.40673670, -0.58778530, -0.74314487
> >>> >>> +};
> >>> >>
> >>> >> iam not sure if the code is correct but i think several of these
> >>> >> elements can never be accessed
> >>> >
> >>> > I'll check the code.
> >>>
> >>> The current code only accesses elements 0-15 by my reckoning.
> >>
> >> actually i think it accesses fewer
> >>
> >> lets just look at the table 3rd table, to access this implicates that
> >> tmp2_idx=2
> >> which implicates
> >> coef_res=0
> >> coef_compress=1
> >>
> >> and
> >> coef_len = coef_res + 3 - coef_compress;
> >> which makes it 2
> >> thus only 4 elements of the 3rd table could be accssed
> >> unless i missed something
> >
> > I don't think you did. I reached the same conclusion shortly after
> > sending the e-mail. The code in the spec for this section is
> > absolutely horrible. Working through their code, I don't obtain the
> > same values as are in the tns_tmp2_map_M_N tables though I expect I'm
> > making a mistake as I don't quite understand the intention of some of
> > the code.
> 
> See attached. I'll work on optimising the code in apply_tns() a bit tomorrow.

patch ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080818/6a6ecd86/attachment.pgp>



More information about the ffmpeg-devel mailing list