diff options
Diffstat (limited to 'media-libs/gst-plugins/files/noppcasm.patch')
-rw-r--r-- | media-libs/gst-plugins/files/noppcasm.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/media-libs/gst-plugins/files/noppcasm.patch b/media-libs/gst-plugins/files/noppcasm.patch new file mode 100644 index 000000000000..9a7fceeab1c3 --- /dev/null +++ b/media-libs/gst-plugins/files/noppcasm.patch @@ -0,0 +1,65 @@ +diff -urN ori/gst-libs/gst/resample/dtos.c gst-plugins-0.6.0/gst-libs/gst/resample/dtos.c +--- ori/gst-libs/gst/resample/dtos.c 2002-09-15 23:39:54.000000000 +0200 ++++ gst-plugins-0.6.0/gst-libs/gst/resample/dtos.c 2003-03-30 11:14:29.000000000 +0200 +@@ -101,28 +101,7 @@ + + void conv_double_short_altivec(double *dest, short *src, int n) + { +- int i; +- +- for(i=0;i<n;i+=4){ +- av_tmp.i[0] = src[0]; +- av_tmp.i[1] = src[1]; +- av_tmp.i[2] = src[2]; +- av_tmp.i[3] = src[3]; +- +- asm( +- " lvx 0,0,%0\n" +- " vcfsx 1,0,0\n" +- " stvx 1,0,%0\n" +- : : "r" (&av_tmp) +- ); +- +- dest[0]=av_tmp.f[0]; +- dest[1]=av_tmp.f[1]; +- dest[2]=av_tmp.f[2]; +- dest[3]=av_tmp.f[3]; +- src += 4; +- dest += 4; +- } ++ conv_short_double_ref(dest,src,n); + } + #endif + #endif +@@ -147,30 +126,7 @@ + #ifdef HAVE_CPU_PPC + void conv_short_double_ppcasm(short *dest, double *src, int n) + { +- int tmp[2]; +- double min = -32768.0; +- double max = 32767.0; +- double ftmp0, ftmp1; +- +- asm __volatile__( +- "\taddic. %3,%3,-8\n" +- "\taddic. %6,%6,-2\n" +- "loop:\n" +- "\tlfdu %0,8(%3)\n" +- "\tfsub %1,%0,%4\n" +- "\tfsel %0,%1,%0,%4\n" +- "\tfsub %1,%0,%5\n" +- "\tfsel %0,%1,%5,%0\n" +- "\tfctiw %1,%0\n" +- "\taddic. 5,5,-1\n" +- "\tstfd %1,0(%2)\n" +- "\tlhz 9,6(%2)\n" +- "\tsthu 9,2(%6)\n" +- "\tbne loop\n" +- : "=&f" (ftmp0), "=&f" (ftmp1) +- : "b" (tmp), "r" (src), "f" (min), "f" (max), "r" (dest) +- : "r9", "r5" ); +- ++ conv_short_double_ref(dest,src,n); + } + #endif + |