summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf.c
diff options
context:
space:
mode:
authorsyrjala <syrjala@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-16 23:47:00 +0000
committersyrjala <syrjala@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-02-16 23:47:00 +0000
commitc260a1139d5990a9cdcf0d678a7e6c99978b98c1 (patch)
treea0407fc7df675be723f5149c17de76a22d72d4b5 /libmpcodecs/vf.c
parent078b83809052f0ef6b5d46f0fc572f7a5ef3d5ee (diff)
downloadmpv-c260a1139d5990a9cdcf0d678a7e6c99978b98c1.tar.bz2
mpv-c260a1139d5990a9cdcf0d678a7e6c99978b98c1.tar.xz
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
Diffstat (limited to 'libmpcodecs/vf.c')
-rw-r--r--libmpcodecs/vf.c6
1 files changed, 6 insertions, 0 deletions
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;