Revision 23ae2b68 libavcodec/bitstream.h

View differences:

libavcodec/bitstream.h
179 179
    uint8_t run;
180 180
} RL_VLC_ELEM;
181 181

  
182
#if defined(ARCH_SPARC) || defined(ARCH_ARM) || defined(ARCH_MIPS) || defined(ARCH_BFIN)
183
#define UNALIGNED_STORES_ARE_BAD
184
#endif
185

  
186 182
#ifndef ALT_BITSTREAM_WRITER
187 183
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
188 184
{
......
200 196
#ifdef BITSTREAM_WRITER_LE
201 197
    bit_buf |= value << (32 - bit_left);
202 198
    if (n >= bit_left) {
203
#ifdef UNALIGNED_STORES_ARE_BAD
199
#ifndef HAVE_FAST_UNALIGNED
204 200
        if (3 & (intptr_t) s->buf_ptr) {
205 201
            s->buf_ptr[0] = bit_buf      ;
206 202
            s->buf_ptr[1] = bit_buf >>  8;
......
221 217
    } else {
222 218
        bit_buf<<=bit_left;
223 219
        bit_buf |= value >> (n - bit_left);
224
#ifdef UNALIGNED_STORES_ARE_BAD
220
#ifndef HAVE_FAST_UNALIGNED
225 221
        if (3 & (intptr_t) s->buf_ptr) {
226 222
            s->buf_ptr[0] = bit_buf >> 24;
227 223
            s->buf_ptr[1] = bit_buf >> 16;

Also available in: Unified diff