[Ffmpeg-cvslog] r6669 - trunk/libavcodec/ppc/dsputil_ppc.c

lu_zero subversion
Thu Oct 12 12:26:07 CEST 2006


Author: lu_zero
Date: Thu Oct 12 12:26:07 2006
New Revision: 6669

Modified:
   trunk/libavcodec/ppc/dsputil_ppc.c

Log:
ppc generic prefetch

Modified: trunk/libavcodec/ppc/dsputil_ppc.c
==============================================================================
--- trunk/libavcodec/ppc/dsputil_ppc.c	(original)
+++ trunk/libavcodec/ppc/dsputil_ppc.c	Thu Oct 12 12:26:07 2006
@@ -249,10 +249,19 @@
 }
 #endif
 
+static void prefetch_ppc(void *mem, int stride, int h)
+{
+    register const uint8_t *p = mem;
+    do {
+        asm volatile ("dcbt 0,%0" : : "r" (p));
+        p+= stride;
+    } while(--h);
+}
+
 void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
 {
     // Common optimizations whether Altivec is available or not
-
+    c->prefetch = prefetch_ppc;
     switch (check_dcbzl_effect()) {
         case 32:
             c->clear_blocks = clear_blocks_dcbz32_ppc;




More information about the ffmpeg-cvslog mailing list