[Ffmpeg-devel] Which byte I/O API?

Michael Niedermayer michaelni
Mon Jan 22 18:20:21 CET 2007


Hi

On Mon, Jan 22, 2007 at 05:59:02PM +0100, Michel Bardiaux wrote:
> I'm trying to ressucitate my BMP encoder. At the time it was criticized 
> for using the put_bits API: understandable but the existing decoder used 
>  get_bits...
> 
> So, the first order of business is to change the decoder to use a 
> byte-oriented API. But which one? bytestream.h, or the recent 
> intreadwrite.h?

for reading/writing the header use whatever leads to the simplest / cleanest /
most readable code (put_bits, bytestream.h, intreadwrite.h, ... whatever
you like)

for reading/writing the raw image use memcpy(), le2me_16() and uintXY_t
read/write ISO C style (expect to see the patch rejected if this is
inefficiently implemented like with bytestream.h or intreadwrite.h which
are designed for unaligned data)

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- 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/20070122/b53d9726/attachment.pgp>



More information about the ffmpeg-devel mailing list