[Ffmpeg-devel] [PATCH] BMP encoder

Michel Bardiaux mbardiaux
Tue Oct 31 14:33:24 CET 2006


Michael Niedermayer wrote:
> Hi
>
> you are quicker with sending patches then iam with thinking about how to
> optimally solve the issues ...
> 
> lets see we have 
> LD*/ST* from dsputil.h which read and write unaligned native endian
> LE_*/BE_* from avcodec.h which read unaligned little and big endian 
> bytestream_get_* in bytestream which read unaligned little endian and
> increase a pointer
> 
> IMHO bytestream.h should only contain functions which increase a pointer
> similar to what is currently in there

OK, no touchy bytestream.h. But I dont understand why you passed the 
introduction (and use in snow) of 2 different APIs for essentially the 
same thing.

> 
> macros to read and write little,big and native endian should be IMHO in a
> seperate file, also LE*/BE*/LD*/ST* should be moved into that 

Something not clear to me here: LE*/BE*/LD*/ST* to, say, bytebuffer.h 
(OK?), that's clear. But apart from these, which "macros to read and 
write little,big and native endian"?

> and optionally
> be cleaned up in the sense that native endian on BE should be equal to BE_*
> and similarly on LE
> furthermore we could rename them so their names are more consistent
> something like:
> LDLE_XY load  little endian XY bit
> STLE_XY store little endian XY bit
> LDBE_XY load  big    endian XY bit
> STBE_XY store big    endian XY bit
> LD_XY   load  native endian XY bit
> ST_XY   store native endian XY bit
> 
> or we could leave their names and just add the missing 2
> LE_XY   load  little endian XY bit
> STLE_XY store little endian XY bit
> BE_XY   load  big    endian XY bit
> STBE_XY store big    endian XY bit
> LDXY    load  native endian XY bit
> STXY    store native endian XY bit
> 
> comments?

I think I'dd the the first, more symmetric.

> 
> also note the bmp encoder just depends on moving ST* into bytesometing.h
> (something!=stream) or writing STLE_* the rest is a seperate issue 
> 
> [...]
>> @@ -22,6 +22,8 @@
>>  #ifndef FFMPEG_BYTESTREAM_H
>>  #define FFMPEG_BYTESTREAM_H
>>  
>> +// These assume alignment
> 
> they do not

I have posted a correction.

> 
> 
> [...]


-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list