26 #ifndef AVCODEC_PUT_BITS_H
27 #define AVCODEC_PUT_BITS_H
52 if (buffer_size < 0) {
77 s->
buf_end = buffer + buffer_size;
104 #ifndef BITSTREAM_WRITER_LE
110 #ifdef BITSTREAM_WRITER_LE
123 #ifdef BITSTREAM_WRITER_LE
124 #define avpriv_align_put_bits align_put_bits_unsupported_here
125 #define avpriv_put_string ff_put_string_unsupported_here
126 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
139 int terminate_string);
155 unsigned int bit_buf;
164 #ifdef BITSTREAM_WRITER_LE
165 bit_buf |= value << (32 - bit_left);
170 bit_buf = (bit_left == 32) ? 0 : value >> bit_left;
176 bit_buf = (bit_buf <<
n) | value;
179 bit_buf <<= bit_left;
180 bit_buf |= value >> (n - bit_left);
197 put_bits(pb, n, value & ((1 << n) - 1));
205 int lo = value & 0xffff;
206 int hi = value >> 16;
207 #ifdef BITSTREAM_WRITER_LE