(cherry picked from commit afe03092dd693d025d43e1620283d8d285c92772)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/dv.c
... | ... |
@@ -372,11 +372,6 @@ typedef struct BlockInfo { |
372 | 372 |
static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5; |
373 | 373 |
static const int mb_area_start[5] = { 1, 6, 21, 43, 64 }; |
374 | 374 |
|
375 |
-static inline int put_bits_left(PutBitContext* s) |
|
376 |
-{ |
|
377 |
- return (s->buf_end - s->buf) * 8 - put_bits_count(s); |
|
378 |
-} |
|
379 |
- |
|
380 | 375 |
/* decode AC coefficients */ |
381 | 376 |
static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block) |
382 | 377 |
{ |
... | ... |
@@ -73,6 +73,14 @@ static inline int put_bits_count(PutBitContext *s) |
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
/** |
76 |
+ * @return the number of bits available in the bitstream. |
|
77 |
+ */ |
|
78 |
+static inline int put_bits_left(PutBitContext* s) |
|
79 |
+{ |
|
80 |
+ return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left; |
|
81 |
+} |
|
82 |
+ |
|
83 |
+/** |
|
76 | 84 |
* Pad the end of the output stream with zeros. |
77 | 85 |
*/ |
78 | 86 |
static inline void flush_put_bits(PutBitContext *s) |