26 #ifndef AVCODEC_PUT_BITS_H
27 #define AVCODEC_PUT_BITS_H
56 if (buffer_size < 0) {
90 #ifndef BITSTREAM_WRITER_LE
96 #ifdef BITSTREAM_WRITER_LE
109 #ifdef BITSTREAM_WRITER_LE
110 #define avpriv_align_put_bits align_put_bits_unsupported_here
111 #define avpriv_put_string ff_put_string_unsupported_here
112 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
125 int terminate_string);
141 unsigned int bit_buf;
144 assert(n <= 31 && value < (1
U << n));
150 #ifdef BITSTREAM_WRITER_LE
151 bit_buf |= value << (32 - bit_left);
155 bit_buf = (bit_left == 32) ? 0 : value >> bit_left;
161 bit_buf = (bit_buf << n) | value;
164 bit_buf <<= bit_left;
165 bit_buf |= value >> (n - bit_left);
179 assert(n >= 0 && n <= 31);
181 put_bits(pb, n, value & ((1 << n) - 1));
189 int lo = value & 0xffff;
190 int hi = value >> 16;
191 #ifdef BITSTREAM_WRITER_LE