[FFmpeg-devel] [PATCH 1/3] get_bits: add get_bitsz for reading 0-25 bits
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Sun Jan 3 19:41:49 CET 2016
On 03.01.2016 02:03, Michael Niedermayer wrote:
> On Sun, Jan 03, 2016 at 01:35:39AM +0100, Andreas Cadhalpun wrote:
>> --- a/libavcodec/get_bits.h
>> +++ b/libavcodec/get_bits.h
>> @@ -269,6 +269,14 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
>> return tmp;
>> }
>>
>> +/**
>> + * Read 0-25 bits.
>> + */
>
>> +static inline int get_bitsz(GetBitContext *s, int n)
>
> just realized when looking at the code this replaces, this should be
> always_inline possibly
OK, changed inline to av_always_inline.
On 03.01.2016 02:26, Luca Barbato wrote:
> On 03/01/16 01:36, Andreas Cadhalpun wrote:
>> -/* handle n = 0 too */
>> -static inline int get_bitsz(GetBitContext *s, int n)
>> -{
>> - return n ? get_bits(s, n) : 0;
>> -}
>> -
>> -
>
> If you want to go the extra mile you might move this hunk in the first patch, beside that seems fine.
Done.
Updated patches attached.
Best regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-get_bits-add-get_bitsz-for-reading-0-25-bits.patch
Type: text/x-diff
Size: 1551 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160103/18cb2802/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavc-use-get_bitsz-to-simplify-the-code.patch
Type: text/x-diff
Size: 8169 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160103/18cb2802/attachment-0001.patch>
More information about the ffmpeg-devel
mailing list