diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-20 13:11:10 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-20 13:11:10 +0000 |
commit | d3c0ee86a59e7f0f79e268c649ab6be0d8c9b282 (patch) | |
tree | 740f1b5960619df96f74cc7198182ec71a4bb756 /libvo/vo_vesa.c | |
parent | 167f1f10fc0fe60351f9c5661e34e4583c264819 (diff) | |
download | mpv-d3c0ee86a59e7f0f79e268c649ab6be0d8c9b282.tar.bz2 mpv-d3c0ee86a59e7f0f79e268c649ab6be0d8c9b282.tar.xz |
Qualitative speedup for P3 & K7 cpus
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2307 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_vesa.c')
-rw-r--r-- | libvo/vo_vesa.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 544786c062..5f5020d066 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -217,13 +217,21 @@ static void __vbeCopyData(uint8_t *image) 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) { - offset = i*screen_line_size+x_shift; - image_offset = j*image_line_size; - __vbeCopyBlock(offset,&image[image_offset],image_line_size); + /* Special case for zooming */ + __vbeCopyBlock(y_offset*screen_line_size,image,image_line_size*image_height); + } + else + { + 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 */ |