Commit 80949af2 authored by David Conrad's avatar David Conrad Committed by Fiona Glaser

Disable Altivec and VIS optimizations when --disable-asm is specified

parent 9eb6ec9f
...@@ -75,10 +75,12 @@ endif ...@@ -75,10 +75,12 @@ endif
# AltiVec optims # AltiVec optims
ifeq ($(ARCH),PPC) ifeq ($(ARCH),PPC)
ifneq ($(AS),)
SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \ SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
common/ppc/quant.c common/ppc/deblock.c \ common/ppc/quant.c common/ppc/deblock.c \
common/ppc/predict.c common/ppc/predict.c
endif endif
endif
# NEON optims # NEON optims
ifeq ($(ARCH),ARM) ifeq ($(ARCH),ARM)
......
...@@ -491,7 +491,7 @@ void x264_dct_init( int cpu, x264_dct_function_t *dctf ) ...@@ -491,7 +491,7 @@ void x264_dct_init( int cpu, x264_dct_function_t *dctf )
#endif //HAVE_MMX #endif //HAVE_MMX
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
{ {
dctf->sub4x4_dct = x264_sub4x4_dct_altivec; dctf->sub4x4_dct = x264_sub4x4_dct_altivec;
...@@ -742,7 +742,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced ) ...@@ -742,7 +742,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
} }
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
pf->scan_4x4 = x264_zigzag_scan_4x4_field_altivec; pf->scan_4x4 = x264_zigzag_scan_4x4_field_altivec;
#endif #endif
...@@ -771,7 +771,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced ) ...@@ -771,7 +771,7 @@ void x264_zigzag_init( int cpu, x264_zigzag_function_t *pf, int b_interlaced )
} }
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
pf->scan_4x4 = x264_zigzag_scan_4x4_frame_altivec; pf->scan_4x4 = x264_zigzag_scan_4x4_frame_altivec;
#endif #endif
......
...@@ -913,13 +913,13 @@ void x264_deblock_init( int cpu, x264_deblock_function_t *pf ) ...@@ -913,13 +913,13 @@ void x264_deblock_init( int cpu, x264_deblock_function_t *pf )
} }
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
{ {
pf->deblock_v_luma = x264_deblock_v_luma_altivec; pf->deblock_v_luma = x264_deblock_v_luma_altivec;
pf->deblock_h_luma = x264_deblock_h_luma_altivec; pf->deblock_h_luma = x264_deblock_h_luma_altivec;
} }
#endif // ARCH_PPC #endif // HAVE_ALTIVEC
#ifdef HAVE_ARMV6 #ifdef HAVE_ARMV6
if( cpu&X264_CPU_NEON ) if( cpu&X264_CPU_NEON )
......
...@@ -502,7 +502,7 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf ) ...@@ -502,7 +502,7 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf )
#ifdef HAVE_MMX #ifdef HAVE_MMX
x264_mc_init_mmx( cpu, pf ); x264_mc_init_mmx( cpu, pf );
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
x264_mc_altivec_init( pf ); x264_mc_altivec_init( pf );
#endif #endif
......
...@@ -862,7 +862,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf ) ...@@ -862,7 +862,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
} }
} }
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
{ {
x264_pixel_altivec_init( pixf ); x264_pixel_altivec_init( pixf );
......
...@@ -754,7 +754,7 @@ void x264_predict_16x16_init( int cpu, x264_predict_t pf[7] ) ...@@ -754,7 +754,7 @@ void x264_predict_16x16_init( int cpu, x264_predict_t pf[7] )
x264_predict_16x16_init_mmx( cpu, pf ); x264_predict_16x16_init_mmx( cpu, pf );
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
{ {
x264_predict_16x16_init_altivec( pf ); x264_predict_16x16_init_altivec( pf );
...@@ -780,7 +780,7 @@ void x264_predict_8x8c_init( int cpu, x264_predict_t pf[7] ) ...@@ -780,7 +780,7 @@ void x264_predict_8x8c_init( int cpu, x264_predict_t pf[7] )
x264_predict_8x8c_init_mmx( cpu, pf ); x264_predict_8x8c_init_mmx( cpu, pf );
#endif #endif
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) if( cpu&X264_CPU_ALTIVEC )
{ {
x264_predict_8x8c_init_altivec( pf ); x264_predict_8x8c_init_altivec( pf );
......
...@@ -380,7 +380,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf ) ...@@ -380,7 +380,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
} }
#endif // HAVE_MMX #endif // HAVE_MMX
#ifdef ARCH_PPC #ifdef HAVE_ALTIVEC
if( cpu&X264_CPU_ALTIVEC ) { if( cpu&X264_CPU_ALTIVEC ) {
pf->quant_2x2_dc = x264_quant_2x2_dc_altivec; pf->quant_2x2_dc = x264_quant_2x2_dc_altivec;
pf->quant_4x4_dc = x264_quant_4x4_dc_altivec; pf->quant_4x4_dc = x264_quant_4x4_dc_altivec;
......
...@@ -12,7 +12,7 @@ echo " --disable-lavf-input disables libavformat input" ...@@ -12,7 +12,7 @@ echo " --disable-lavf-input disables libavformat input"
echo " --disable-ffms-input disables ffmpegsource input" echo " --disable-ffms-input disables ffmpegsource input"
echo " --disable-mp4-output disables mp4 output (using gpac)" echo " --disable-mp4-output disables mp4 output (using gpac)"
echo " --disable-pthread disables multithreaded encoding" echo " --disable-pthread disables multithreaded encoding"
echo " --disable-asm disables assembly optimizations on x86 and arm" echo " --disable-asm disables platform-specific assembly optimizations"
echo " --enable-debug adds -g, doesn't strip" echo " --enable-debug adds -g, doesn't strip"
echo " --enable-gprof adds -pg, doesn't strip" echo " --enable-gprof adds -pg, doesn't strip"
echo " --enable-visualize enables visualization (X11 only)" echo " --enable-visualize enables visualization (X11 only)"
...@@ -348,20 +348,23 @@ case $host_cpu in ...@@ -348,20 +348,23 @@ case $host_cpu in
;; ;;
powerpc|powerpc64) powerpc|powerpc64)
ARCH="PPC" ARCH="PPC"
if [ $SYS = MACOSX ] if [ $asm = yes ] ; then
then define HAVE_ALTIVEC
CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4" AS="${AS-${cross_prefix}gcc}"
else if [ $SYS = MACOSX ] ; then
CFLAGS="$CFLAGS -maltivec -mabi=altivec" CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4"
define HAVE_ALTIVEC_H else
CFLAGS="$CFLAGS -maltivec -mabi=altivec"
define HAVE_ALTIVEC_H
fi
fi fi
;; ;;
sparc) sparc)
if test "$(uname -m)" = "sun4u"; then if [ $asm = yes ] && test "$(uname -m)" = "sun4u"; then
ARCH="UltraSparc" ARCH="UltraSparc"
CFLAGS="$CFLAGS -mcpu=ultrasparc" CFLAGS="$CFLAGS -mcpu=ultrasparc"
LDFLAGS="$LDFLAGS -mcpu=ultrasparc" LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
AS="${cross_prefix}as" AS="${AS-${cross_prefix}as}"
ASFLAGS="$ASFLAGS -xarch=v8plusa" ASFLAGS="$ASFLAGS -xarch=v8plusa"
else else
ARCH="Sparc" ARCH="Sparc"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment