26 #ifndef AVCODEC_PUT_BITS_H
27 #define AVCODEC_PUT_BITS_H
51 if (buffer_size < 0) {
76 s->
buf_end = buffer + buffer_size;
103 #ifndef BITSTREAM_WRITER_LE
109 #ifdef BITSTREAM_WRITER_LE
122 #ifdef BITSTREAM_WRITER_LE
123 #define avpriv_align_put_bits align_put_bits_unsupported_here
124 #define avpriv_put_string ff_put_string_unsupported_here
125 #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
138 int terminate_string);
154 unsigned int bit_buf;
163 #ifdef BITSTREAM_WRITER_LE
164 bit_buf |= value << (32 - bit_left);
169 bit_buf = (bit_left == 32) ? 0 : value >> bit_left;
175 bit_buf = (bit_buf <<
n) | value;
178 bit_buf <<= bit_left;
179 bit_buf |= value >> (n - bit_left);
196 put_bits(pb, n, value & ((1 << n) - 1));
204 int lo = value & 0xffff;
205 int hi = value >> 16;
206 #ifdef BITSTREAM_WRITER_LE