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

Måns Rullgård mru
Tue Jan 30 00:34:26 CET 2007


Michael Niedermayer <michaelni at gmx.at> writes:

> 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

Any fixes to the bmp decoder are OK with me.  I'm not planning any
changes at the moment, so feel free to commit.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list