Commit 83d7472b authored by hartman's avatar hartman

* gcc-4.0 fixes to the contribs

parent 2228ef32
......@@ -397,7 +397,7 @@ mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:
mpeg2dec: mpeg2dec-$(MPEG2DEC_VERSION).tar.gz
$(EXTRACT_GZ)
# patch -p 0 < Patches/mpeg2dec.patch
patch -p 0 < Patches/mpeg2dec.patch
.mpeg2: mpeg2dec
(cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) --without-x --disable-sdl && make && make install)
......@@ -636,6 +636,7 @@ libebml-$(LIBEBML_VERSION).tar.bz2:
libebml: libebml-$(LIBEBML_VERSION).tar.bz2
$(EXTRACT_BZ2)
patch -p 0 < Patches/libebml.patch
-rm -rf $@/CVS
.ebml: libebml
......
Index: src/EbmlFloat.cpp
===================================================================
--- src/EbmlFloat.cpp (revision 1099)
+++ src/EbmlFloat.cpp (revision 1101)
@@ -102,8 +102,8 @@
if (Size == 4) {
big_int32 TmpRead;
TmpRead.Eval(Buffer);
- float val = *((float *)&(int32(TmpRead)));
- Value = val;
+ int32 tmpp = int32(TmpRead);
+ Value = *((float *) &tmpp);
bValueIsSet = true;
} else if (Size == 8) {
big_int64 TmpRead;
diff -ru mpeg2dec-original/libmpeg2/convert/convert_internal.h mpeg2dec/libmpeg2/convert/convert_internal.h
--- mpeg2dec-original/libmpeg2/convert/convert_internal.h Fri Jan 23 10:07:50 2004
+++ mpeg2dec/libmpeg2/convert/convert_internal.h Thu Jul 22 23:40:41 2004
@@ -34,8 +34,10 @@
typedef void mpeg2convert_copy_t (void * id, uint8_t * const * src,
unsigned int v_offset);
+#ifndef __BEOS__
mpeg2convert_copy_t * mpeg2convert_rgb_mmxext (int bpp, int mode,
const mpeg2_sequence_t * seq);
+#endif
mpeg2convert_copy_t * mpeg2convert_rgb_mmx (int bpp, int mode,
const mpeg2_sequence_t * seq);
mpeg2convert_copy_t * mpeg2convert_rgb_vis (int bpp, int mode,
diff -ru mpeg2dec-original/libmpeg2/convert/rgb.c mpeg2dec/libmpeg2/convert/rgb.c
--- mpeg2dec-original/libmpeg2/convert/rgb.c Fri Jan 23 10:07:56 2004
+++ mpeg2dec/libmpeg2/convert/rgb.c Thu Jul 22 23:41:21 2004
@@ -500,10 +500,12 @@
int rgb_stride_min = ((bpp + 7) >> 3) * seq->width;
#ifdef ARCH_X86
+#ifndef __BEOS__
if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) {
convert420 = 0;
copy = mpeg2convert_rgb_mmxext (order, bpp, seq);
}
+#endif
if (!copy && (accel & MPEG2_ACCEL_X86_MMX)) {
convert420 = 0;
copy = mpeg2convert_rgb_mmx (order, bpp, seq);
diff -ru mpeg2dec-original/libmpeg2/convert/rgb_mmx.c mpeg2dec/libmpeg2/convert/rgb_mmx.c
--- mpeg2dec-original/libmpeg2/convert/rgb_mmx.c Fri Jan 23 10:07:58 2004
+++ mpeg2dec/libmpeg2/convert/rgb_mmx.c Thu Jul 22 23:39:27 2004
@@ -272,6 +272,7 @@
} while (i);
}
+#ifndef __BEOS__
static void mmxext_rgb16 (void * id, uint8_t * const * src,
unsigned int v_offset)
{
@@ -283,6 +284,7 @@
{
argb32 (id, src, v_offset, CPU_MMXEXT);
}
+#endif
static void mmx_rgb16 (void * id, uint8_t * const * src, unsigned int v_offset)
{
@@ -295,6 +297,7 @@
argb32 (id, src, v_offset, CPU_MMX);
}
+#ifndef __BEOS__
mpeg2convert_copy_t * mpeg2convert_rgb_mmxext (int order, int bpp,
const mpeg2_sequence_t * seq)
{
@@ -306,6 +309,7 @@
}
return NULL; /* Fallback to C */
}
+#endif
mpeg2convert_copy_t * mpeg2convert_rgb_mmx (int order, int bpp,
const mpeg2_sequence_t * seq)
diff -ru mpeg2dec-original/libmpeg2/idct.c mpeg2dec/libmpeg2/idct.c
--- mpeg2dec-original/libmpeg2/idct.c Fri Sep 19 09:26:42 2003
+++ mpeg2dec/libmpeg2/idct.c Thu Jul 22 19:11:53 2004
@@ -236,11 +236,15 @@
void mpeg2_idct_init (uint32_t accel)
{
#ifdef ARCH_X86
+#ifndef __BEOS__
if (accel & MPEG2_ACCEL_X86_MMXEXT) {
mpeg2_idct_copy = mpeg2_idct_copy_mmxext;
mpeg2_idct_add = mpeg2_idct_add_mmxext;
mpeg2_idct_mmx_init ();
} else if (accel & MPEG2_ACCEL_X86_MMX) {
+#else
+ if (accel & MPEG2_ACCEL_X86_MMX) {
+#endif
mpeg2_idct_copy = mpeg2_idct_copy_mmx;
mpeg2_idct_add = mpeg2_idct_add_mmx;
mpeg2_idct_mmx_init ();
diff -ru mpeg2dec-original/libmpeg2/idct_mmx.c mpeg2dec/libmpeg2/idct_mmx.c
--- mpeg2dec-original/libmpeg2/idct_mmx.c Fri Sep 19 09:26:42 2003
+++ mpeg2dec/libmpeg2/idct_mmx.c Thu Jul 22 19:11:53 2004
@@ -79,6 +79,7 @@
#endif
+#ifndef __BEOS__
/* MMXEXT row IDCT */
#define mmxext_table(c1,c2,c3,c4,c5,c6,c7) { c4, c2, -c4, -c2, \
@@ -192,6 +193,7 @@
movq_m2r (*(table+4), mm4); /* mm4 = C6 C4 C6 C4 */
pshufw_r2r (mm2, mm2, 0x4e); /* mm2 = x2 x0 x6 x4 */
}
+#endif /* __BEOS__ */
/* MMX row IDCT */
@@ -689,6 +691,7 @@
#define CPU_MMXEXT 0
#define CPU_MMX 1
+#ifndef __BEOS__
#define dup4(reg) \
do { \
if (cpu != CPU_MMXEXT) { \
@@ -697,6 +700,13 @@
} else \
pshufw_r2r (reg, reg, 0x00); \
} while (0)
+#else
+#define dup4(reg) \
+do { \
+ punpcklwd_r2r (reg, reg); \
+ punpckldq_r2r (reg, reg); \
+} while (0)
+#endif
static inline void block_add_DC (int16_t * const block, uint8_t * dest,
const int stride, const int cpu)
@@ -749,6 +759,7 @@
}
+#ifndef __BEOS__
declare_idct (mmxext_idct, mmxext_table,
mmxext_row_head, mmxext_row, mmxext_row_tail, mmxext_row_mid)
@@ -770,6 +781,7 @@
} else
block_add_DC (block, dest, stride, CPU_MMXEXT);
}
+#endif /* __BEOS__ */
declare_idct (mmx_idct, mmx_table,
diff -ru mpeg2dec-original/libmpeg2/motion_comp.c mpeg2dec/libmpeg2/motion_comp.c
--- mpeg2dec-original/libmpeg2/motion_comp.c Mon Oct 6 02:31:52 2003
+++ mpeg2dec/libmpeg2/motion_comp.c Thu Jul 22 22:57:54 2004
@@ -34,11 +34,15 @@
void mpeg2_mc_init (uint32_t accel)
{
#ifdef ARCH_X86
+#ifndef __BEOS__
if (accel & MPEG2_ACCEL_X86_MMXEXT)
mpeg2_mc = mpeg2_mc_mmxext;
else if (accel & MPEG2_ACCEL_X86_3DNOW)
mpeg2_mc = mpeg2_mc_3dnow;
else if (accel & MPEG2_ACCEL_X86_MMX)
+#else
+ if (accel & MPEG2_ACCEL_X86_MMX)
+#endif
mpeg2_mc = mpeg2_mc_mmx;
else
#endif
diff -ru mpeg2dec-original/libmpeg2/motion_comp_mmx.c mpeg2dec/libmpeg2/motion_comp_mmx.c
--- mpeg2dec-original/libmpeg2/motion_comp_mmx.c Thu Aug 21 08:00:58 2003
+++ mpeg2dec/libmpeg2/motion_comp_mmx.c Thu Jul 22 22:57:14 2004
@@ -500,7 +500,7 @@
-
+#ifndef __BEOS__
/* CPU_MMXEXT/CPU_3DNOW adaptation layer */
@@ -1001,5 +1001,7 @@
MPEG2_MC_EXTERN (3dnow)
+
+#endif /* __BEOS__ */
#endif
diff -ru mpeg2dec-original/libmpeg2/mpeg2_internal.h mpeg2dec/libmpeg2/mpeg2_internal.h
--- mpeg2dec-original/libmpeg2/mpeg2_internal.h Tue Feb 10 05:43:54 2004
+++ mpeg2dec/libmpeg2/mpeg2_internal.h Thu Jul 22 23:43:36 2004
@@ -255,9 +255,11 @@
void mpeg2_idct_init (uint32_t accel);
/* idct_mmx.c */
+#ifndef __BEOS__
void mpeg2_idct_copy_mmxext (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_mmxext (int last, int16_t * block,
uint8_t * dest, int stride);
+#endif
void mpeg2_idct_copy_mmx (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_mmx (int last, int16_t * block,
uint8_t * dest, int stride);
@@ -295,8 +297,10 @@
extern mpeg2_mc_t mpeg2_mc_c;
extern mpeg2_mc_t mpeg2_mc_mmx;
+#ifndef __BEOS__
extern mpeg2_mc_t mpeg2_mc_mmxext;
extern mpeg2_mc_t mpeg2_mc_3dnow;
+#endif
extern mpeg2_mc_t mpeg2_mc_altivec;
extern mpeg2_mc_t mpeg2_mc_alpha;
extern mpeg2_mc_t mpeg2_mc_vis;
diff -ruN mpeg2dec.orig/libmpeg2/cpu_accel.c mpeg2dec/libmpeg2/cpu_accel.c
--- mpeg2dec.orig/libmpeg2/cpu_accel.c 2004-04-10 07:51:44.000000000 +0200
+++ mpeg2dec/libmpeg2/cpu_accel.c 2005-04-08 23:45:11.000000000 +0200
@@ -145,7 +145,7 @@
#endif /* ACCEL_DETECT && (ARCH_PPC || ARCH_SPARC) */
#ifdef ARCH_PPC
-static inline uint32_t arch_accel (uint32_t accel)
+static uint32_t arch_accel (uint32_t accel)
{
#ifdef ACCEL_DETECT
if ((accel & (MPEG2_ACCEL_PPC_ALTIVEC | MPEG2_ACCEL_DETECT)) ==
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