[FFmpeg-devel] [PATCH] Some cleanups for libavcodec/alac.c

Michael Niedermayer michaelni
Tue Jul 10 11:02:28 CEST 2007


Hi

On Tue, Jul 10, 2007 at 05:54:01AM +0200, Vitor Sessak wrote:
[...]
>  > i think its safer to check the validity of setinfo_max_samples_per_frame
> >before storing it into the struct
> >also *ptr++ looks fine to me
> 
> I also like *ptr++, but I think to mix with bytestream_get_be?? it is 
> slightly less clear than bytestream_put_byte. But I'm not radical about 
> that. New patch attached.

i prefer *ptr++ as it also forces the reader to realize that bytestream_*
does nothing else then read/write and increase ...


> 
> >> -        /* 2^result = something to do with output waiting.
> >> -         * perhaps matters if we read > 1 frame in a pass?
> >> -         */
> >> -        get_bits(&alac->gb, 4);
> >>  
> >> -        get_bits(&alac->gb, 12); /* unknown, skip 12 bits */
> >> -        hassize = get_bits(&alac->gb, 1); /* the output sample size is 
> >stored soon */
> >> -        wasted_bytes = get_bits(&alac->gb, 2); /* unknown ? */
> >> +    /* 2^result = something to do with output waiting.
> >> +     * perhaps matters if we read > 1 frame in a pass?
> >> +     */
> >> +    get_bits(&alac->gb, 4);
> >> +    get_bits(&alac->gb, 12); /* unknown, skip 12 bits */
> >> +    /* the output sample size is stored soon */
> >> +    hassize = get_bits(&alac->gb, 1);
> >>  
> >> +    wasted_bytes = get_bits(&alac->gb, 2); /* unknown ? */
> >cosmetic
> 
> Sorry, I thought that "don't mix cosmetical with functional" didn't 
> apply when it would break indentation. Fixed in new patch.

ok

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

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20070710/1cc851d9/attachment.pgp>



More information about the ffmpeg-devel mailing list