26 #ifndef AVCODEC_PUT_BITS_H
27 #define AVCODEC_PUT_BITS_H
52 if (buffer_size < 0) {
86 #ifndef BITSTREAM_WRITER_LE
92 #ifdef BITSTREAM_WRITER_LE
105 #ifdef BITSTREAM_WRITER_LE
106 #define avpriv_align_put_bits align_put_bits_unsupported_here
107 #define avpriv_put_string ff_put_string_unsupported_here
108 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
121 int terminate_string);
137 unsigned int bit_buf;
146 #ifdef BITSTREAM_WRITER_LE
147 bit_buf |= value << (32 - bit_left);
152 bit_buf = (bit_left == 32) ? 0 : value >> bit_left;
158 bit_buf = (bit_buf <<
n) | value;
161 bit_buf <<= bit_left;
162 bit_buf |= value >> (n - bit_left);
179 put_bits(pb, n, value & ((1 << n) - 1));
187 int lo = value & 0xffff;
188 int hi = value >> 16;
189 #ifdef BITSTREAM_WRITER_LE