Mercurial > libavcodec.hg
changeset 8666:e013ec85260b libavcodec
Use AV_WL32/AV_WB32 in bitstream.h
author | reimar |
---|---|
date | Sun, 25 Jan 2009 18:12:13 +0000 |
parents | 5094ddbe4476 |
children | 5690a6211e8c |
files | bitstream.h |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/bitstream.h Sun Jan 25 16:59:48 2009 +0000 +++ b/bitstream.h Sun Jan 25 18:12:13 2009 +0000 @@ -198,10 +198,7 @@ if (n >= bit_left) { #if !HAVE_FAST_UNALIGNED if (3 & (intptr_t) s->buf_ptr) { - s->buf_ptr[0] = bit_buf ; - s->buf_ptr[1] = bit_buf >> 8; - s->buf_ptr[2] = bit_buf >> 16; - s->buf_ptr[3] = bit_buf >> 24; + AV_WL32(s->buf_ptr, bit_buf); } else #endif *(uint32_t *)s->buf_ptr = le2me_32(bit_buf); @@ -219,10 +216,7 @@ bit_buf |= value >> (n - bit_left); #if !HAVE_FAST_UNALIGNED if (3 & (intptr_t) s->buf_ptr) { - s->buf_ptr[0] = bit_buf >> 24; - s->buf_ptr[1] = bit_buf >> 16; - s->buf_ptr[2] = bit_buf >> 8; - s->buf_ptr[3] = bit_buf ; + AV_WB32(s->buf_ptr, bit_buf); } else #endif *(uint32_t *)s->buf_ptr = be2me_32(bit_buf);