diff --git a/README.chromium b/README.chromium index 9718c81c2..2e3875553 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 122 +Version: 123 License: BSD License File: LICENSE diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 0ed83c663..04c740e3b 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -270,7 +270,9 @@ int I420Copy(const uint8* src_y, int src_stride_y, int halfwidth = (width + 1) >> 1; int halfheight = (height + 1) >> 1; - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + } CopyPlane(src_u, src_stride_u, dst_u, dst_stride_u, halfwidth, halfheight); CopyPlane(src_v, src_stride_v, dst_v, dst_stride_v, halfwidth, halfheight); return 0; @@ -472,7 +474,9 @@ int I422ToI420(const uint8* src_y, int src_stride_y, } // Copy Y plane - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + } // SubSample U plane. int y; @@ -515,7 +519,9 @@ int I420ToI422(const uint8* src_y, int src_stride_y, dst_stride_v = -dst_stride_v; } // Copy Y plane - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + } int halfwidth = (width + 1) >> 1; // UpSample U plane. @@ -597,7 +603,9 @@ int I444ToI420(const uint8* src_y, int src_stride_y, } // Copy Y plane - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + } // SubSample U plane. int y; @@ -647,7 +655,9 @@ int I420ToI444(const uint8* src_y, int src_stride_y, } // Copy Y plane - CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + if (dst_y) { + CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); + } int halfwidth = (width + 1) >> 1; int halfheight = (height + 1) >> 1; @@ -730,8 +740,10 @@ static int X420ToI420(const uint8* src_y, SplitUV = SplitUV_C; } - CopyPlane2(src_y, src_stride_y0, src_stride_y1, dst_y, dst_stride_y, - width, height); + if (dst_y) { + CopyPlane2(src_y, src_stride_y0, src_stride_y1, dst_y, dst_stride_y, + width, height); + } int halfheight = (height + 1) >> 1; for (int y = 0; y < halfheight; ++y) {