allow null dst_y on biplanar and triplanar functions

BUG=none
TEST=none
Review URL: http://webrtc-codereview.appspot.com/335015

git-svn-id: http://libyuv.googlecode.com/svn/trunk@123 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
fbarchard@google.com 2012-01-03 23:54:00 +00:00
parent 8dd523da69
commit 7a24bd8577
2 changed files with 20 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 122
Version: 123
License: BSD
License File: LICENSE

View File

@ -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) {