[MPlayer-cvslog] CVS: main/libmpcodecs vf.c, 1.110, 1.111 vf_eq.c, 1.8, 1.9 vf_hue.c, 1.3, 1.4 vf_scale.c, 1.56, 1.57 vf_spp.c, 1.26, 1.27

Ville Syrjälä CVS syncmail at mplayerhq.hu
Thu Feb 17 00:47:02 CET 2005


CVS change done by Ville Syrjälä CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv10105a/libmpcodecs

Modified Files:
	vf.c vf_eq.c vf_hue.c vf_scale.c vf_spp.c 
Log Message:
Improved NV12/NV21 support.
- Fixed PlanarToNV12Wrapper() and made it handle NV21.
- Added yuv2nv12XinC() to handle software scaling.
- Added NV12/NV21 handling to various places.
- Removed NV12 from vf_hue and vf_spp as they don't look like they can
  actually handle it.


Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- vf.c	18 Dec 2004 14:06:35 -0000	1.110
+++ vf.c	16 Feb 2005 23:46:59 -0000	1.111
@@ -356,6 +356,7 @@
 	      //if(!mpi->stride[0]) 
 	      mpi->stride[0]=mpi->width;
 	      //if(!mpi->stride[1]) 
+	      if(mpi->num_planes > 2){
 	      mpi->stride[1]=mpi->stride[2]=mpi->chroma_width;
 	      if(mpi->flags&MP_IMGFLAG_SWAPPED){
 	          // I420/IYUV  (Y,U,V)
@@ -366,6 +367,11 @@
 	          mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height;
 	          mpi->planes[1]=mpi->planes[2]+mpi->chroma_width*mpi->chroma_height;
 	      }
+	      } else {
+	          // NV12/NV21
+	          mpi->stride[1]=mpi->chroma_width;
+	          mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height;
+	      }
 	  } else {
 	      //if(!mpi->stride[0]) 
 	      mpi->stride[0]=mpi->width*mpi->bpp/8;

Index: vf_eq.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_eq.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- vf_eq.c	21 Oct 2004 11:55:19 -0000	1.8
+++ vf_eq.c	16 Feb 2005 23:46:59 -0000	1.9
@@ -188,6 +188,7 @@
 	case IMGFMT_Y800:
 	case IMGFMT_Y8:
 	case IMGFMT_NV12:
+	case IMGFMT_NV21:
 	case IMGFMT_444P:
 	case IMGFMT_422P:
 	case IMGFMT_411P:

Index: vf_hue.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_hue.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_hue.c	2 Sep 2004 19:48:41 -0000	1.3
+++ vf_hue.c	16 Feb 2005 23:46:59 -0000	1.4
@@ -130,7 +130,6 @@
 	case IMGFMT_I420:
 	case IMGFMT_IYUV:
 	case IMGFMT_CLPL:
-	case IMGFMT_NV12:
 	case IMGFMT_444P:
 	case IMGFMT_422P:
 	case IMGFMT_411P:

Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- vf_scale.c	12 Nov 2004 11:15:26 -0000	1.56
+++ vf_scale.c	16 Feb 2005 23:46:59 -0000	1.57
@@ -56,6 +56,8 @@
     IMGFMT_YVU9,
     IMGFMT_IF09,
     IMGFMT_411P,
+    IMGFMT_NV12,
+    IMGFMT_NV21,
     IMGFMT_YUY2,
     IMGFMT_UYVY,
 // RGB and grayscale (Y8 and Y800):
@@ -175,6 +177,8 @@
     case IMGFMT_YV12:		/* YV12 needs w & h rounded to 2 */
     case IMGFMT_I420:
     case IMGFMT_IYUV:
+    case IMGFMT_NV12:
+    case IMGFMT_NV21:
       vf->priv->h = (vf->priv->h + 1) & ~1;
     case IMGFMT_YUY2:		/* YUY2 needs w rounded to 2 */
     case IMGFMT_UYVY:

Index: vf_spp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_spp.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vf_spp.c	23 Nov 2004 21:21:54 -0000	1.26
+++ vf_spp.c	16 Feb 2005 23:46:59 -0000	1.27
@@ -528,7 +528,6 @@
 	case IMGFMT_CLPL:
 	case IMGFMT_Y800:
 	case IMGFMT_Y8:
-	case IMGFMT_NV12:
 	case IMGFMT_444P:
 	case IMGFMT_422P:
 	case IMGFMT_411P:
@@ -546,7 +545,6 @@
 	IMGFMT_CLPL,
 	IMGFMT_Y800,
 	IMGFMT_Y8,
-	IMGFMT_NV12,
 	IMGFMT_444P,
 	IMGFMT_422P,
 	IMGFMT_411P,




More information about the MPlayer-cvslog mailing list