[Mplayerxp-cvslog] CVS: mplayerxp/mplayerxp/libvo video_out.c, 1.55, 1.56
Brought to you by:
olov
From: Olov G. <ol...@us...> - 2006-08-08 21:31:36
|
Update of /cvsroot/mplayerxp/mplayerxp/mplayerxp/libvo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv3085 Modified Files: video_out.c Log Message: Fix osd blanking of U and V channel for YV12 and YVU9. Allow osd on complete screen area. Index: video_out.c =================================================================== RCS file: /cvsroot/mplayerxp/mplayerxp/mplayerxp/libvo/video_out.c,v retrieving revision 1.55 retrieving revision 1.56 diff -p -u -d -r1.55 -r1.56 --- video_out.c 26 Jul 2006 12:50:36 -0000 1.55 +++ video_out.c 8 Aug 2006 21:31:31 -0000 1.56 @@ -750,6 +750,30 @@ static void __FASTCALL__ clear_rect(unsi } } +static void __FASTCALL__ clear_rect2(unsigned y0,unsigned h,uint8_t *dest,unsigned stride,unsigned dstride,uint8_t filler) +{ + unsigned i; + unsigned y1 = dri_cap.y/2; + unsigned y2 = (dri_cap.y+dri_cap.h)/2; + for(i=0;i<h;i++) + { + if(y0+i<y1||y0+i>=y2) memset(dest,filler,stride); + dest += dstride; + } +} + +static void __FASTCALL__ clear_rect4(unsigned y0,unsigned h,uint8_t *dest,unsigned stride,unsigned dstride,uint8_t filler) +{ + unsigned i; + unsigned y1 = dri_cap.y/4; + unsigned y2 = (dri_cap.y+dri_cap.h)/4; + for(i=0;i<h;i++) + { + if(y0+i<y1||y0+i>=y2) memset(dest,filler,stride); + dest += dstride; + } +} + static void __FASTCALL__ clear_rect_rgb(unsigned y0,unsigned h,uint8_t *dest,unsigned stride,unsigned dstride) { unsigned i; @@ -782,7 +806,7 @@ static void __FASTCALL__ clear_rect_yuy2 static void __FASTCALL__ dri_remove_osd(int x0,int y0, int w,int h) { - if(x0+w<dri_cap.w&&y0+h<=dri_cap.h) + if(x0+w<=dri_cap.width&&y0+h<=dri_cap.height) switch(dri_cap.fourcc) { case IMGFMT_RGB15: @@ -814,18 +838,18 @@ static void __FASTCALL__ dri_remove_osd( case IMGFMT_IYUV: clear_rect( y0,h,dri_surf[active_frame].planes[0]+y0*dri_cap.strides[0]+x0, w,dri_cap.strides[0],0x10); - clear_rect( y0,h/2,dri_surf[active_frame].planes[1]+y0*dri_cap.strides[1]+x0/2, + clear_rect2( y0/2,h/2,dri_surf[active_frame].planes[1]+y0/2*dri_cap.strides[1]+x0/2, w/2,dri_cap.strides[1],0x80); - clear_rect( y0,h/2,dri_surf[active_frame].planes[2]+y0*dri_cap.strides[2]+x0/2, + clear_rect2( y0/2,h/2,dri_surf[active_frame].planes[2]+y0/2*dri_cap.strides[2]+x0/2, w/2,dri_cap.strides[2],0x80); break; case IMGFMT_YVU9: case IMGFMT_IF09: clear_rect( y0,h,dri_surf[active_frame].planes[0]+y0*dri_cap.strides[0]+x0, w,dri_cap.strides[0],0x10); - clear_rect( y0,h/4,dri_surf[active_frame].planes[1]+y0*dri_cap.strides[1]+x0/4, + clear_rect4( y0/4,h/4,dri_surf[active_frame].planes[1]+y0/4*dri_cap.strides[1]+x0/4, w/4,dri_cap.strides[1],0x80); - clear_rect( y0,h/4,dri_surf[active_frame].planes[2]+y0*dri_cap.strides[2]+x0/4, + clear_rect4( y0/4,h/4,dri_surf[active_frame].planes[2]+y0/4*dri_cap.strides[2]+x0/4, w/4,dri_cap.strides[2],0x80); break; } @@ -833,7 +857,7 @@ static void __FASTCALL__ dri_remove_osd( static void __FASTCALL__ dri_draw_osd(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride) { - if(x0+w<=dri_cap.w&&y0+h<=dri_cap.h) + if(x0+w<=dri_cap.width&&y0+h<=dri_cap.height) switch(dri_cap.fourcc) { case IMGFMT_RGB15: |