* More cleanup and removal of code duplication in the Jamfiles. Moved

the HAIKU_FFMPEG_DEFINES and friends to the toplevel ffmpeg Jamfile.
* Define the X86 CPU acceleration features in global Jamfile variables,
  so that we can build specific source files depending on those defines
  later (used for libavcodec_x86.a).
* In config.h, a whole bunch of parsers were defined off, which was the
  actual reason why plain old .MPG files and also my .MTS streams with
  H.264 video gave only scrambled video.
* Removed some files from the build by comparing which files are build
  by a pristine FFmpeg libavcodec Makefile.

Attention: The following changes may break the GCC2 build:
* Remove Haiku specific changes from
	- libavcodec/x86/cavsdsp_mmx.c
	- libavcodec/x86/dsputil_mmx.c
	- libavcodec/x86/h264dsp_mmx.c

I will test this next after switching my GCC. If you are impatiant, the
following changes were previously done to the pristine FFmpeg 0.5 files:

libavcodec/x86/cavsdsp_mmx.c:
* commented out line 426 to 429

libavcodec/x86/h264dsp_mmx.c
* h264_loop_filter_strength_mmx2() was commented out.

libavcodec/x86/dsputil_mmx.c
* gmc_mmx() was commented out.
* commented out line 2665 (assigning c->gmc)
* commented out line 2786 (assigning c->h264_loop_filter_strength)

However, I would now make similar changes by checking the GCC version. Also,
the libavcodec/x86/dsputil_mmx.c:2786 was still assigning the dummy
h264_loop_filter_strength_mmx2() version.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31506 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-07-10 14:34:11 +00:00
parent 41077a99de
commit 4c3fe04bd3
13 changed files with 153 additions and 186 deletions
+51
View File
@@ -32,6 +32,57 @@ Addon ffmpeg :
$(TARGET_LIBSUPC++)
;
# FFmpeg libs configuration is in the config.h header. Architecture specific
# defines have been commented out there and are being defined here instead.
# NOTE: These are intentionally global variables, so we can re-use them in
# sub-folders.
HAIKU_FFMPEG_DEFINES = HAVE_AV_CONFIG_H _FILE_OFFSET_BITS=64
_LARGEFILE_SOURCE ;
HAIKU_FFMPEG_USE_MMX = 1 ;
HAIKU_FFMPEG_USE_MMX2 = 1 ;
HAIKU_FFMPEG_USE_SSE = 0 ;
HAIKU_FFMPEG_USE_SSSE3 = 1 ;
HAIKU_FFMPEG_USE_AMD3DNOW = 0 ;
HAIKU_FFMPEG_USE_AMD3DNOWEXT = 0 ;
HAIKU_FFMPEG_GCC_EXTRA_FLAGS = ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -fno-pic ;
} else {
HAIKU_FFMPEG_GCC_EXTRA_FLAGS = -fomit-frame-pointer -DPIC ;
}
if $(TARGET_ARCH) = x86 {
HAIKU_FFMPEG_DEFINES += ARCH_X86=1 ARCH_X86_32=1 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=$(HAIKU_FFMPEG_USE_AMD3DNOW) ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOWEXT=$(HAIKU_FFMPEG_USE_AMD3DNOWEXT) ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=$(HAIKU_FFMPEG_USE_MMX) ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX2=$(HAIKU_FFMPEG_USE_MMX2) ;
HAIKU_FFMPEG_DEFINES += HAVE_SSE=$(HAIKU_FFMPEG_USE_SSE) ;
HAIKU_FFMPEG_DEFINES += HAVE_SSSE3=$(HAIKU_FFMPEG_USE_SSSE3) ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
} else if $(TARGET_ARCH) = ppc {
HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=1 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=1 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
} else if $(TARGET_ARCH) = sparc {
HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=1 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=1 ;
}
HAIKU_FFMPEG_DEFINES = [ FDefines $(HAIKU_FFMPEG_DEFINES) ] ;
SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ;
SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavformat ;
SubInclude HAIKU_TOP src add-ons media plugins ffmpeg libavutil ;
+20 -20
View File
@@ -95,7 +95,7 @@
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SOUNDCARD_H 0
#define HAVE_SYS_VIDEOIO_H 0
#define HAVE_TEN_OPERANDS 0
#define HAVE_TEN_OPERANDS 1
#define HAVE_TERMIOS_H 1
#define HAVE_THREADS 1
#define HAVE_TRUNCF 1
@@ -485,25 +485,25 @@
#define CONFIG_LIBVORBIS_ENCODER 0
#define CONFIG_LIBX264_ENCODER 0
#define CONFIG_LIBXVID_ENCODER 0
#define CONFIG_AAC_PARSER 0
#define CONFIG_AC3_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
#define CONFIG_DVDSUB_PARSER 0
#define CONFIG_H261_PARSER 0
#define CONFIG_H263_PARSER 0
#define CONFIG_H264_PARSER 0
#define CONFIG_MJPEG_PARSER 0
#define CONFIG_MLP_PARSER 0
#define CONFIG_MPEG4VIDEO_PARSER 0
#define CONFIG_MPEGAUDIO_PARSER 0
#define CONFIG_MPEGVIDEO_PARSER 0
#define CONFIG_PNM_PARSER 0
#define CONFIG_VC1_PARSER 0
#define CONFIG_VP3_PARSER 0
#define CONFIG_AAC_PARSER 1
#define CONFIG_AC3_PARSER 1
#define CONFIG_CAVSVIDEO_PARSER 1
#define CONFIG_DCA_PARSER 1
#define CONFIG_DIRAC_PARSER 1
#define CONFIG_DNXHD_PARSER 1
#define CONFIG_DVBSUB_PARSER 1
#define CONFIG_DVDSUB_PARSER 1
#define CONFIG_H261_PARSER 1
#define CONFIG_H263_PARSER 1
#define CONFIG_H264_PARSER 1
#define CONFIG_MJPEG_PARSER 1
#define CONFIG_MLP_PARSER 1
#define CONFIG_MPEG4VIDEO_PARSER 1
#define CONFIG_MPEGAUDIO_PARSER 1
#define CONFIG_MPEGVIDEO_PARSER 1
#define CONFIG_PNM_PARSER 1
#define CONFIG_VC1_PARSER 1
#define CONFIG_VP3_PARSER 1
#define CONFIG_DUMP_EXTRADATA_BSF 1
#define CONFIG_H264_MP4TOANNEXB_BSF 1
#define CONFIG_IMX_DUMP_HEADER_BSF 1
@@ -11,43 +11,7 @@ UseLibraryHeaders zlib ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
SubDirCcFlags -fomit-frame-pointer -fno-pic ;
} else {
SubDirCcFlags -fomit-frame-pointer -DPIC ;
}
# NOTE: This is intentionally a global variable, so we can re-use it in
# sub-folders.
HAIKU_FFMPEG_DEFINES = HAVE_AV_CONFIG_H=1 ;
if $(TARGET_ARCH) = x86 {
HAIKU_FFMPEG_DEFINES += ARCH_X86=1 ARCH_X86_32=1 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=1 HAVE_MMX2=1 HAVE_SSE=0 HAVE_SSSE3=1 ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
} else if $(TARGET_ARCH) = ppc {
HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=1 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=1 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=0 ;
} else if $(TARGET_ARCH) = sparc {
HAIKU_FFMPEG_DEFINES += ARCH_X86=0 ARCH_X86_32=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_PPC=0 ;
HAIKU_FFMPEG_DEFINES += ARCH_SPARC=1 ;
HAIKU_FFMPEG_DEFINES += HAVE_AMD3DNOW=0 HAVE_AMD3DNOWEXT=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_MMX=0 HAVE_MMX2=0 HAVE_SSE=0 HAVE_SSSE3=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_ALTIVEC=0 ;
HAIKU_FFMPEG_DEFINES += HAVE_VIS=1 ;
}
HAIKU_FFMPEG_DEFINES = [ FDefines $(HAIKU_FFMPEG_DEFINES) ] ;
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
@@ -100,6 +64,7 @@ StaticLibrary libavcodec.a :
dca.c
dca_parser.c
dirac_parser.c
dnxhd_parser.c
dnxhddata.c
dnxhddec.c
dpcm.c
@@ -126,7 +91,7 @@ StaticLibrary libavcodec.a :
faandct.c
faanidct.c
faxcompr.c
fdctref.c
# fdctref.c
fft.c
ffv1.c
flacdec.c
@@ -147,7 +112,7 @@ StaticLibrary libavcodec.a :
h264.c
h264_mp4toannexb_bsf.c
h264_parser.c
h264dspenc.c
# h264dspenc.c
h264idct.c
h264pred.c
huffman.c
@@ -155,6 +120,7 @@ StaticLibrary libavcodec.a :
idcinvideo.c
imc.c
imgconvert.c
imgresample.c
imx_dump_header_bsf.c
indeo2.c
indeo3.c
@@ -172,9 +138,9 @@ StaticLibrary libavcodec.a :
# ljpegenc.c
loco.c
lpc.c
lsp.c
# lsp.c
lzw.c
lzwenc.c
# lzwenc.c
mace.c
mdct.c
mdec.c
@@ -246,7 +212,7 @@ StaticLibrary libavcodec.a :
resample2.c
rl2.c
rle.c
roqaudioenc.c
# roqaudioenc.c
roqvideo.c
roqvideodec.c
# roqvideoenc.c
@@ -26,7 +26,6 @@
#include <stdint.h>
#include "avcodec.h"
#include "libavutil/pixfmt.h"
/**
* Logs a generic warning message about a missing feature.
@@ -9,15 +9,10 @@ SubDirHdrs [ FDirName $(SUBDIR) ../../libswscale ] ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
SubDirCcFlags -fomit-frame-pointer -fno-pic ;
} else {
SubDirCcFlags -fomit-frame-pointer -DPIC ;
}
# Enable altivec support
SubDirCcFlags -maltivec -mabi=altivec ;
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
@@ -9,12 +9,7 @@ SubDirHdrs [ FDirName $(SUBDIR) ../../libswscale ] ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
SubDirCcFlags -fomit-frame-pointer -fno-pic ;
} else {
SubDirCcFlags -fomit-frame-pointer -DPIC ;
}
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
@@ -9,39 +9,60 @@ SubDirHdrs [ FDirName $(SUBDIR) ../../libswscale ] ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
SubDirCcFlags -fomit-frame-pointer -fno-pic ;
} else {
SubDirCcFlags -fomit-frame-pointer -DPIC ;
}
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
StaticLibrary libavcodec_x86.a :
cpuid.c
cavsdsp_mmx.c
idct_mmx.c
idct_mmx_xvid.c
idct_sse2_xvid.c
dsputil_mmx.c
# dsputilenc_mmx.c
fft_3dn.c
fft_3dn2.c
fft_sse.c
h264_idct_sse2.nasm
h264_deblock_sse2.nasm
fft_mmx.nasm
dsputil_yasm.nasm
simple_idct_mmx.c
motion_est_mmx.c
mpegvideo_mmx.c
rv40dsp_mmx.c
vc1dsp_mmx.c
vp3dsp_mmx.c
vp3dsp_sse2.c
vp6dsp_mmx.c
vp6dsp_sse2.c
fdct_mmx.c
;
local mmxSources = ;
if $(HAIKU_FFMPEG_USE_MMX) = 1 {
mmxSources =
cpuid.c
cavsdsp_mmx.c
dsputil_mmx.c
# dsputilenc_mmx.c # For when we enable encoders.
fdct_mmx.c
# idct_mmx.c # GPL
idct_mmx_xvid.c
motion_est_mmx.c
mpegvideo_mmx.c
rv40dsp_mmx.c
simple_idct_mmx.c
vc1dsp_mmx.c
vp3dsp_mmx.c
vp6dsp_mmx.c
fft_mmx.nasm
dsputil_yasm.nasm
;
}
local sseSources = ;
#if $(HAIKU_FFMPEG_USE_SSE) = 1 {
if $(HAIKU_FFMPEG_USE_SSSE3) = 1 {
sseSources =
fft_sse.c
idct_sse2_xvid.c
vp3dsp_sse2.c
vp6dsp_sse2.c
h264_idct_sse2.nasm
h264_deblock_sse2.nasm
;
}
local amdSources = ;
if $(HAIKU_FFMPEG_USE_AMD3DNOW) = 1 {
amdSources =
fft_3dn.c
;
}
if $(HAIKU_FFMPEG_USE_AMD3DNOWEXT) = 1 {
amdSources +=
fft_3dn2.c
;
}
StaticLibrary libavcodec_x86.a :
$(mmxSources)
$(sseSources)
$(amdSources)
;
@@ -423,12 +423,10 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
"pavgb " #temp ", " #a " \n\t"\
"mov" #size " " #a ", " #b " \n\t"
#ifndef __HAIKU__
QPEL_CAVS(put_, PUT_OP, 3dnow)
QPEL_CAVS(avg_, AVG_3DNOW_OP, 3dnow)
QPEL_CAVS(put_, PUT_OP, mmx2)
QPEL_CAVS(avg_, AVG_MMX2_OP, mmx2)
#endif
CAVS_MC(put_, 8, 3dnow)
CAVS_MC(put_, 16,3dnow)
@@ -1639,7 +1639,6 @@ QPEL_2TAP(avg_, 8, 3dnow)
static void just_return(void) { return; }
#endif
#ifndef __HAIKU__
static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy,
int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){
const int w = 8;
@@ -1758,12 +1757,6 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o
}
}
#else
static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy,
int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){
}
#endif
#define PREFETCH(name, op) \
static void name(void *mem, int stride, int h){\
const uint8_t *p= mem;\
@@ -2669,7 +2662,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
SET_HPEL_FUNCS(avg, 1, 8, mmx);
SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx);
c->gmc= ff_gmc_c;
c->gmc= gmc_mmx;
c->add_bytes= add_bytes_mmx;
c->add_bytes_l2= add_bytes_l2_mmx;
@@ -792,8 +792,6 @@ static void h264_h_loop_filter_chroma_intra_mmx2(uint8_t *pix, int stride, int a
transpose4x4(pix-2+4*stride, trans+4, stride, 8);
}
#ifndef __HAIKU__
static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) {
int dir;
@@ -897,11 +895,6 @@ static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40]
);
}
#else
static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) {
}
#endif
/***********************************/
/* motion compensation */
@@ -10,38 +10,9 @@ UseLibraryHeaders zlib ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
if $(HAIKU_GCC_VERSION[1]) >= 3 {
SubDirCcFlags -fomit-frame-pointer -fno-pic ;
} else {
SubDirCcFlags -fomit-frame-pointer -DPIC ;
}
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 ;
} 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 ;
}
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
StaticLibrary libavformat.a :
4xm.c
@@ -7,8 +7,13 @@ TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
SubDirHdrs [ FDirName $(SUBDIR) .. ] ;
SubDirHdrs [ FDirName $(SUBDIR) ../libavcodec ] ;
SubDirCcFlags -fomit-frame-pointer -DPIC ;
#SubDirCcFlags -DHAVE_AV_CONFIG_H=1 ;
# filter warnings we don't want here
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
StaticLibrary libavutil.a :
adler32.c
@@ -8,40 +8,20 @@ SubDirHdrs [ FDirName $(SUBDIR) ../libavcodec ] ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
SubDirCcFlags -fomit-frame-pointer -DPIC ;
local arch_sources ;
arch_sources = ;
local defines ;
defines = HAVE_AV_CONFIG_H=1 ;
local archSources ;
archSources = ;
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 HAVE_ALTIVEC_H=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 HAVE_ALTIVEC_H=1 ;
defines += HAVE_VIS=0 ;
arch_sources = yuv2rgb_altivec.c ;
archSources = yuv2rgb_altivec.c ;
SubDirCcFlags -maltivec -mabi=altivec ;
} 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 HAVE_ALTIVEC_H=0 ;
defines += HAVE_VIS=1 ;
arch_sources = yuv2rgb_vis.c ;
archSources = yuv2rgb_vis.c ;
}
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
SubDirCcFlags $(HAIKU_FFMPEG_GCC_EXTRA_FLAGS) ;
SubDirCcFlags $(HAIKU_FFMPEG_DEFINES) ;
SubDirC++Flags $(HAIKU_FFMPEG_DEFINES) ;
StaticLibrary libswscale.a :
rgb2rgb.c
@@ -49,5 +29,5 @@ StaticLibrary libswscale.a :
swscale_avoption.c
yuv2rgb.c
$(arch_sources)
$(archSources)
;