Index: unit_test/scale_argb_test.cc |
diff --git a/unit_test/scale_argb_test.cc b/unit_test/scale_argb_test.cc |
index e85eb2a5456c1e9ba06245e18690784ad6e2d05d..4a9c232542a152a9d4aeecaf9670567113694f73 100644 |
--- a/unit_test/scale_argb_test.cc |
+++ b/unit_test/scale_argb_test.cc |
@@ -28,6 +28,11 @@ static int ARGBTestFilter(int src_width, int src_height, |
int dst_width, int dst_height, |
FilterMode f, int benchmark_iterations, |
int disable_cpu_flags, int benchmark_cpu_info) { |
+ if (src_width > 32768 || src_height > 32768 || |
harryjin
2016/05/04 04:33:44
Use a constant?
harryjin
2016/05/04 04:33:44
This whole check can be refactored out to a helper
fbarchard1
2016/05/05 23:37:02
Done.
fbarchard1
2016/05/05 23:37:02
Done.
|
+ dst_width > 32768 || dst_height > 32768) { |
+ printf("Warning - size too large to test. Skipping\n"); |
+ return 0; |
+ } |
int i, j; |
const int b = 0; // 128 to test for padding/stride. |
int64 src_argb_plane_size = (Abs(src_width) + b * 2) * |
@@ -143,6 +148,11 @@ static int TileARGBScale(const uint8* src_argb, int src_stride_argb, |
static int ARGBClipTestFilter(int src_width, int src_height, |
int dst_width, int dst_height, |
FilterMode f, int benchmark_iterations) { |
+ if (src_width > 32768 || src_height > 32768 || |
+ dst_width > 32768 || dst_height > 32768) { |
+ printf("Warning - size too large to test. Skipping\n"); |
+ return 0; |
+ } |
const int b = 128; |
int64 src_argb_plane_size = (Abs(src_width) + b * 2) * |
(Abs(src_height) + b * 2) * 4; |