diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
commit | 6e8ff6e5c232de4b8235626af31ab85345120a93 (patch) | |
tree | 25930156aa9f4f2014bf6fe3d65c183262626b8d /src/libffmpeg/libavutil/intreadwrite.h | |
parent | 2f5905081ee2040537f043fe4afabbb66d26354e (diff) | |
download | xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.gz xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.bz2 |
* ffmpeg update to 51.28.0
* Workaround ffmpeg buggy codecs that don't release their DR1 frames.
* Fix several segfaults and freezing problem with H264 streams that use a lot
of reference frames (eg. 15)
* Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in
groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs
Think of "uncommon" codecs what people would never want to play with their
PDAs (they will save memory by removing them).
Note: currently both uncommon/popular codecs are _build_ but disabled.
that is, build system still need some improvements to really save memory.
warning: non-autoconf guru playing with the build system, likely breakage.
CVS patchset: 8499
CVS date: 2007/01/13 21:19:52
Diffstat (limited to 'src/libffmpeg/libavutil/intreadwrite.h')
-rw-r--r-- | src/libffmpeg/libavutil/intreadwrite.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/libffmpeg/libavutil/intreadwrite.h b/src/libffmpeg/libavutil/intreadwrite.h new file mode 100644 index 000000000..c43f9d651 --- /dev/null +++ b/src/libffmpeg/libavutil/intreadwrite.h @@ -0,0 +1,42 @@ +#ifndef INTREADWRITE_H +#define INTREADWRITE_H + +#ifdef __GNUC__ + +struct unaligned_64 { uint64_t l; } __attribute__((packed)); +struct unaligned_32 { uint32_t l; } __attribute__((packed)); +struct unaligned_16 { uint16_t l; } __attribute__((packed)); + +#define LD16(a) (((const struct unaligned_16 *) (a))->l) +#define LD32(a) (((const struct unaligned_32 *) (a))->l) +#define LD64(a) (((const struct unaligned_64 *) (a))->l) + +#define ST16(a, b) (((struct unaligned_16 *) (a))->l) = (b) +#define ST32(a, b) (((struct unaligned_32 *) (a))->l) = (b) + +#else /* __GNUC__ */ + +#define LD16(a) (*((uint16_t*)(a))) +#define LD32(a) (*((uint32_t*)(a))) +#define LD64(a) (*((uint64_t*)(a))) + +#define ST16(a, b) *((uint16_t*)(a)) = (b) +#define ST32(a, b) *((uint32_t*)(a)) = (b) + +#endif /* !__GNUC__ */ + +/* endian macros */ +#if !defined(BE_16) || !defined(BE_32) || !defined(LE_16) || !defined(LE_32) +#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) +#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ + (((uint8_t*)(x))[1] << 16) | \ + (((uint8_t*)(x))[2] << 8) | \ + ((uint8_t*)(x))[3]) +#define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0]) +#define LE_32(x) ((((uint8_t*)(x))[3] << 24) | \ + (((uint8_t*)(x))[2] << 16) | \ + (((uint8_t*)(x))[1] << 8) | \ + ((uint8_t*)(x))[0]) +#endif + +#endif /* INTREADWRITE_H */ |