mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
adding support for 12 bit planar YUV formats (for YUV4MPEG(2))
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5272 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d648ac60af
commit
bd1746a8b6
@ -62,6 +62,13 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
// TODO !!!
|
||||
mpi->planes[0]=data;
|
||||
mpi->stride[0]=mpi->width;
|
||||
if(mpi->bpp == 12 && mpi->flags&MP_IMGFLAG_YUV) {
|
||||
// Support for some common Planar YUV formats
|
||||
mpi->planes[2]=data+mpi->width*mpi->height;
|
||||
mpi->stride[2]=mpi->width/2;
|
||||
mpi->planes[1]=data+5*mpi->width*mpi->height/4;
|
||||
mpi->stride[1]=mpi->width/2;
|
||||
}
|
||||
} else {
|
||||
mpi->planes[0]=data;
|
||||
mpi->stride[0]=mpi->width*(mpi->bpp/8);
|
||||
|
Loading…
Reference in New Issue
Block a user