changeset 2306:42cf51474f45

Qualitative speedup for P3 & K7 cpus
author nick
date Sat, 20 Oct 2001 13:11:10 +0000
parents 82c17b134946
children 1dcf06bfad9b
files libvo/vo_vesa.c
diffstat 1 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_vesa.c	Sat Oct 20 12:53:20 2001 +0000
+++ b/libvo/vo_vesa.c	Sat Oct 20 13:11:10 2001 +0000
@@ -217,13 +217,21 @@
    pixel_size = (video_mode_info.BitsPerPixel+7)/8;
    screen_line_size = video_mode_info.XResolution*pixel_size;
    image_line_size = image_width*pixel_size;
-   x_shift = x_offset*pixel_size;
-   limit = image_height+y_offset;
-   for(j=0,i=y_offset;i<limit;i++,j++)
+   if(image_width == video_mode_info.XResolution)
+   {
+     /* Special case for zooming */
+     __vbeCopyBlock(y_offset*screen_line_size,image,image_line_size*image_height);
+   }
+   else
    {
-     offset = i*screen_line_size+x_shift;
-     image_offset = j*image_line_size;
-     __vbeCopyBlock(offset,&image[image_offset],image_line_size);
+     x_shift = x_offset*pixel_size;
+     limit = image_height+y_offset;
+     for(j=0,i=y_offset;i<limit;i++,j++)
+     {
+       offset = i*screen_line_size+x_shift;
+       image_offset = j*image_line_size;
+       __vbeCopyBlock(offset,&image[image_offset],image_line_size);
+     }
    }
 }
 /* is called for yuv only */