[FFmpeg-devel] [PATCH]HE-AACv1 try 3 (all missing functionality added)
Sat Feb 13 18:24:21 CET 2010
Michael Niedermayer <michaelni at gmx.at> writes:
> On Sat, Feb 13, 2010 at 05:31:59PM +0100, Vitor Sessak wrote:
>>> +static void vector_fmul_scalar_fadd_scalar_c(float *dst, const float
>>> + float mul, float add, int
>>> + int i;
>>> + for (i = 0; i < len; i++)
>>> + dst[i] = src[i] * mul + add;
>> Did you benchmark if hand-unrolling these loops give any benefit? You know
>> that len is a multiple of four, but the compiler don't.
> assert(len>0 && len%4==0);
> then the compiler knows it too :)
Only if you compile with asserts enabled, which will slow things down
immensely in code like this.
> and after you looked at what gcc generates if forced to unroll
> (theres a flag for that IIRC)
> then post a code pessimization bug to the gcc-devels
> -> only way to see gcc get better at these things
What we need is a "soft assert" whereby we can tell the compiler
things we know to be true without any code being generated for it.
Some compilers have that already.
mans at mansr.com
More information about the ffmpeg-devel