summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-10 02:29:38 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-10 02:29:38 +0000
commit2f46205ad3ecbd60fa17823290e3c4f91c8b407e (patch)
treeba9affc816ef4faf76d10e80bdae07cefb41ec1e /libvo/vo_xv.c
parent32205998de2fe0e230693d3053ef5053646de244 (diff)
downloadmpv-2f46205ad3ecbd60fa17823290e3c4f91c8b407e.tar.bz2
mpv-2f46205ad3ecbd60fa17823290e3c4f91c8b407e.tar.xz
OSD alpha renderers moved to osd.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@327 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index b7e1e18970..6f54335a9b 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -256,38 +256,16 @@ static void check_events(void)
}
+//void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
+//void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
+
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
int x,y;
- if (xv_format==IMGFMT_YV12){
-
- for(y=0;y<h;y++){
- uint8_t *dst = xvimage[0]->data + image_width * (y+y0) + x0;
- for(x=0;x<w;x++){
-// dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
- if(srca[x])
-// dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- dst[x]=((dst[x]*srca[x])>>8)+src[x];
- }
- src+=stride;
- srca+=stride;
- }
-
- } else {
-
- for(y=0;y<h;y++){
- uint8_t *dst = xvimage[0]->data + 2*(image_width * (y+y0) + x0);
- for(x=0;x<w;x++){
-// dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
- if(srca[x])
-// dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- dst[2*x]=((dst[2*x]*srca[x])>>8)+src[x];
- }
- src+=stride;
- srca+=stride;
- }
-
- }
+ if (xv_format==IMGFMT_YV12)
+ vo_draw_alpha_yv12(w,h,src,srca,stride,xvimage[0]->data+image_width*y0+x0,image_width);
+ else
+ vo_draw_alpha_yuy2(w,h,src,srca,stride,xvimage[0]->data+2*(image_width*y0+x0),2*image_width);
}