libyuv/unit_test
Robert Bares a8aa921c46 Allow negative height when ConvertToI420/ARGB is called with NV12/NV21
ConvertToI420 and ConvertToARGB support the use of a negative height
parameter to flip the image vertically. When converting from NV12 or
NV21 this parameter was misinterpreted, resulting in invalid output.
This CL introduces the use of abs_src_height to correctly calculate
the location of the source UV plane.

The sign of crop_height is not used, to reduce confusion ConvertToI420
and ConvertToARGB no longer accept negative crop height.

Unit tests for Android420ToI420 are updated to fix miscalculation of
src_stride_uv, fix incorrect pixel strides, and to test inversion.
New unit tests are included to test inversion for ConvertToARGB,
ConvertToI420, Android420ToARGB, and Android420ToABGR.
For consistency the test NV12Crop is renamed ConvertToI420_NV12_Crop.

Bug: libyuv:446
Test: out/Release/libyuv_unittest --gtest_filter=*.ConvertTo*:*.Android420To*
Change-Id: Idc98e62671cb30272cfa7e24fafbc8b73712f7c6
Reviewed-on: https://chromium-review.googlesource.com/994074
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-04-19 02:41:27 +00:00
..
testdata Detect asimd as same as Neon for Arm features. Used on Juno aarch64 linux. 2014-09-22 18:30:17 +00:00
basictypes_test.cc Switch to C99 types 2018-01-23 19:16:05 +00:00
color_test.cc Lint cleanup after C99 change CL 2018-01-24 19:16:03 +00:00
compare_test.cc tidy applied with all cppcoreguidelines and google 2018-02-07 02:28:25 +00:00
convert_test.cc Allow negative height when ConvertToI420/ARGB is called with NV12/NV21 2018-04-19 02:41:27 +00:00
cpu_test.cc Add a method to force the CPU flags 2018-03-26 19:31:00 +00:00
cpu_thread_test.cc MaskCpuFlags return cpuinfo so InitCpuFlags can call it 2017-05-24 22:27:03 +00:00
math_test.cc Switch to C99 types 2018-01-23 19:16:05 +00:00
planar_test.cc ByteToFloatRow_NEON to convert and scale bytes to floats 2018-02-24 00:34:07 +00:00
rotate_argb_test.cc clang-format libyuv 2016-11-07 17:37:23 -08:00
rotate_test.cc clang-format libyuv 2016-11-07 17:37:23 -08:00
scale_argb_test.cc Lint cleanup after C99 change CL 2018-01-24 19:16:03 +00:00
scale_test.cc Switch to C99 types 2018-01-23 19:16:05 +00:00
unit_test.cc cpuid sandbox friendlier avoiding getenv() 2018-03-20 01:04:30 +00:00
unit_test.h clang-tidy and clang-format applied reland 2018-02-21 23:30:38 +00:00
video_common_test.cc 10 bit YUV to 10 bit BGR 2018-02-15 22:44:36 +00:00