changeset 8793:63e2ab74e0a6

fixed calculation of OSD coordinates w/ panscan
author henry
date Sun, 05 Jan 2003 13:29:38 +0000
parents c2e0f2cd8666
children 056fc0a8b3d2
files libvo/vo_xv.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sun Jan 05 11:30:39 2003 +0000
+++ b/libvo/vo_xv.c	Sun Jan 05 13:29:38 2003 +0000
@@ -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)
 {