summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 14:26:53 +0000
committerrik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 14:26:53 +0000
commitbd1746a8b6b4fabd21f82051f76729e357ff0ac2 (patch)
treee3cd57ea35502496a06575d06378a6066e767d75
parentd648ac60afbebc7a70903389a73a031490525f11 (diff)
downloadmpv-bd1746a8b6b4fabd21f82051f76729e357ff0ac2.tar.bz2
mpv-bd1746a8b6b4fabd21f82051f76729e357ff0ac2.tar.xz
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
-rw-r--r--libmpcodecs/vd_raw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/vd_raw.c b/libmpcodecs/vd_raw.c
index 1049c65e51..0efd5994c4 100644
--- a/libmpcodecs/vd_raw.c
+++ b/libmpcodecs/vd_raw.c
@@ -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);