mirror of https://github.com/mpv-player/mpv
really black yv12/rgb images (todo: packed yuv)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5529 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
647b4aa808
commit
398118d15b
|
@ -98,8 +98,16 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
|||
mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height;
|
||||
mpi->planes[1]=mpi->planes[2]+(mpi->width>>1)*(mpi->height>>1);
|
||||
}
|
||||
// clear!
|
||||
memset(mpi->planes[0],0,mpi->stride[0]*mpi->height);
|
||||
memset(mpi->planes[1],128,mpi->stride[1]*(mpi->height>>1));
|
||||
memset(mpi->planes[2],128,mpi->stride[2]*(mpi->height>>1));
|
||||
} else {
|
||||
if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8;
|
||||
if(mpi->flags&MP_IMGFLAG_YUV){
|
||||
// TODO: clear packed yuv plane
|
||||
} else
|
||||
memset(mpi->planes[0],0,mpi->bpp*mpi->width*mpi->height/8);
|
||||
}
|
||||
mpi->flags|=MP_IMGFLAG_ALLOCATED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue