[FFmpeg-devel] [PATCH 1/3] Indeo 5 decoder: common functions

Kostya kostya.shishkov
Mon Jan 18 20:40:23 CET 2010


On Mon, Jan 18, 2010 at 08:23:09PM +0100, Reimar D?ffinger wrote:
> On Mon, Jan 18, 2010 at 10:12:33AM +0200, Kostya wrote:
> > > >                     q = (base_tab[pos] * scale_tab[quant]) >> 8;
> > > >                     q += !q; // ensure the q always >= 1
> > > >                     if (q > 1) {
> > > >                         val = val * q + FFSIGN(val) * ((q >> 1) - (q & 1));
> > > >                     }
> > > 
> > > You said the += !q was needed because q was still used later, but I can't see where?
> > > Also unnecessary {}
> > 
> > it produces different results for q = 1 and that affects picture a bit
> 
> What? For q = 1, q += !q is q += 0. How can a q+=0 more or less make any difference?

You are right, that statement can be safely dropped, just some wrong
thought at my side.



More information about the ffmpeg-devel mailing list