[FFmpeg-devel] [Patch] QT RLE encoder, bis

Michael Niedermayer michaelni
Wed Jun 27 01:49:07 CEST 2007


Hi

On Wed, Jun 27, 2007 at 09:34:43AM +1000, mark cox wrote:
[...]
> > > +
> > > +            if(i==0) temp_cost = 2 + s->pixel_size;
> > > +            else temp_cost = 1 + s->pixel_size;
> >
> > these can be aligned like:
> > if(i==0) temp_cost = 2 + s->pixel_size;
> > else     temp_cost = 1 + s->pixel_size;
> 
> 
> how about
> 
> temp_cost = s->pixel_size + i ? 1 : 2  ;

temp_cost = s->pixel_size + 1 + !i;
is even simpler
anyway iam fine with any of the 3 though ive a slight preferance for the
!i variant

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070627/854dd2fe/attachment.pgp>



More information about the ffmpeg-devel mailing list