diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-02 21:58:56 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-02 21:58:56 +0000 |
commit | 92afdd9267027f569dea2807d7057eaa2bbdb8c9 (patch) | |
tree | a715e06f0c0c9cc2e8074255935f3f0f9665f164 /src/libffmpeg/libavcodec/common.h | |
parent | 0c94a4778c29309553e86e8c39f314277f4b2ddf (diff) | |
download | xine-lib-92afdd9267027f569dea2807d7057eaa2bbdb8c9.tar.gz xine-lib-92afdd9267027f569dea2807d7057eaa2bbdb8c9.tar.bz2 |
update ffmpeg, pass fourcc and other stuff that might be useful
CVS patchset: 3414
CVS date: 2002/12/02 21:58:56
Diffstat (limited to 'src/libffmpeg/libavcodec/common.h')
-rw-r--r-- | src/libffmpeg/libavcodec/common.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/common.h b/src/libffmpeg/libavcodec/common.h index 348fb7d3f..9dfd7dcda 100644 --- a/src/libffmpeg/libavcodec/common.h +++ b/src/libffmpeg/libavcodec/common.h @@ -256,6 +256,10 @@ typedef struct RL_VLC_ELEM { uint8_t run; } RL_VLC_ELEM; +#ifdef ARCH_SPARC64 +#define UNALIGNED_STORES_ARE_BAD +#endif + /* used to avoid missaligned exceptions on some archs (alpha, ...) */ #ifdef ARCH_X86 # define unaligned32(a) (*(UINT32*)(a)) @@ -302,6 +306,14 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) } else { bit_buf<<=bit_left; bit_buf |= value >> (n - bit_left); +#ifdef UNALIGNED_STORES_ARE_BAD + if (3 & (int) 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 ; + } else +#endif *(UINT32 *)s->buf_ptr = be2me_32(bit_buf); //printf("bitbuf = %08x\n", bit_buf); s->buf_ptr+=4; @@ -850,6 +862,8 @@ static inline int ff_get_fourcc(const char *s){ return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24); } +void ff_float2fraction(int *nom_arg, int *denom_arg, double f, int max); + #ifdef ARCH_X86 #define MASK_ABS(mask, level)\ |