[FFmpeg-devel] [PATCH] Arithmetic decoding in ALS

Michael Niedermayer michaelni
Tue Jan 19 01:40:52 CET 2010


On Tue, Jan 19, 2010 at 12:21:34AM +0100, Thilo Borgmann wrote:
> Am 18.01.10 23:38, schrieb Michael Niedermayer:
> > On Thu, Jan 14, 2010 at 03:20:04PM +0100, Thilo Borgmann wrote:
> >> Am 13.01.10 00:00, schrieb Michael Niedermayer:
> >>> On Tue, Jan 12, 2010 at 08:50:27PM +0100, Thilo Borgmann wrote:
> >>>> Am 12.01.10 00:33, schrieb Michael Niedermayer:
> >>>>> On Mon, Jan 11, 2010 at 09:15:05PM +0100, Thilo Borgmann wrote:
[...]
> 
> >> +/** Tail codes used in arithmetic coding using block Gilbert-Moore codes.
> >> + */
> >> +static unsigned int tail_code[16][6] = {
> > 
> > static const
> > 
> > [...]
> >> +                    if (res >= 0)
> >> +                        res += (max_msb    ) << cur_k;
> >> +                    else
> > 
> > {}
> 
> Are there new rules about if-else one-liners I've missed?

With
if (res >= 0)
    res += (max_msb    ) << cur_k;
else

a patch adding a line looks:

-if (res >= 0)
+if (res >= 0){
    res += (max_msb    ) << cur_k;
+   foorbar();
-else
+} else

with 

if (res >= 0) {
    res += (max_msb    ) << cur_k;
} else

a patch looks:

 if (res >= 0){
    res += (max_msb    ) << cur_k;
+   foorbar();
 } else

which is much more readable and as the {} cost no extra line in this case
i suggest adding them

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- 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/20100119/3b3ede1a/attachment.pgp>



More information about the ffmpeg-devel mailing list