mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-12 01:29:29 +00:00
Add some rudimentary support for sparc64
Originally committed as revision 1279 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
b55e4ef43d
commit
35fedfc349
3
configure
vendored
3
configure
vendored
@ -485,6 +485,9 @@ elif test "$cpu" = "armv4l" ; then
|
|||||||
elif test "$cpu" = "alpha" ; then
|
elif test "$cpu" = "alpha" ; then
|
||||||
echo "TARGET_ARCH_ALPHA=yes" >> config.mak
|
echo "TARGET_ARCH_ALPHA=yes" >> config.mak
|
||||||
echo "#define ARCH_ALPHA 1" >> $TMPH
|
echo "#define ARCH_ALPHA 1" >> $TMPH
|
||||||
|
elif test "$cpu" = "sparc64" ; then
|
||||||
|
echo "TARGET_ARCH_SPARC64=yes" >> config.mak
|
||||||
|
echo "#define ARCH_SPARC64 1" >> $TMPH
|
||||||
elif test "$cpu" = "powerpc" ; then
|
elif test "$cpu" = "powerpc" ; then
|
||||||
echo "TARGET_ARCH_POWERPC=yes" >> config.mak
|
echo "TARGET_ARCH_POWERPC=yes" >> config.mak
|
||||||
echo "#define ARCH_POWERPC 1" >> $TMPH
|
echo "#define ARCH_POWERPC 1" >> $TMPH
|
||||||
|
@ -248,6 +248,10 @@ typedef struct RL_VLC_ELEM {
|
|||||||
uint8_t run;
|
uint8_t run;
|
||||||
} RL_VLC_ELEM;
|
} RL_VLC_ELEM;
|
||||||
|
|
||||||
|
#ifdef ARCH_SPARC64
|
||||||
|
#define UNALIGNED_STORES_ARE_BAD
|
||||||
|
#endif
|
||||||
|
|
||||||
/* used to avoid missaligned exceptions on some archs (alpha, ...) */
|
/* used to avoid missaligned exceptions on some archs (alpha, ...) */
|
||||||
#ifdef ARCH_X86
|
#ifdef ARCH_X86
|
||||||
# define unaligned32(a) (*(UINT32*)(a))
|
# define unaligned32(a) (*(UINT32*)(a))
|
||||||
@ -294,6 +298,14 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
|
|||||||
} else {
|
} else {
|
||||||
bit_buf<<=bit_left;
|
bit_buf<<=bit_left;
|
||||||
bit_buf |= value >> (n - 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);
|
*(UINT32 *)s->buf_ptr = be2me_32(bit_buf);
|
||||||
//printf("bitbuf = %08x\n", bit_buf);
|
//printf("bitbuf = %08x\n", bit_buf);
|
||||||
s->buf_ptr+=4;
|
s->buf_ptr+=4;
|
||||||
|
Loading…
Reference in New Issue
Block a user