summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-05 13:29:38 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-05 13:29:38 +0000
commit2947415dce872acaa037de1bb3f9d57bb538a831 (patch)
treea8dcf87c5dafad15b0a0d44946509dad94408aa2 /libvo
parent7f430583b51c547e71468ff51276989fb1e6f012 (diff)
downloadmpv-2947415dce872acaa037de1bb3f9d57bb538a831.tar.bz2
mpv-2947415dce872acaa037de1bb3f9d57bb538a831.tar.xz
fixed calculation of OSD coordinates w/ panscan
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8794 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 977a3d3945..2ab781e44c 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -90,21 +90,21 @@ static uint32_t dwidth,dheight;
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 check_events(void)
}
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)
{