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

Michael Niedermayer michaelni
Sat Feb 13 20:04:55 CET 2010


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"

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/20100213/9a103815/attachment.pgp>



More information about the ffmpeg-devel mailing list