[Ffmpeg-devel] [BUG] alignment problems: existing support in bitstream.h
Christian Bienia
cbienia
Wed Sep 20 19:02:15 CEST 2006
Hi,
it looks like bitstream.h already supports aligned accesses, for
example:
#if defined(ARCH_SPARC) || defined(ARCH_ARMV4L) || defined(ARCH_MIPS)
#define UNALIGNED_STORES_ARE_BAD
#endif
and also:
#ifdef ALT_BITSTREAM_WRITER
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
{
# ifdef ALIGNED_BITSTREAM_WRITER
# if defined(ARCH_X86) || defined(ARCH_X86_64)
asm volatile(
[SNIP]
);
# else
[SNIP]
# endif
# else //ALIGNED_BITSTREAM_WRITER
# if defined(ARCH_X86) || defined(ARCH_X86_64)
asm volatile(
[SNIP]
);
# else
[SNIP]
# endif
# endif //!ALIGNED_BITSTREAM_WRITER
}
#endif
However, both ALT_BITSTREAM_WRITER and ALIGNED_BITSTREAM_WRITER are not
defined by default, and ffmpeg doesn't compile if they are defined. It
shouldn't be too hard to get alignment support to work again. Why was it
disabled?
- Chris
More information about the ffmpeg-devel
mailing list