mirror of
https://github.com/mpv-player/mpv
synced 2024-11-11 00:15:33 +01:00
relaly black packed yuv images
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5530 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
398118d15b
commit
fd6120b9d8
@ -105,7 +105,13 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
} else {
|
||||
if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8;
|
||||
if(mpi->flags&MP_IMGFLAG_YUV){
|
||||
// TODO: clear packed yuv plane
|
||||
int size=mpi->bpp*mpi->width*mpi->height/8/4;
|
||||
unsigned int* p=mpi->planes[0];
|
||||
int i;
|
||||
if(mpi->flags&MP_IMGFLAG_SWAPPED)
|
||||
for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x00800080;
|
||||
else
|
||||
for(i=0;i<size;i+=4) p[i]=p[i+1]=p[i+2]=p[i+3]=0x80008000;
|
||||
} else
|
||||
memset(mpi->planes[0],0,mpi->bpp*mpi->width*mpi->height/8);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user