1 |
xarthisius 11/01/26 15:50:27 |
2 |
|
3 |
Added: x264-altivec.patch |
4 |
Log: |
5 |
Fix compilation on PPC with some recent GCCs wrt bug 343893. Thanks to Andrew John Hughes <gnu_andrew@××××××××××.org> for salvaging patch and Alex Buell <alex.buell@××××××××××.uk> for testing. |
6 |
|
7 |
(Portage version: 2.1.9.25/cvs/Linux ppc64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-libs/x264/files/x264-altivec.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/x264/files/x264-altivec.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/x264/files/x264-altivec.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: x264-altivec.patch |
16 |
=================================================================== |
17 |
http://git.videolan.org/?p=x264.git;a=commitdiff;h=7f5771a13aec5a8a724e0d0c9d761f5a82e74af0 |
18 |
https://bugs.gentoo.org/343893 |
19 |
|
20 |
--- a/common/ppc/dct.c |
21 |
+++ b/common/ppc/dct.c |
22 |
@@ -91,14 +91,14 @@ void x264_sub8x8_dct_altivec( int16_t dct[4][16], uint8_t *pix1, uint8_t *pix2 ) |
23 |
VEC_DCT( dct0v, dct1v, dct2v, dct3v, tmp0v, tmp1v, tmp2v, tmp3v ); |
24 |
VEC_DCT( dct4v, dct5v, dct6v, dct7v, tmp4v, tmp5v, tmp6v, tmp7v ); |
25 |
|
26 |
- vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct); |
27 |
- vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct); |
28 |
- vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, dct); |
29 |
- vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, dct); |
30 |
- vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, dct); |
31 |
- vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, dct); |
32 |
- vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, dct); |
33 |
- vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, dct); |
34 |
+ vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, *dct); |
35 |
+ vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, *dct); |
36 |
+ vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, *dct); |
37 |
+ vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, *dct); |
38 |
+ vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, *dct); |
39 |
+ vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, *dct); |
40 |
+ vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, *dct); |
41 |
+ vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, *dct); |
42 |
} |
43 |
|
44 |
void x264_sub16x16_dct_altivec( int16_t dct[16][16], uint8_t *pix1, uint8_t *pix2 ) |
45 |
--- a/common/ppc/mc.c |
46 |
+++ b/common/ppc/mc.c |
47 |
@@ -460,8 +460,8 @@ static void mc_chroma_altivec_8xh( uint8_t *dstu, uint8_t *dstv, int i_dst_strid |
48 |
dstv_16h = vec_sr( dstv_16h, shiftv ); |
49 |
dstv_16l = vec_sr( dstv_16l, shiftv ); |
50 |
|
51 |
- dstuv = vec_perm( dstv_16h, dstv_16l, perm0v ); |
52 |
- dstvv = vec_perm( dstv_16h, dstv_16l, perm1v ); |
53 |
+ dstuv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm0v ); |
54 |
+ dstvv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm1v ); |
55 |
|
56 |
VEC_STORE8( dstuv, dstu ); |
57 |
VEC_STORE8( dstvv, dstv ); |
58 |
@@ -498,8 +498,8 @@ static void mc_chroma_altivec_8xh( uint8_t *dstu, uint8_t *dstv, int i_dst_strid |
59 |
dstv_16h = vec_sr( dstv_16h, shiftv ); |
60 |
dstv_16l = vec_sr( dstv_16l, shiftv ); |
61 |
|
62 |
- dstuv = vec_perm( dstv_16h, dstv_16l, perm0v ); |
63 |
- dstvv = vec_perm( dstv_16h, dstv_16l, perm1v ); |
64 |
+ dstuv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm0v ); |
65 |
+ dstvv = (vec_u8_t)vec_perm( dstv_16h, dstv_16l, perm1v ); |
66 |
|
67 |
VEC_STORE8( dstuv, dstu ); |
68 |
VEC_STORE8( dstvv, dstv ); |