[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.132,1.133

Jindrich Makovicka CVS henry at mplayerhq.hu
Sun Jan 5 14:29:54 CET 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv11407

Modified Files:
	vo_xv.c 
Log Message:
fixed calculation of OSD coordinates w/ panscan

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- vo_xv.c	3 Jan 2003 20:46:44 -0000	1.132
+++ vo_xv.c	5 Jan 2003 13:29:38 -0000	1.133
@@ -90,21 +90,21 @@
 static void (*draw_alpha_fnc)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);
 
 static void draw_alpha_yv12(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
-   x0+=(vo_panscan_x>>2);
+   x0+=image_width*(vo_panscan_x>>1)/(vo_dwidth+vo_panscan_x);
    vo_draw_alpha_yv12(w,h,src,srca,stride,
        xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
        xvimage[current_buf]->pitches[0]*y0+x0,xvimage[current_buf]->pitches[0]);
 }
 
 static void draw_alpha_yuy2(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
-   x0+=(vo_panscan_x>>2);
+   x0+=image_width*(vo_panscan_x>>1)/(vo_dwidth+vo_panscan_x);
    vo_draw_alpha_yuy2(w,h,src,srca,stride,
        xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
        xvimage[current_buf]->pitches[0]*y0+2*x0,xvimage[current_buf]->pitches[0]);
 }
 
 static void draw_alpha_uyvy(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
-   x0+=(vo_panscan_x>>2);
+   x0+=image_width*(vo_panscan_x>>1)/(vo_dwidth+vo_panscan_x);
    vo_draw_alpha_yuy2(w,h,src,srca,stride,
        xvimage[current_buf]->data+xvimage[current_buf]->offsets[0]+
        xvimage[current_buf]->pitches[0]*y0+2*x0+1,xvimage[current_buf]->pitches[0]);
@@ -553,7 +553,7 @@
 }
 
 static void draw_osd(void)
-{ vo_draw_text(image_width-(vo_panscan_x>>1),image_height,draw_alpha_fnc);}
+{ vo_draw_text(image_width-image_width*vo_panscan_x/(vo_dwidth+vo_panscan_x),image_height,draw_alpha_fnc);}
 
 static void flip_page(void)
 {



More information about the MPlayer-cvslog mailing list