[FFmpeg-devel] [PATCH 1/3] get_bits: add get_bitsz for reading 0-25 bits

Michael Niedermayer michael at niedermayer.cc
Sun Jan 3 02:03:55 CET 2016


On Sun, Jan 03, 2016 at 01:35:39AM +0100, Andreas Cadhalpun wrote:
> This can be used to simplify code in a couple of places.
> 
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavcodec/get_bits.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
> index 0a61c80..f984d3e 100644
> --- 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

but LGTM either way

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160103/a21b05e8/attachment.sig>


More information about the ffmpeg-devel mailing list