Commit 7a24bd85 authored by fbarchard@google.com's avatar fbarchard@google.com

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
parent 8dd523da
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 122 Version: 123
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -270,7 +270,9 @@ int I420Copy(const uint8* src_y, int src_stride_y, ...@@ -270,7 +270,9 @@ int I420Copy(const uint8* src_y, int src_stride_y,
int halfwidth = (width + 1) >> 1; int halfwidth = (width + 1) >> 1;
int halfheight = (height + 1) >> 1; int halfheight = (height + 1) >> 1;
if (dst_y) {
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); 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_u, src_stride_u, dst_u, dst_stride_u, halfwidth, halfheight);
CopyPlane(src_v, src_stride_v, dst_v, dst_stride_v, halfwidth, halfheight); CopyPlane(src_v, src_stride_v, dst_v, dst_stride_v, halfwidth, halfheight);
return 0; return 0;
...@@ -472,7 +474,9 @@ int I422ToI420(const uint8* src_y, int src_stride_y, ...@@ -472,7 +474,9 @@ int I422ToI420(const uint8* src_y, int src_stride_y,
} }
// Copy Y plane // Copy Y plane
if (dst_y) {
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height);
}
// SubSample U plane. // SubSample U plane.
int y; int y;
...@@ -515,7 +519,9 @@ int I420ToI422(const uint8* src_y, int src_stride_y, ...@@ -515,7 +519,9 @@ int I420ToI422(const uint8* src_y, int src_stride_y,
dst_stride_v = -dst_stride_v; dst_stride_v = -dst_stride_v;
} }
// Copy Y plane // Copy Y plane
if (dst_y) {
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height);
}
int halfwidth = (width + 1) >> 1; int halfwidth = (width + 1) >> 1;
// UpSample U plane. // UpSample U plane.
...@@ -597,7 +603,9 @@ int I444ToI420(const uint8* src_y, int src_stride_y, ...@@ -597,7 +603,9 @@ int I444ToI420(const uint8* src_y, int src_stride_y,
} }
// Copy Y plane // Copy Y plane
if (dst_y) {
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height);
}
// SubSample U plane. // SubSample U plane.
int y; int y;
...@@ -647,7 +655,9 @@ int I420ToI444(const uint8* src_y, int src_stride_y, ...@@ -647,7 +655,9 @@ int I420ToI444(const uint8* src_y, int src_stride_y,
} }
// Copy Y plane // Copy Y plane
if (dst_y) {
CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height); CopyPlane(src_y, src_stride_y, dst_y, dst_stride_y, width, height);
}
int halfwidth = (width + 1) >> 1; int halfwidth = (width + 1) >> 1;
int halfheight = (height + 1) >> 1; int halfheight = (height + 1) >> 1;
...@@ -730,8 +740,10 @@ static int X420ToI420(const uint8* src_y, ...@@ -730,8 +740,10 @@ static int X420ToI420(const uint8* src_y,
SplitUV = SplitUV_C; SplitUV = SplitUV_C;
} }
if (dst_y) {
CopyPlane2(src_y, src_stride_y0, src_stride_y1, dst_y, dst_stride_y, CopyPlane2(src_y, src_stride_y0, src_stride_y1, dst_y, dst_stride_y,
width, height); width, height);
}
int halfheight = (height + 1) >> 1; int halfheight = (height + 1) >> 1;
for (int y = 0; y < halfheight; ++y) { for (int y = 0; y < halfheight; ++y) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment