changeset 7342:21d6837f5d95

yuv422planar->yuy2 support
author arpi
date Mon, 09 Sep 2002 20:55:57 +0000
parents ff1a3a226663
children 1070fe020744
files libmpcodecs/vf_yuy2.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_yuy2.c	Mon Sep 09 20:11:31 2002 +0000
+++ b/libmpcodecs/vf_yuy2.c	Mon Sep 09 20:55:57 2002 +0000
@@ -35,6 +35,10 @@
 	MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
 	mpi->w, mpi->h);
 
+    if(mpi->imgfmt==IMGFMT_422P)
+    yuv422ptoyuy2(mpi->planes[0],mpi->planes[1],mpi->planes[2], dmpi->planes[0],
+	    mpi->w,mpi->h, mpi->stride[0],mpi->stride[1],dmpi->stride[0]);
+    else
     yv12toyuy2(mpi->planes[0],mpi->planes[1],mpi->planes[2], dmpi->planes[0],
 	    mpi->w,mpi->h, mpi->stride[0],mpi->stride[1],dmpi->stride[0]);
     
@@ -51,6 +55,7 @@
     case IMGFMT_YV12:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
+    case IMGFMT_422P:
 	return vf_next_query_format(vf,IMGFMT_YUY2) & (~VFCAP_CSP_SUPPORTED_BY_HW);
     }
     return 0;
@@ -64,7 +69,7 @@
 }
 
 vf_info_t vf_info_yuy2 = {
-    "fast YV12->YUY2 conversion",
+    "fast YV12/Y422p -> YUY2 conversion",
     "yuy2",
     "A'rpi",
     "",