[FFmpeg-soc] [soc]: r5127 - als/alsdec.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Aug 15 15:10:27 CEST 2009


On Sat, Aug 15, 2009 at 03:01:22PM +0200, Thilo Borgmann wrote:
> 
> >> +                unsigned int max, convert;
> >>  ...
> >> +                if (smp < progressive) {
> >> +                    max     = smp;
> >> +                    convert = 1;
> >> +                } else {
> >> +                    max     = progressive;
> >> +                    convert = 0;
> >> +                }
> 
> > 
> > Hmm...
> > tried
> > max = smp;
> > convert = 1;
> > outside the loop and inside
> > if (smp == progessive) {
> > max = progressive;
> > convert = 0;
> > }
> > ?
> 
> smp is the loop counter and can therefore not be put outside the loop.
> For the convert assignment, this could have been true but since there
> have to be two if's (if smp==progressive  and if smp < progressive), it
> has shown to be even slower than the two loop version.

Not quite, you could move the convert = 1 and only that outside the
loop.
Maybe not really worth it though, it might use up one more register in
the loop...


More information about the FFmpeg-soc mailing list