aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-29 10:58:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-29 10:59:04 +0200
commitc1343897c3c879d8842f06220dd1019fd4f8baf7 (patch)
tree4be8c6bf0d42920de995d721eeb01886cbc17b5c /libavcodec
parent53fd1ab26bec7d045d168590bf49de722e2a601c (diff)
parentafe03092dd693d025d43e1620283d8d285c92772 (diff)
downloadffmpeg-c1343897c3c879d8842f06220dd1019fd4f8baf7.tar.gz
Merge commit 'afe03092dd693d025d43e1620283d8d285c92772'
* commit 'afe03092dd693d025d43e1620283d8d285c92772': lavc: move put_bits_left in put_bits.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dv.c5
-rw-r--r--libavcodec/put_bits.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 39a87a93c2..2a06c541d6 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -351,11 +351,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 7320443895..e2c4a61791 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -76,6 +76,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)