libfile: moved to github
[openwrt.org/packages.git] / libs / 101-ppc_no_altivec.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--- a/libmpeg2/motion_comp_altivec.c
+++ b/libmpeg2/motion_comp_altivec.c
@@ -25,6 +25,8 @@
 
 #ifdef ARCH_PPC
 
+#ifdef __I_WANT_ALTIVEC__
+
 #ifdef HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif
@@ -1007,4 +1009,6 @@ static void MC_avg_xy_8_altivec (uint8_t
 
 MPEG2_MC_EXTERN (altivec)
 
+#endif /* __I_WANT_ALTIVEC__ */
+
 #endif
--- a/libmpeg2/idct_altivec.c
+++ b/libmpeg2/idct_altivec.c
@@ -25,6 +25,8 @@
 
 #ifdef ARCH_PPC
 
+#ifdef __I_WANT_ALTIVEC__
+
 #ifdef HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif
@@ -283,4 +285,6 @@ void mpeg2_idct_altivec_init (void)
     }
 }
 
+#endif /* __I_WANT_ALTIVEC__ */
+
 #endif
--- a/libmpeg2/idct.c
+++ b/libmpeg2/idct.c
@@ -251,11 +251,13 @@ void mpeg2_idct_init (uint32_t accel)
     } else
 #endif
 #ifdef ARCH_PPC
+#ifdef __I_WANT_ALTIVEC__
     if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
        mpeg2_idct_copy = mpeg2_idct_copy_altivec;
        mpeg2_idct_add = mpeg2_idct_add_altivec;
        mpeg2_idct_altivec_init ();
     } else
+#endif /* __I_WANT_ALTIVEC__ */
 #endif
 #ifdef ARCH_ALPHA
     if (accel & MPEG2_ACCEL_ALPHA_MVI) {
--- a/libmpeg2/motion_comp.c
+++ b/libmpeg2/motion_comp.c
@@ -43,9 +43,11 @@ void mpeg2_mc_init (uint32_t accel)
     else
 #endif
 #ifdef ARCH_PPC
+#ifdef __I_WANT_ALTIVEC__
     if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
        mpeg2_mc = mpeg2_mc_altivec;
     else
+#endif /* __I_WANT_ALTIVEC__ */
 #endif
 #ifdef ARCH_ALPHA
     if (accel & MPEG2_ACCEL_ALPHA)
 
comments