From: Reinhard Tartler Date: Sat, 6 Jul 2013 07:46:07 +0000 (+0200) Subject: lavc: move put_bits_left in put_bits.h X-Git-Tag: v0.8.8~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b20004b2e6165a6d5ef6bc6ae98d3d33c6460808;p=platform%2Fupstream%2Flibav.git lavc: move put_bits_left in put_bits.h (cherry picked from commit afe03092dd693d025d43e1620283d8d285c92772) Signed-off-by: Reinhard Tartler Conflicts: libavcodec/dv.c --- diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 03a05b374..6f74e7b5b 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -372,11 +372,6 @@ typedef struct BlockInfo { static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5; static const int mb_area_start[5] = { 1, 6, 21, 43, 64 }; -static inline int put_bits_left(PutBitContext* s) -{ - return (s->buf_end - s->buf) * 8 - put_bits_count(s); -} - /* decode AC coefficients */ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block) { diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 6e812670b..905461a72 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -72,6 +72,14 @@ static inline int put_bits_count(PutBitContext *s) return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left; } +/** + * @return the number of bits available in the bitstream. + */ +static inline int put_bits_left(PutBitContext* s) +{ + return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left; +} + /** * Pad the end of the output stream with zeros. */