diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-04-28 09:36:00 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-05-02 00:46:48 +0300 |
commit | 6506d4ad84eac67e69437def2c8ee69fcfc14ed5 (patch) | |
tree | 255e7f58b809a9bc7377047533cfb19399ce4ffd /libmpcodecs/vf_bmovl.c | |
parent | 7e65428712beacd416dc3410c52f22ebfd3b4c53 (diff) | |
download | mpv-6506d4ad84eac67e69437def2c8ee69fcfc14ed5.tar.bz2 mpv-6506d4ad84eac67e69437def2c8ee69fcfc14ed5.tar.xz |
cleanup: remove more warnings
Diffstat (limited to 'libmpcodecs/vf_bmovl.c')
-rw-r--r-- | libmpcodecs/vf_bmovl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index b6b9940832..da5dc97f50 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -219,7 +219,6 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ int have, got, want; int xpos=0, ypos=0, pos=0; unsigned char red=0, green=0, blue=0; - int alpha; mp_image_t* dmpi; dmpi = vf_get_image(vf->next, mpi->imgfmt, MP_IMGTYPE_TEMP, @@ -349,6 +348,8 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ for( buf_y=0 ; (buf_y < imgh) && (buf_y < (vf->priv->h-imgy)) ; buf_y++ ) { for( buf_x=0 ; (buf_x < (imgw*pxsz)) && (buf_x < ((vf->priv->w+imgx)*pxsz)) ; buf_x += pxsz ) { + int alpha = 0xff; + if(command & IS_RAWIMG) buf_pos = (buf_y * imgw * pxsz) + buf_x; pos = ((buf_y+imgy) * vf->priv->w) + ((buf_x/pxsz)+imgx); @@ -369,13 +370,11 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ red = buffer[buf_pos+0]; green = buffer[buf_pos+1]; blue = buffer[buf_pos+2]; - alpha = 0xFF; break; case IMG_BGR24: blue = buffer[buf_pos+0]; green = buffer[buf_pos+1]; red = buffer[buf_pos+2]; - alpha = 0xFF; break; case CMD_ALPHA: vf->priv->bitmap.a[pos] = INRANGE((vf->priv->bitmap.oa[pos]+imgalpha),0,255); @@ -423,7 +422,7 @@ put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ for ( xpos=vf->priv->x1 ; xpos < vf->priv->x2 ; xpos++ ) { pos = (ypos * dmpi->stride[0]) + xpos; - alpha = vf->priv->bitmap.a[pos]; + int alpha = vf->priv->bitmap.a[pos]; if (alpha == 0) continue; // Completly transparent pixel |