mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-29 02:17:13 +08:00
In ScalePlane and ScalePlane_16, when dst_width == src_width and dst_height == 1 with src_height >= 32768, set y to (src_height << 15) - 32768 for bilinear filtering and src_height << 15 for point sampling so the center row is sampled instead of row 0. In ScaleSlope, when dst_width == 1 and Abs(src_width) >= 32768 (or dst_height == 1 and src_height >= 32768), compute the centered *x and *y coordinates directly instead of overwriting dst_width or dst_height, which previously sampled pixel/row 0 (or 0.5) and added (Abs(src_width) - 1) * *dx when horizontally mirroring src_width < 0. Use Abs(src_width) << 15 and src_height << 15 as the non-box step values so ScaleARGB and ScaleUV treat the 32768x downscale as an even scale factor rather than 1x. Save Abs(src_width) in a local variable. In ScaleAddCols1_16_C, shift x >>= 16 before indexing src_ptr[x], matching ScaleAddCols1_C. Bug: b:573815252 Test: libyuv_unittest --gtest_filter=*ScalePlaneOversizeHeight*:*ARGBScaleOversizeWidthTo1* Change-Id: Ic82319dae6291d17b98b056b5d64a4bbf02f7787 |
||
|---|---|---|
| .. | ||
| testdata | ||
| basictypes_test.cc | ||
| color_test.cc | ||
| compare_test.cc | ||
| convert_argb_test.cc | ||
| convert_test.cc | ||
| cpu_test.cc | ||
| cpu_thread_test.cc | ||
| math_test.cc | ||
| planar_test.cc | ||
| rotate_argb_test.cc | ||
| rotate_test.cc | ||
| scale_argb_test.cc | ||
| scale_plane_test.cc | ||
| scale_rgb_test.cc | ||
| scale_test.cc | ||
| scale_uv_test.cc | ||
| unit_test.cc | ||
| unit_test.h | ||
| video_common_test.cc | ||