Commit 22521cec authored by mru's avatar mru

Replace UNALIGNED_STORES_ARE_BAD with !HAVE_FAST_UNALIGNED

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16364 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ad1800e7
...@@ -179,10 +179,6 @@ typedef struct RL_VLC_ELEM { ...@@ -179,10 +179,6 @@ typedef struct RL_VLC_ELEM {
uint8_t run; uint8_t run;
} RL_VLC_ELEM; } RL_VLC_ELEM;
#if defined(ARCH_SPARC) || defined(ARCH_ARM) || defined(ARCH_MIPS) || defined(ARCH_BFIN)
#define UNALIGNED_STORES_ARE_BAD
#endif
#ifndef ALT_BITSTREAM_WRITER #ifndef ALT_BITSTREAM_WRITER
static inline void put_bits(PutBitContext *s, int n, unsigned int value) static inline void put_bits(PutBitContext *s, int n, unsigned int value)
{ {
...@@ -200,7 +196,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) ...@@ -200,7 +196,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) {
#ifdef UNALIGNED_STORES_ARE_BAD #ifndef HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) { if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf ; s->buf_ptr[0] = bit_buf ;
s->buf_ptr[1] = bit_buf >> 8; s->buf_ptr[1] = bit_buf >> 8;
...@@ -221,7 +217,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) ...@@ -221,7 +217,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);
#ifdef UNALIGNED_STORES_ARE_BAD #ifndef HAVE_FAST_UNALIGNED
if (3 & (intptr_t) s->buf_ptr) { if (3 & (intptr_t) s->buf_ptr) {
s->buf_ptr[0] = bit_buf >> 24; s->buf_ptr[0] = bit_buf >> 24;
s->buf_ptr[1] = bit_buf >> 16; s->buf_ptr[1] = bit_buf >> 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment