changeset 2964:ab8df016b2f1

Qualitative speedup of decoding
author nick
date Sun, 18 Nov 2001 09:45:29 +0000
parents 510b7e4b51a5
children eb5e41e06ccc
files libvo/vesa_lvo.c
diffstat 1 files changed, 2 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vesa_lvo.c	Sat Nov 17 23:55:40 2001 +0000
+++ b/libvo/vesa_lvo.c	Sun Nov 18 09:45:29 2001 +0000
@@ -162,57 +162,13 @@
         src+=stride[2];
         dest += bespitch2;
     }
-#elsif 0
-/* vo_xv stuff: slightly better for YV12 on radeon_vid */
- uint8_t *src;
- uint8_t *dst;
- int i;
-
- dst = lvo_mem + image_width * y + x;
- src = image[0];
- if(w==stride[0] && w==image_width) memcpy(dst,src,w*h);
-   else
-    for(i=0;i<h;i++)
-     {
-      memcpy(dst,src,w);
-      src+=stride[0];
-      dst+=image_width;
-     }
-
- x/=2;y/=2;w/=2;h/=2;
-
- dst = lvo_mem + image_width * image_height + image_width/2 * y + x;
- src = image[2];
- if(w==stride[2] && w==image_width/2) memcpy(dst,src,w*h);
-  else
-   for(i=0;i<h;i++)
-    {
-     memcpy(dst,src,w);
-     src+=stride[2];
-     dst+=image_width/2;
-   }
- dst = lvo_mem + image_width * image_height * 5 / 4 + image_width/2 * y + x;
- src = image[1];
- if(w==stride[1] && w==image_width/2) memcpy(dst,src,w*h);
-  else
-   for(i=0;i<h;i++)
-    {
-     memcpy(dst,src,w);
-     src+=stride[1];
-     dst+=image_width/2;
-    }
 #else
  uint8_t *src;
  uint8_t *dst;
     dst = lvo_mem + image_width * y + x;
     src = image[0];
-    w <<= 1;
-    while(h--) {
-	memcpy(dst, src, w);
-	src += stride[0];
-	dst += stride[0];
-    }
-
+    w *= (image_bpp+7)/8;
+    memcpy(dst,src,w*h);
 #endif
  return 0;
 }