[Ffmpeg-devel] [RFC] D10 IMX patch encoding

Michael Niedermayer michaelni
Sun Mar 4 02:56:30 CET 2007


Hi

On Sat, Mar 03, 2007 at 08:44:36PM +0100, Baptiste Coudurier wrote:
[...]
> >> +    *poutbuf = av_malloc(buf_size + 20 + FF_INPUT_BUFFER_PADDING_SIZE);
> >> +    poutbufp = *poutbuf;
> >> +    memcpy(poutbufp, imx_header, 16);
> >> +    poutbufp += 16;
> >> +    *poutbufp++ = 0x83; /* KLV BER long form */
> >> +    AV_WB24(poutbufp, buf_size);
> >> +    poutbufp += 3;
> >> +    memcpy(poutbufp, buf, buf_size);
> >> +    poutbufp += buf_size;
> >> +    *poutbuf_size = poutbufp - *poutbuf;
> > 
> > these could be done cleaner with the bytestream stuff but iam fine
> > with the above too ...
> > 
> 
> Hummmmmmm, last time:
> "id prefer if you use the bitstream stuff for the 3 lines"
> 
> I was using bytestream stuff, sometimes I feel like a stupid sheep.

well indeed, i review alot of patches and dont remember every detail
use of bytestream as you did originally is fine, better as i said
originally is to use bitstream (get_bits/put_bits) as it would avoid
inclusion of bytestream.h and would avoid addition of AV_WB24() / equivalent
in bytestreamh use of AV_WB* ptr++ is least readable and i didnt suggest that

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

In a rich man's house there is no place to spit but his face.
-- 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/20070304/11878449/attachment.pgp>



More information about the ffmpeg-devel mailing list