changeset 9473:e38284cd69dc libavcodec

Use memcpy instead of the very inefficient bytecopy where both are correct (i.e. no overlap of src and dst is possible).
author reimar
date Fri, 17 Apr 2009 17:20:48 +0000
parents 05663d250d5b
children e1d76267dce8
files xan.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/xan.c	Fri Apr 17 15:35:32 2009 +0000
+++ b/xan.c	Fri Apr 17 17:20:48 2009 +0000
@@ -148,7 +148,7 @@
             size = opcode & 3;
             if (dest + size > dest_end)
                 return;
-            bytecopy(dest, src, size);  dest += size;  src += size;
+            memcpy(dest, src, size);  dest += size;  src += size;
 
             size = ((opcode & 0x1c) >> 2) + 3;
             if (dest + size > dest_end)
@@ -164,7 +164,7 @@
             size = byte1 >> 6;
             if (dest + size > dest_end)
                 return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
+            memcpy(dest, src, size);  dest += size;  src += size;
 
             size = (opcode & 0x3f) + 4;
             if (dest + size > dest_end)
@@ -181,7 +181,7 @@
             size = opcode & 3;
             if (dest + size > dest_end)
                 return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
+            memcpy(dest, src, size);  dest += size;  src += size;
 
             size = byte3 + 5 + ((opcode & 0xc) << 6);
             if (dest + size > dest_end)
@@ -198,12 +198,12 @@
 
             if (dest + size > dest_end)
                 return;
-            bytecopy (dest, src, size);  dest += size;  src += size;
+            memcpy(dest, src, size);  dest += size;  src += size;
         }
     }
 
     size = opcode & 3;
-    bytecopy(dest, src, size);  dest += size;  src += size;
+    memcpy(dest, src, size);  dest += size;  src += size;
 }
 
 static inline void xan_wc3_output_pixel_run(XanContext *s,