# HG changeset patch # User attila # Date 1073728818 0 # Node ID a80ae8896d6a1ce01d1b16fbddeb068c287b113a # Parent e0b096f0e640fae83d96e2ad75abea629e09ea05 fix for nv12 swapped chroma patch by From: John Wehle diff -r e0b096f0e640 -r a80ae8896d6a libmpcodecs/vd_hmblck.c --- a/libmpcodecs/vd_hmblck.c Sat Jan 10 09:48:15 2004 +0000 +++ b/libmpcodecs/vd_hmblck.c Sat Jan 10 10:00:18 2004 +0000 @@ -64,8 +64,8 @@ unsigned int UV_size = mpi->chroma_width * mpi->chroma_height; unsigned int idx; unsigned char *dst_Y = mpi->planes[0]; - unsigned char *dst_U = swapped?mpi->planes[2]:mpi->planes[1]; - unsigned char *dst_V = swapped?mpi->planes[1]:mpi->planes[2]; + unsigned char *dst_U = mpi->planes[1]; + unsigned char *dst_V = mpi->planes[2]; unsigned char *src = data + Y_size; // sanity check raw stream @@ -90,8 +90,8 @@ // chroma data is interlaced UVUV... so deinterlace it for(idx=0; idxplanes[0],data,mpi->stride[0],mpi->w,mpi->h); de_macro_uv(mpi->planes[1],mpi->planes[2],data+mpi->w*mpi->h,mpi->stride[1],mpi->w/2,mpi->h/2); } else { - if(!nv12_to_yv12(data, len, mpi,(sh->format == IMGFMT_NV12))) return NULL; + if(!nv12_to_yv12(data, len, mpi,(sh->format == IMGFMT_NV21))) return NULL; } return mpi;