changeset 5271:81f31373837e

adding support for 12 bit planar YUV formats (for YUV4MPEG(2))
author rik
date Sat, 23 Mar 2002 14:26:53 +0000
parents 870e932096ff
children edb622813c46
files libmpcodecs/vd_raw.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_raw.c	Sat Mar 23 13:13:12 2002 +0000
+++ b/libmpcodecs/vd_raw.c	Sat Mar 23 14:26:53 2002 +0000
@@ -62,6 +62,13 @@
 	// 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);