changeset 502:75c689abb763

Maybe a little speedup.
author se7encode
date Wed, 18 Apr 2001 10:37:09 +0000
parents bfc86f5a5ba7
children 4aa16f9ff929
files libvo/vo_svga.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_svga.c	Wed Apr 18 01:56:10 2001 +0000
+++ b/libvo/vo_svga.c	Wed Apr 18 10:37:09 2001 +0000
@@ -421,12 +421,12 @@
     src[0] = scalebuf;
   }
   if (bpp_conv) {
-    uint16_t *source = (uint16_t *) src[0];
-    uint16_t *dest = (uint16_t *) bppbuf;
-    uint16_t *end;
-    
     switch(bpp) {
       case 32: {
+        uint16_t *source = (uint16_t *) src[0];
+        uint16_t *dest = (uint16_t *) bppbuf;
+        uint16_t *end;
+    
 	end = source + (maxw * maxh * 2);
         while (source < end) {
 	  *dest++ = *source++;
@@ -440,6 +440,9 @@
 #ifdef HAVE_MMX
         rgb15to16_mmx(src[0],bppbuf,maxw * maxh * 2);
 #else
+        uint16_t *source = (uint16_t *) src[0];
+        uint16_t *dest = (uint16_t *) bppbuf;
+        uint16_t *end;
 	register uint16_t srcdata;
 	
 	end = source + (maxw * maxh);