From 0bd89758e65c53cc406dd771032337126fe4fd3a Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Thu, 4 Dec 2008 00:54:53 +0000 Subject: [PATCH] * Thu Dec 04 2008 Dominik Mierzejewski 0.0.0-0.19.20081202git71d34b4.1 - fix compilation on ppc --- x264-rpm.patch | 8 -------- x264-vectors.patch | 12 ++++++++++++ x264.spec | 7 ++++++- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 x264-vectors.patch diff --git a/x264-rpm.patch b/x264-rpm.patch index 2e3840a..f9a8936 100644 --- a/x264-rpm.patch +++ b/x264-rpm.patch @@ -42,14 +42,6 @@ diff -up x264-20081202/configure.r x264-20081202/configure diff -up x264-20081202/Makefile.r x264-20081202/Makefile --- x264-20081202/Makefile.r 2008-12-02 23:26:25.000000000 +0100 +++ x264-20081202/Makefile 2008-12-03 01:21:24.000000000 +0100 -@@ -53,6 +53,7 @@ ALTIVECSRC += common/ppc/mc.c common/ppc - common/ppc/predict.c - SRCS += $(ALTIVECSRC) - $(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS) -+common/ppc/pixel.c: CFLAGS += -flax-vector-conversions - endif - - # VIS optims @@ -77,14 +78,25 @@ libx264.a: .depend $(OBJS) $(OBJASM) ar rc libx264.a $(OBJS) $(OBJASM) ranlib libx264.a diff --git a/x264-vectors.patch b/x264-vectors.patch new file mode 100644 index 0000000..ceb09fc --- /dev/null +++ b/x264-vectors.patch @@ -0,0 +1,12 @@ +diff -up x264-20081202/common/ppc/ppccommon.h.v x264-20081202/common/ppc/ppccommon.h +--- x264-20081202/common/ppc/ppccommon.h.v 2008-12-02 23:26:25.000000000 +0100 ++++ x264-20081202/common/ppc/ppccommon.h 2008-12-04 01:50:27.000000000 +0100 +@@ -251,7 +251,7 @@ typedef union { + * and i2 + **********************************************************************/ + #define VEC_DIFF_HL(p1,i1,p2,i2,dh,dl) \ +- pix1v = vec_ld(0, p1); \ ++ pix1v = (vec_s16_t)vec_ld(0, p1); \ + temp0v = vec_u8_to_s16_h( pix1v ); \ + temp1v = vec_u8_to_s16_l( pix1v ); \ + VEC_LOAD( p2, pix2v, 16, vec_s16_t, p2); \ diff --git a/x264.spec b/x264.spec index 49b1f14..8285865 100644 --- a/x264.spec +++ b/x264.spec @@ -4,13 +4,14 @@ Summary: H264/AVC video streams encoder Name: x264 Version: 0.0.0 -Release: 0.19.%{snapshot}git%{git}%{?dist} +Release: 0.19.%{snapshot}git%{git}%{?dist}.1 License: GPLv2+ Group: System Environment/Libraries URL: http://developers.videolan.org/x264.html Source0: http://rpm.greysector.net/livna/%{name}-%{snapshot}.tar.bz2 Source1: x264-snapshot.sh Patch0: %{name}-rpm.patch +Patch1: %{name}-vectors.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) BuildRequires: gpac-devel %ifarch x86_64 %{ix86} @@ -65,6 +66,7 @@ This package contains the development files. %prep %setup -q -n %{name}-%{snapshot} %patch0 -p1 -b .r +%patch1 -p1 -b .v # AUTHORS file is in iso-8859-1 iconv -f iso-8859-1 -t utf-8 -o AUTHORS.utf8 AUTHORS mv -f AUTHORS.utf8 AUTHORS @@ -130,6 +132,9 @@ rm %{buildroot}%{_libdir}/sse2/pkgconfig/x264.pc %endif %changelog +* Thu Dec 04 2008 Dominik Mierzejewski 0.0.0-0.19.20081202git71d34b4.1 +- fix compilation on ppc + * Tue Dec 02 2008 Dominik Mierzejewski 0.0.0-0.19.20081202git71d34b4 - 20081202 snapshot - bring back asm optimized/unoptimized libs split