From c260a1139d5990a9cdcf0d678a7e6c99978b98c1 Mon Sep 17 00:00:00 2001 From: syrjala Date: Wed, 16 Feb 2005 23:47:00 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14716 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmpcodecs/vf.c') diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index bd591163d6..0bebfcc49e 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -356,6 +356,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, //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 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, 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; -- cgit v1.2.3