[Ffmpeg-devel] [PATCH] bmp decoder using bytestream

Michael Niedermayer michaelni
Mon Jan 29 23:44:34 CET 2007


Hi

On Mon, Jan 29, 2007 at 01:55:16PM +0100, Michel Bardiaux wrote:
> Michael Niedermayer wrote:
> >Hi
> >
> >On Tue, Jan 23, 2007 at 03:33:52PM +0100, Alex Beregszaszi wrote:
> >>> Hi,
> >>> 
> >>>> > +#define read16(bits) bswap_16(get_bits(bits, 16))
> >>>> > +#define read32(bits) bswap_32(get_bits_long(bits, 32))
> >>> ...
> >>>> > +#define write16(bits, val) put_bits(bits, 16, bswap_16(val))
> >>>> > +#define write32(bits, val) put_bits(bits, 32, bswap_32(val))
> >>> 
> >>> What about using bytestream.h or intreadwrite.h instead this? I dont see
> >>> its putting/reading non-8bit aligned data:
> >
> >no objections feel free to send a patch after this has been applied
> 
> Here it is.
> 
> >but note ill reject it if bmp.o becomes larger (speed is irrelevant, only
> >size and readability matters for this code)
> 
> bmp.o is 20% smaller now.

:)))


patch looks ok assuming mans (bmp decoder maintainer) has no objections

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20070129/28508836/attachment.pgp>



More information about the ffmpeg-devel mailing list