Mercurial > mplayer.hg
changeset 4949:48bfd1d278d1
using mem2agpcpy_pic()
author | arpi |
---|---|
date | Wed, 06 Mar 2002 15:48:54 +0000 |
parents | 869e5bff8dab |
children | 307a94037c5c |
files | libvo/mga_common.c |
diffstat | 1 files changed, 15 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/mga_common.c Wed Mar 06 15:25:10 2002 +0000 +++ b/libvo/mga_common.c Wed Mar 06 15:48:54 2002 +0000 @@ -43,13 +43,7 @@ bespitch = (mga_vid_config.src_width + 31) & ~31; dest = vid_data + bespitch*y + x; - src = image[0]; - for(h=0; h < height; h++) - { - memcpy(dest, src, width); - src += stride[0]; - dest += bespitch; - } + mem2agpcpy_pic(dest, image[0], width, height, bespitch, stride[0]); width/=2;height/=2;x/=2;y/=2; @@ -121,38 +115,32 @@ bespitch2 = bespitch/2; dest = vid_data + bespitch * y + x; - src = image[0]; - for(i=0;i<h;i++){ - memcpy(dest,src,w); - src+=stride[0]; - dest += bespitch; - } + mem2agpcpy_pic(dest, image[0], w, h, bespitch, stride[0]); w/=2;h/=2;x/=2;y/=2; dest = vid_data + bespitch*mga_vid_config.src_height + bespitch2 * y + x; - src = image[1]; - for(i=0;i<h;i++){ - memcpy(dest,src,w); - src+=stride[1]; - dest += bespitch2; - } + mem2agpcpy_pic(dest, image[1], w, h, bespitch2, stride[1]); dest = vid_data + bespitch*mga_vid_config.src_height + bespitch*mga_vid_config.src_height / 4 + bespitch2 * y + x; - src = image[2]; - for(i=0;i<h;i++){ - memcpy(dest,src,w); - src+=stride[2]; - dest += bespitch2; - } + mem2agpcpy_pic(dest, image[2], w, h, bespitch2, stride[2]); } static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) { + +#if 0 + printf("vo: %p/%d %p/%d %p/%d %dx%d/%d;%d \n", + src[0],stride[0], + src[1],stride[1], + src[2],stride[2], + w,h,x,y); +#endif + if (mga_vid_config.card_type == MGA_G200) draw_slice_g200(src,stride,w,h,x,y); else @@ -178,22 +166,10 @@ static void write_frame_yuy2(uint8_t *y) { - uint8_t *dest; - uint32_t bespitch,h; int len=2*mga_vid_config.src_width; + uint32_t bespitch = (mga_vid_config.src_width + 31) & ~31; - dest = vid_data; - bespitch = (mga_vid_config.src_width + 31) & ~31; - -// y+=2*mga_vid_config.src_width*mga_vid_config.src_height; - - for(h=0; h < mga_vid_config.src_height; h++) - { -// y -= 2*mga_vid_config.src_width; - memcpy(dest, y, len); - y += len; - dest += 2*bespitch; - } + mem2agpcpy_pic(vid_data, y, len, mga_vid_config.src_height, 2*bespitch, len); } @@ -202,7 +178,6 @@ { switch(mga_vid_config.format){ case MGA_VID_FORMAT_YUY2: - write_frame_yuy2(src[0]);break; case MGA_VID_FORMAT_UYVY: write_frame_yuy2(src[0]);break; }