[SCM] libav/upstream.snapshot: lavc: move put_bits_left in put_bits.h

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sat Jul 13 06:29:04 UTC 2013


The following commit has been merged in the upstream.snapshot branch:
commit 9d1b173aae27aae016ff799e48cd5aa1bdaba0ad
Author: Luca Barbato <lu_zero at gentoo.org>
Date:   Fri Jun 28 03:40:35 2013 +0200

    lavc: move put_bits_left in put_bits.h
    
    (cherry picked from commit afe03092dd693d025d43e1620283d8d285c92772)
    
    Signed-off-by: Reinhard Tartler <siretart at tauware.de>

diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 7067f0c..0cbb106 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -339,11 +339,6 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
 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);
-}
-
 #if CONFIG_SMALL
 /* Converts run and level (where level != 0) pair into VLC, returning bit size */
 static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc)
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index f32b7fd..d13a744 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -73,6 +73,14 @@ static inline int put_bits_count(PutBitContext *s)
 }
 
 /**
+ * @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.
  */
 static inline void flush_put_bits(PutBitContext *s)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list