From 92afdd9267027f569dea2807d7057eaa2bbdb8c9 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 2 Dec 2002 21:58:56 +0000 Subject: update ffmpeg, pass fourcc and other stuff that might be useful CVS patchset: 3414 CVS date: 2002/12/02 21:58:56 --- src/libffmpeg/libavcodec/common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libffmpeg/libavcodec/common.h') 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)\ -- cgit v1.2.3