[FFmpeg-devel] [PATCH v3] add put_bits_long to avoid undefined behaviour in put_bits

matthieu castet castet.matthieu
Sun Sep 20 19:29:22 CEST 2009

M?ns Rullg?rd wrote:
> matthieu castet <castet.matthieu at free.fr> writes:
>> Michael Niedermayer wrote:
>>> On Sun, Sep 13, 2009 at 03:17:01PM +0200, matthieu castet wrote:
>>>> Hi,
>>> i dont think this should be static inline or where is it speed
>>> critical?
>> Why not but :
>> - the equivalent "get_bits_long" is static inline.
>> - most of time it is called with const n/value arguments and the function will be optimised
> It will still increase the code size compared to a called function.
> You need to look at where it is used.  If it called less frequently
> than once per frame, it should probably not be inlined.
>> - should we create a put_bits.c for putting only this function ?
> bitstream.c seems fine to me.

I have no time to handle this patch ATM. I opened issue 1400 on roundup.
I will be happy if somebody want to take it.


More information about the ffmpeg-devel mailing list