changeset 6295:3368f774d9a4

use offsets/pitches for OSD too
author arpi
date Mon, 03 Jun 2002 22:29:49 +0000
parents 66c3c24a5208
children 74115095d9fe
files libvo/vo_xv.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Mon Jun 03 21:58:53 2002 +0000
+++ b/libvo/vo_xv.c	Mon Jun 03 22:29:49 2002 +0000
@@ -101,15 +101,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){
-   vo_draw_alpha_yv12(w,h,src,srca,stride,xvimage[current_buf]->data+image_width*y0+x0,image_width);
+   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){
-   vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[current_buf]->data+2*(image_width*y0+x0),2*image_width);
+   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){
-   vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[current_buf]->data+2*(image_width*y0+x0)+1,2*image_width);
+   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]);
 }
 
 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){