101-ppc_no_altivec.patch 1.4 KB

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