From 6647ab80e36aa2484a145029141984843958b246 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 13 Jul 2008 14:27:48 +0000 Subject: bitstream: move put_sbits() from flacenc.c to bitstream.h and use it throughout libavcodec. Originally committed as revision 14204 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/bitstream.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavcodec/bitstream.h') diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index b0e4ce9984..a90d48df53 100644 --- a/libavcodec/bitstream.h +++ b/libavcodec/bitstream.h @@ -315,6 +315,13 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) } #endif +static inline void put_sbits(PutBitContext *pb, int bits, int32_t val) +{ + assert(bits >= 0 && bits <= 31); + + put_bits(pb, bits, val & ((1<