• Robert Bares's avatar
    Allow negative height when ConvertToI420/ARGB is called with NV12/NV21 · a8aa921c
    Robert Bares authored
    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: 's avatarFrank Barchard <fbarchard@chromium.org>
    a8aa921c
Name
Last commit
Last update
..
compare.cc Loading commit data...
compare_common.cc Loading commit data...
compare_gcc.cc Loading commit data...
compare_msa.cc Loading commit data...
compare_neon.cc Loading commit data...
compare_neon64.cc Loading commit data...
compare_win.cc Loading commit data...
convert.cc Loading commit data...
convert_argb.cc Loading commit data...
convert_from.cc Loading commit data...
convert_from_argb.cc Loading commit data...
convert_jpeg.cc Loading commit data...
convert_to_argb.cc Loading commit data...
convert_to_i420.cc Loading commit data...
cpu_id.cc Loading commit data...
mjpeg_decoder.cc Loading commit data...
mjpeg_validate.cc Loading commit data...
planar_functions.cc Loading commit data...
rotate.cc Loading commit data...
rotate_any.cc Loading commit data...
rotate_argb.cc Loading commit data...
rotate_common.cc Loading commit data...
rotate_gcc.cc Loading commit data...
rotate_msa.cc Loading commit data...
rotate_neon.cc Loading commit data...
rotate_neon64.cc Loading commit data...
rotate_win.cc Loading commit data...
row_any.cc Loading commit data...
row_common.cc Loading commit data...
row_gcc.cc Loading commit data...
row_msa.cc Loading commit data...
row_neon.cc Loading commit data...
row_neon64.cc Loading commit data...
row_win.cc Loading commit data...
scale.cc Loading commit data...
scale_any.cc Loading commit data...
scale_argb.cc Loading commit data...
scale_common.cc Loading commit data...
scale_gcc.cc Loading commit data...
scale_msa.cc Loading commit data...
scale_neon.cc Loading commit data...
scale_neon64.cc Loading commit data...
scale_win.cc Loading commit data...
video_common.cc Loading commit data...