|
|
@ -142,6 +142,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
|
|
|
#ifdef BITSTREAM_WRITER_LE |
|
|
|
#ifdef BITSTREAM_WRITER_LE |
|
|
|
bit_buf |= value << (32 - bit_left); |
|
|
|
bit_buf |= value << (32 - bit_left); |
|
|
|
if (n >= bit_left) { |
|
|
|
if (n >= bit_left) { |
|
|
|
|
|
|
|
av_assert2(s->buf_ptr+3<s->buf_end); |
|
|
|
AV_WL32(s->buf_ptr, bit_buf); |
|
|
|
AV_WL32(s->buf_ptr, bit_buf); |
|
|
|
s->buf_ptr+=4; |
|
|
|
s->buf_ptr+=4; |
|
|
|
bit_buf = (bit_left==32)?0:value >> bit_left; |
|
|
|
bit_buf = (bit_left==32)?0:value >> bit_left; |
|
|
@ -155,6 +156,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
bit_buf<<=bit_left; |
|
|
|
bit_buf<<=bit_left; |
|
|
|
bit_buf |= value >> (n - bit_left); |
|
|
|
bit_buf |= value >> (n - bit_left); |
|
|
|
|
|
|
|
av_assert2(s->buf_ptr+3<s->buf_end); |
|
|
|
AV_WB32(s->buf_ptr, bit_buf); |
|
|
|
AV_WB32(s->buf_ptr, bit_buf); |
|
|
|
//printf("bitbuf = %08x\n", bit_buf);
|
|
|
|
//printf("bitbuf = %08x\n", bit_buf);
|
|
|
|
s->buf_ptr+=4; |
|
|
|
s->buf_ptr+=4; |
|
|
|