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

Michael Niedermayer michael at niedermayer.cc
Sun Jan 3 20:39:53 CET 2016


On Sun, Jan 03, 2016 at 07:41:49PM +0100, Andreas Cadhalpun wrote:
> 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

>  get_bits.h              |    8 ++++++++
>  mpegaudiodec_template.c |    7 -------
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 0d68f088494147aaab5cdd3b3e42fed473b6bc4f  0001-get_bits-add-get_bitsz-for-reading-0-25-bits.patch
> From 50cc356a559e55657e9d90ed4c7fc2ba3e50551a Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> Date: Sun, 3 Jan 2016 00:28:42 +0100
> Subject: [PATCH 1/2] get_bits: add get_bitsz for reading 0-25 bits

both patches LGTM

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/8fdf7849/attachment.sig>


More information about the ffmpeg-devel mailing list