26 #ifndef AVCODEC_PUT_BITS_H
27 #define AVCODEC_PUT_BITS_H
57 if (buffer_size < 0) {
83 #ifndef BITSTREAM_WRITER_LE
89 #ifdef BITSTREAM_WRITER_LE
102 #ifdef BITSTREAM_WRITER_LE
103 #define avpriv_align_put_bits align_put_bits_unsupported_here
104 #define avpriv_put_string ff_put_string_unsupported_here
105 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
118 int terminate_string);
134 unsigned int bit_buf;
143 #ifdef BITSTREAM_WRITER_LE
144 bit_buf |= value << (32 - bit_left);
149 bit_buf = (bit_left == 32) ? 0 : value >> bit_left;
155 bit_buf = (bit_buf << n) | value;
158 bit_buf <<= bit_left;
159 bit_buf |= value >> (n - bit_left);
176 put_bits(pb, n, value & ((1 << n) - 1));
184 int lo = value & 0xffff;
185 int hi = value >> 16;
186 #ifdef BITSTREAM_WRITER_LE