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

Unified Diff: source/planar_functions.cc

Issue 2393393006: YUY2ToI422 coalesce rows for small images (Closed)
Patch Set: fix for YUY2ToY any Created 4 years, 2 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 | « no previous file | source/row_any.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/planar_functions.cc
diff --git a/source/planar_functions.cc b/source/planar_functions.cc
index d24393f684bae5a69265da607cb00ffb6c32091b..45bae1ffd1dfbaeb198bf6fdc8c0e3ba3f3b98f8 100644
--- a/source/planar_functions.cc
+++ b/source/planar_functions.cc
@@ -447,7 +447,8 @@ int YUY2ToI422(const uint8* src_yuy2, int src_stride_yuy2,
if (src_stride_yuy2 == width * 2 &&
dst_stride_y == width &&
dst_stride_u * 2 == width &&
- dst_stride_v * 2 == width) {
+ dst_stride_v * 2 == width &&
+ width * height <= 32768) {
width *= height;
height = 1;
src_stride_yuy2 = dst_stride_y = dst_stride_u = dst_stride_v = 0;
@@ -531,7 +532,8 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
if (src_stride_uyvy == width * 2 &&
dst_stride_y == width &&
dst_stride_u * 2 == width &&
- dst_stride_v * 2 == width) {
+ dst_stride_v * 2 == width &&
+ width * height <= 32768) {
width *= height;
height = 1;
src_stride_uyvy = dst_stride_y = dst_stride_u = dst_stride_v = 0;
« no previous file with comments | « no previous file | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698