Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: source/convert.cc

Issue 2276703002: NV12 allow NULL for Y (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: document planar formats Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/libyuv/version.h ('k') | unit_test/convert_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/convert.cc
diff --git a/source/convert.cc b/source/convert.cc
index 08e5e5d67d5ca3646fcda5eee2dff02f765f8657..d0896cfb6da06f7576d4d1782c543848349b59c7 100644
--- a/source/convert.cc
+++ b/source/convert.cc
@@ -44,6 +44,7 @@ static int I4xxToI420(const uint8* src_y, int src_stride_y,
src_uv_width == 0 || src_uv_height == 0) {
return -1;
}
+ // TODO(fbarchard): make Y optional.
ScalePlane(src_y, src_stride_y, src_y_width, src_y_height,
dst_y, dst_stride_y, dst_y_width, dst_y_height,
kFilterBilinear);
@@ -313,8 +314,7 @@ static int X420ToI420(const uint8* src_y,
int width, int height) {
int halfwidth = (width + 1) >> 1;
int halfheight = (height + 1) >> 1;
- if (!src_y || !src_uv ||
- !dst_y || !dst_u || !dst_v ||
+ if (!src_uv || !dst_u || !dst_v ||
width <= 0 || height == 0) {
return -1;
}
« no previous file with comments | « include/libyuv/version.h ('k') | unit_test/convert_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698