From 40d058a6286c205f66d2e82b6eac52af08642d55 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Thu, 16 Apr 2009 23:11:02 +0000 Subject: [PATCH] Enabled ppc and sparc specific yuv2rgb convertion code. UNTESTED yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30214 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/plugins/avcodec/libswscale/Jamfile | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/add-ons/media/plugins/avcodec/libswscale/Jamfile b/src/add-ons/media/plugins/avcodec/libswscale/Jamfile index d2cea3e719..2480ec6961 100644 --- a/src/add-ons/media/plugins/avcodec/libswscale/Jamfile +++ b/src/add-ons/media/plugins/avcodec/libswscale/Jamfile @@ -9,11 +9,44 @@ TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS) : -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ; SubDirCcFlags -fomit-frame-pointer -DPIC ; -#SubDirCcFlags -DHAVE_AV_CONFIG_H=1 ; + +local arch_sources ; +arch_sources = ; +local defines ; +defines = HAVE_AV_CONFIG_H=1 ; + +if $(TARGET_ARCH) = x86 { + defines += ARCH_X86=1 ARCH_X86_32=1 ARCH_PPC=0 ARCH_SPARC=0 ; + defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; + defines += HAVE_MMX=1 HAVE_MMX2=1 HAVE_SSE=0 HAVE_SSE3=1 ; + defines += HAVE_ALTIVEC=0 ; + defines += HAVE_VIS=0 ; +} else if $(TARGET_ARCH) = ppc { + defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=1 ARCH_SPARC=0 ; + defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; + defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; + defines += HAVE_ALTIVEC=1 ; + defines += HAVE_VIS=0 ; + arch_sources = yuv2rgb_altivec.c ; +} else if $(TARGET_ARCH) = sparc { + defines += ARCH_X86=0 ARCH_X86_32=0 ARCH_PPC=0 ARCH_SPARC=1 ; + defines += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ; + defines += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSE3=0 ; + defines += HAVE_ALTIVEC=0 ; + defines += HAVE_VIS=1 ; + arch_sources = yuv2rgb_vis.c ; +} + +defines = [ FDefines $(defines) ] ; +SubDirCcFlags $(defines) ; +SubDirC++Flags $(defines) ; + StaticLibrary libswscale.a : rgb2rgb.c swscale.c swscale_avoption.c yuv2rgb.c + + $(arch_sources) ;