[FFmpeg-devel] [PATCH]HE-AACv1 try 3 (all missing functionality added)

Michael Niedermayer michaelni
Sun Feb 14 15:59:32 CET 2010


On Sun, Feb 14, 2010 at 02:31:55PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sat, Feb 13, 2010 at 05:24:21PM +0000, M?ns Rullg?rd wrote:
> >> 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 
> >> >>> *src,
> >> >>> +                                             float mul, float add, int 
> >> >>> len)
> >> >>> +{
> >> >>> +    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.
> >
> > a preprocessor could turn an assert() when disabled into a "soft assert"
> 
> That would contradict the C spec.

an off by default -flearn-from-asserts should still be possible


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- 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/20100214/a87c8b24/attachment.pgp>



More information about the ffmpeg-devel mailing list