diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2011-01-26 15:50:27 +0000 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2011-01-26 15:50:27 +0000 |
commit | 121c3bf0606d20cc0974d81d9fa56186bf2e595d (patch) | |
tree | c6227d374c76321627273a09514d0bcdffd572ec /media-libs/x264 | |
parent | rephrase more (diff) | |
download | gentoo-2-121c3bf0606d20cc0974d81d9fa56186bf2e595d.tar.gz gentoo-2-121c3bf0606d20cc0974d81d9fa56186bf2e595d.tar.bz2 gentoo-2-121c3bf0606d20cc0974d81d9fa56186bf2e595d.zip |
Fix compilation on PPC with some recent GCCs wrt bug 343893. Thanks to Andrew John Hughes <gnu_andrew@member.fsf.org> for salvaging patch and Alex Buell <alex.buell@munted.org.uk> for testing.
(Portage version: 2.1.9.25/cvs/Linux ppc64)
Diffstat (limited to 'media-libs/x264')
-rw-r--r-- | media-libs/x264/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/x264/files/x264-altivec.patch | 52 | ||||
-rw-r--r-- | media-libs/x264/x264-0.0.20101029.ebuild | 7 |
3 files changed, 64 insertions, 5 deletions
diff --git a/media-libs/x264/ChangeLog b/media-libs/x264/ChangeLog index 602c46541a65..1d23e4d98b48 100644 --- a/media-libs/x264/ChangeLog +++ b/media-libs/x264/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/x264 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.45 2010/12/22 02:13:13 aballier Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/ChangeLog,v 1.46 2011/01/26 15:50:27 xarthisius Exp $ + + 26 Jan 2011; Kacper Kowalik <xarthisius@gentoo.org> + +files/x264-altivec.patch, x264-0.0.20101029.ebuild: + Fix compilation on PPC with some recent GCCs wrt bug 343893. Thanks to + Andrew John Hughes <gnu_andrew@member.fsf.org> for salvaging patch and + Alex Buell <alex.buell@munted.org.uk> for testing. 22 Dec 2010; Alexis Ballier <aballier@gentoo.org> -x264-0.0.20081006.ebuild, -x264-0.0.20090502.ebuild, -x264-0.0.20090629.ebuild, diff --git a/media-libs/x264/files/x264-altivec.patch b/media-libs/x264/files/x264-altivec.patch new file mode 100644 index 000000000000..a185dcd5081d --- /dev/null +++ b/media-libs/x264/files/x264-altivec.patch @@ -0,0 +1,52 @@ +http://git.videolan.org/?p=x264.git;a=commitdiff;h=7f5771a13aec5a8a724e0d0c9d761f5a82e74af0 +https://bugs.gentoo.org/343893 + +--- a/common/ppc/dct.c ++++ b/common/ppc/dct.c +@@ -91,14 +91,14 @@ void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 ) + VEC_DCT( dct0v, dct1v, dct2v, dct3v, tmp0v, tmp1v, tmp2v, tmp3v ); + VEC_DCT( dct4v, dct5v, dct6v, dct7v, tmp4v, tmp5v, tmp6v, tmp7v ); + +- vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct); +- vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct); +- vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, dct); +- vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, dct); +- vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, dct); +- vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, dct); +- vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, dct); +- vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, dct); ++ vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, *dct); ++ vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, *dct); ++ vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, *dct); ++ vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, *dct); ++ vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, *dct); ++ vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, *dct); ++ vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, *dct); ++ vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, *dct); + } + + void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 ) +--- a/common/ppc/mc.c ++++ b/common/ppc/mc.c +@@ -460,8 +460,8 @@ static void mc_chroma_altivec_8xh( uint8_t *dstu, uint8_t *dstv, int i_dst_strid + dstv_16h = vec_sr( dstv_16h, shiftv ); + dstv_16l = vec_sr( dstv_16l, shiftv ); + +- dstuv = vec_perm( dstv_16h, dstv_16l, perm0v ); +- dstvv = vec_perm( dstv_16h, dstv_16l, perm1v ); ++ dstuv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm0v ); ++ dstvv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm1v ); + + VEC_STORE8( dstuv, dstu ); + VEC_STORE8( dstvv, dstv ); +@@ -498,8 +498,8 @@ static void mc_chroma_altivec_8xh( uint8_t *dstu, uint8_t *dstv, int i_dst_strid + dstv_16h = vec_sr( dstv_16h, shiftv ); + dstv_16l = vec_sr( dstv_16l, shiftv ); + +- dstuv = vec_perm( dstv_16h, dstv_16l, perm0v ); +- dstvv = vec_perm( dstv_16h, dstv_16l, perm1v ); ++ dstuv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm0v ); ++ dstvv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm1v ); + + VEC_STORE8( dstuv, dstu ); + VEC_STORE8( dstvv, dstv ); diff --git a/media-libs/x264/x264-0.0.20101029.ebuild b/media-libs/x264/x264-0.0.20101029.ebuild index 37f590ef985e..40c86ceb97af 100644 --- a/media-libs/x264/x264-0.0.20101029.ebuild +++ b/media-libs/x264/x264-0.0.20101029.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20101029.ebuild,v 1.3 2010/12/09 16:03:49 rich0 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/x264/x264-0.0.20101029.ebuild,v 1.4 2011/01/26 15:50:27 xarthisius Exp $ EAPI=2 inherit eutils multilib toolchain-funcs versionator @@ -25,7 +25,8 @@ S=${WORKDIR}/${MY_P} src_prepare() { epatch "${FILESDIR}"/${PN}-nostrip.patch \ - "${FILESDIR}"/${PN}-onlylib-20100605.patch + "${FILESDIR}"/${PN}-onlylib-20100605.patch \ + "${FILESDIR}"/${PN}-altivec.patch } src_configure() { |