[Mplayer-cvslog] CVS: main/libmpcodecs vd_raw.c,1.10,1.11
Alex Beregszaszi
alex at mplayerhq.hu
Sun Jul 7 18:25:39 CEST 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv5358
Modified Files:
vd_raw.c
Log Message:
yuv handling simplified (using new mpi fields)
Index: vd_raw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_raw.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vd_raw.c 22 Jun 2002 12:12:42 -0000 1.10
+++ vd_raw.c 7 Jul 2002 16:25:36 -0000 1.11
@@ -64,24 +64,18 @@
// TODO !!!
mpi->planes[0]=data;
mpi->stride[0]=mpi->width;
- if(mpi->bpp == 12 && mpi->flags&MP_IMGFLAG_YUV) {
+ if(mpi->flags&MP_IMGFLAG_YUV) {
// Support for some common Planar YUV formats
/* YV12,I420,IYUV */
int cb=2, cr=1;
if(mpi->flags&MP_IMGFLAG_SWAPPED) {
cb=1; cr=2;
}
- mpi->planes[cb]=data+mpi->width*mpi->height;
- mpi->stride[cb]=mpi->width/2;
- mpi->planes[cr]=data+5*mpi->width*mpi->height/4;
- mpi->stride[cr]=mpi->width/2;
+ mpi->planes[cb]=mpi->planes[0]+mpi->width*mpi->height;
+ mpi->stride[cb]=mpi->chroma_width;
+ mpi->planes[cr]=mpi->planes[cb]+mpi->chroma_width*mpi->chroma_height;
+ mpi->stride[cr]=mpi->chroma_width;
}
- else if (mpi->bpp==9 && mpi->flags&MP_IMGFLAG_YUV) {
- /* YVU9 ! */
- mpi->stride[1]=mpi->stride[2]=mpi->width/4;
- mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height;
- mpi->planes[1]=mpi->planes[2]+(mpi->width>>2)*(mpi->height>>2);
- }
} else {
mpi->planes[0]=data;
mpi->stride[0]=mpi->width*(mpi->bpp/8);
@@ -95,4 +89,3 @@
return mpi;
}
-
More information about the MPlayer-cvslog
mailing list