* Pad the end of the output stream with zeros. */
| 151 | * Pad the end of the output stream with zeros. |
| 152 | */ |
| 153 | static inline void flush_put_bits(PutBitContext *s) |
| 154 | { |
| 155 | #ifndef BITSTREAM_WRITER_LE |
| 156 | if (s->bit_left < BUF_BITS) |
| 157 | s->bit_buf <<= s->bit_left; |
| 158 | #endif |
| 159 | while (s->bit_left < BUF_BITS) { |
| 160 | av_assert0(s->buf_ptr < s->buf_end); |
| 161 | #ifdef BITSTREAM_WRITER_LE |
| 162 | *s->buf_ptr++ = s->bit_buf; |
| 163 | s->bit_buf >>= 8; |
| 164 | #else |
| 165 | *s->buf_ptr++ = s->bit_buf >> (BUF_BITS - 8); |
| 166 | s->bit_buf <<= 8; |
| 167 | #endif |
| 168 | s->bit_left += 8; |
| 169 | } |
| 170 | s->bit_left = BUF_BITS; |
| 171 | s->bit_buf = 0; |
| 172 | } |
| 173 | |
| 174 | static inline void flush_put_bits_le(PutBitContext *s) |
| 175 | { |
no outgoing calls