Originally committed as revision 3057 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
| @@ -115,9 +115,12 @@ case "$cpu" in | |||||
| mips) | mips) | ||||
| cpu="mips" | cpu="mips" | ||||
| ;; | ;; | ||||
| sun4u) | |||||
| sun4u|sparc64) | |||||
| cpu="sparc64" | cpu="sparc64" | ||||
| ;; | ;; | ||||
| sparc) | |||||
| cpu="sparc" | |||||
| ;; | |||||
| sh4) | sh4) | ||||
| cpu="sh4" | cpu="sh4" | ||||
| ;; | ;; | ||||
| @@ -1026,6 +1029,11 @@ elif test "$cpu" = "alpha" ; then | |||||
| elif test "$cpu" = "sparc64" ; then | elif test "$cpu" = "sparc64" ; then | ||||
| echo "TARGET_ARCH_SPARC64=yes" >> config.mak | echo "TARGET_ARCH_SPARC64=yes" >> config.mak | ||||
| echo "#define ARCH_SPARC64 1" >> $TMPH | echo "#define ARCH_SPARC64 1" >> $TMPH | ||||
| echo "TARGET_ARCH_SPARC=yes" >> config.mak | |||||
| echo "#define ARCH_SPARC 1" >> $TMPH | |||||
| elif test "$cpu" = "sparc" ; then | |||||
| echo "TARGET_ARCH_SPARC=yes" >> config.mak | |||||
| echo "#define ARCH_SPARC 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 | ||||
| @@ -161,12 +161,15 @@ ifeq ($(TARGET_ARCH_SH4),yes) | |||||
| OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o | OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o | ||||
| endif | endif | ||||
| ifeq ($(TARGET_ARCH_SPARC64),yes) | |||||
| ifeq ($(TARGET_ARCH_SPARC),yes) | |||||
| OBJS+=sparc/dsputil_vis.o | OBJS+=sparc/dsputil_vis.o | ||||
| sparc/%.o: sparc/%.c | |||||
| $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $< | |||||
| endif | |||||
| ifeq ($(TARGET_ARCH_SPARC64),yes) | |||||
| CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc | CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc | ||||
| endif | endif | ||||
| SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) | SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) | ||||
| OBJS := $(OBJS) $(ASM_OBJS) | OBJS := $(OBJS) $(ASM_OBJS) | ||||
| @@ -220,6 +223,7 @@ clean: $(CLEANAMR) | |||||
| ppc/*.o ppc/*~ \ | ppc/*.o ppc/*~ \ | ||||
| ps2/*.o ps2/*~ \ | ps2/*.o ps2/*~ \ | ||||
| sh4/*.o sh4/*~ \ | sh4/*.o sh4/*~ \ | ||||
| sparc/*.o sparc/*~ \ | |||||
| liba52/*.o liba52/*~ \ | liba52/*.o liba52/*~ \ | ||||
| apiexample $(TESTS) | apiexample $(TESTS) | ||||
| $(MAKE) -C libpostproc clean | $(MAKE) -C libpostproc clean | ||||
| @@ -372,7 +372,7 @@ typedef struct RL_VLC_ELEM { | |||||
| uint8_t run; | uint8_t run; | ||||
| } RL_VLC_ELEM; | } RL_VLC_ELEM; | ||||
| #ifdef ARCH_SPARC64 | |||||
| #ifdef ARCH_SPARC | |||||
| #define UNALIGNED_STORES_ARE_BAD | #define UNALIGNED_STORES_ARE_BAD | ||||
| #endif | #endif | ||||
| @@ -423,7 +423,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) | |||||
| 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 | #ifdef UNALIGNED_STORES_ARE_BAD | ||||
| if (3 & (int) s->buf_ptr) { | |||||
| if (3 & (intptr_t) s->buf_ptr) { | |||||
| s->buf_ptr[0] = bit_buf >> 24; | s->buf_ptr[0] = bit_buf >> 24; | ||||
| s->buf_ptr[1] = bit_buf >> 16; | s->buf_ptr[1] = bit_buf >> 16; | ||||
| s->buf_ptr[2] = bit_buf >> 8; | s->buf_ptr[2] = bit_buf >> 8; | ||||
| @@ -70,6 +70,10 @@ ifeq ($(CONFIG_VORBIS),yes) | |||||
| OBJS+= ogg.o | OBJS+= ogg.o | ||||
| endif | endif | ||||
| ifeq ($(TARGET_ARCH_SPARC64),yes) | |||||
| CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc | |||||
| endif | |||||
| LIB= $(LIBPREF)avformat$(LIBSUF) | LIB= $(LIBPREF)avformat$(LIBSUF) | ||||
| ifeq ($(BUILD_SHARED),yes) | ifeq ($(BUILD_SHARED),yes) | ||||
| SLIB= $(SLIBPREF)avformat$(SLIBSUF) | SLIB= $(SLIBPREF)avformat$(SLIBSUF) | ||||