summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.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_x11.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_x11.c')
-rw-r--r--libvo/vo_x11.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index ae39783e43..fa29809046 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -385,27 +385,21 @@ static void Display_Image( XImage *myximage,uint8_t *ImageData )
}
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
- int dbpp=( bpp+7 )/8;
- int x,y;
-
- for(y=0;y<h;y++){
- uint8_t *dst = ImageData+ dbpp*((y+y0)*image_width+x0);
- for(x=0;x<w;x++){
-// dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
- if(srca[x]){
- dst[0]=((dst[0]*srca[x])>>8)+src[x];
- dst[1]=((dst[1]*srca[x])>>8)+src[x];
- dst[2]=((dst[2]*srca[x])>>8)+src[x];
- //dst[0]=(dst[0]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- //dst[1]=(dst[1]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- //dst[2]=(dst[2]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- }
- dst+=dbpp;
- }
- src+=stride;
- srca+=stride;
+ switch(bpp){
+ case 24:
+ vo_draw_alpha_rgb24(w,h,src,srca,stride,ImageData+3*(y0*image_width+x0),3*image_width);
+ break;
+ case 32:
+ vo_draw_alpha_rgb32(w,h,src,srca,stride,ImageData+4*(y0*image_width+x0),4*image_width);
+ break;
+ case 15:
+ case 16:
+ if(depth==15)
+ vo_draw_alpha_rgb15(w,h,src,srca,stride,ImageData+2*(y0*image_width+x0),2*image_width);
+ else
+ vo_draw_alpha_rgb16(w,h,src,srca,stride,ImageData+2*(y0*image_width+x0),2*image_width);
+ break;
}
-
}