[FFmpeg-devel] [RFC] mixed-endian get_bits
Fri Oct 1 07:44:15 CEST 2010
On Fri, Oct 01, 2010 at 12:28:24AM +0200, Michael Niedermayer wrote:
> if you want to allow get_bits() being #included 2 times ones for a LE
> and once for a BE reader (they can use different structs for the context too
> your patch assumes they are equal which is not reasonable)
Well, that assumption has the advantage that the same init function can be used
etc. With different structs it would get real ugly to use them both.
> then i dont mind though it seems like huge work for a problem that has a simple
> solution, You compile the whole codec twice and factor out what is common
> in a 3rd file
> the whole codec after strip with full optimizations is just 8kb object file
Yes, I'll probably implement that in the end (it does still mean it is not
possible to inline the _whole_ codec though, so one additional function call
per 33 bytes).
However one approach to allow including get_bits multiple time would
be to wrap _everything_ in rename macros (I assume this will be possible
somehow for the macro definitions as well, not so sure there though).
However I suspect this would make the code real ugly and is not really
More information about the ffmpeg-devel