summaryrefslogtreecommitdiffstats
path: root/libvo/mga_common.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/mga_common.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/mga_common.c')
-rw-r--r--libvo/mga_common.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 4a97da69d0..11a56f5086 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -10,37 +10,10 @@ static int f;
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
int x,y;
uint32_t bespitch = (mga_vid_config.src_width + 31) & ~31;
-
- if (mga_vid_config.format==MGA_VID_FORMAT_YV12){
-
- for(y=0;y<h;y++){
- uint8_t *dst = vid_data + bespitch * (y0+y) + 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])>>8)+src[x];
- //dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- }
- src+=stride;
- srca+=stride;
- }
-
- } else {
-
- for(y=0;y<h;y++){
- uint8_t *dst = vid_data + 2*(bespitch * (y0+y) + 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])>>8)+src[x];
- //dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
- }
- src+=stride;
- srca+=stride;
- }
-
- }
-
+ if (mga_vid_config.format==MGA_VID_FORMAT_YV12)
+ vo_draw_alpha_yv12(w,h,src,srca,stride,vid_data+bespitch*y0+x0,bespitch);
+ else
+ vo_draw_alpha_yuy2(w,h,src,srca,stride,vid_data+2*(bespitch*y0+x0),2*bespitch);
}