[FFmpeg-devel] [PATCH] E-AC-3 spectral extension (bump)

Christophe Gisquet christophe.gisquet
Wed Mar 24 02:19:06 CET 2010


Hi,

2010/3/19 Michael Niedermayer <michaelni at gmx.at>:
>> So:
>> - no computation is remade
>
> this is not neccessarily so. Actually ill bet its very very hard
> to proof the lack of redundant computations even for much simpler
> algorihms

Indeed, I overlooked num_copy, which is 1 for all my samples.

>> - each band may start on an unaligned position (for SSE code at
>> least), so scalarproduct & co functions can't be reused directly
>
> you bring up an interresting point, do these sometimes or always start
> at an unaligned address?, if its always x*12*sizeof(float)+1 we can
> probably do something about it

I don't know what the specs would say, but the code seems to say so:
(spx_)start_freq    = start_subband * 12 + 25
so indeed, it is (x*12+1)*sizeof(float) (the +1 is probably due do the DC)
Not considering the computation factorization, this leads to 2 possibilities:
- 3 SSE operations with movups
- 3 SSE operations with movaps, a sufficiently padded buffer to avoid
reads out-of-bound, a mask to erase the result for the value not
belonging to the band, and a final classical x87 computation

> iam incompetent as well, but you seem interrested. Maybe we can together
> resolve this,

At least Justin chimed in and the 3 of us can get somewhere.

> because one or both of us is not understanding the code completely

I was clearly misunderstanding the copy.

I'm not discussing the other remarks for the patch, and will continue
the redundant computation removal optimization with Justin's post.

Best regards,
Christophe



More information about the ffmpeg-devel mailing list