mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
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> |
||
|---|---|---|
| .. | ||
| compare_common.cc | ||
| compare_gcc.cc | ||
| compare_msa.cc | ||
| compare_neon64.cc | ||
| compare_neon.cc | ||
| compare_win.cc | ||
| compare.cc | ||
| convert_argb.cc | ||
| convert_from_argb.cc | ||
| convert_from.cc | ||
| convert_jpeg.cc | ||
| convert_to_argb.cc | ||
| convert_to_i420.cc | ||
| convert.cc | ||
| cpu_id.cc | ||
| mjpeg_decoder.cc | ||
| mjpeg_validate.cc | ||
| planar_functions.cc | ||
| rotate_any.cc | ||
| rotate_argb.cc | ||
| rotate_common.cc | ||
| rotate_gcc.cc | ||
| rotate_msa.cc | ||
| rotate_neon64.cc | ||
| rotate_neon.cc | ||
| rotate_win.cc | ||
| rotate.cc | ||
| row_any.cc | ||
| row_common.cc | ||
| row_gcc.cc | ||
| row_msa.cc | ||
| row_neon64.cc | ||
| row_neon.cc | ||
| row_win.cc | ||
| scale_any.cc | ||
| scale_argb.cc | ||
| scale_common.cc | ||
| scale_gcc.cc | ||
| scale_msa.cc | ||
| scale_neon64.cc | ||
| scale_neon.cc | ||
| scale_win.cc | ||
| scale.cc | ||
| video_common.cc | ||