mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-07-30 16:26:19 +08:00
RAW format in libyuv is Red-first ([R, G, B] in memory), whereas RGB24 is Blue-first ([B, G, R] in memory). RGBToYMatrixRow and RGBToUVMatrixRow internally expand 3-byte input into 4-byte [byte0, byte1, byte2, 255]. For RAW, this buffer becomes [R, G, B, 255] (matching ABGR byte order). RAWToI420 previously passed &kArgbI601Constants (which expects [B, G, R, 255]) instead of &kAbgrI601Constants, causing Red and Blue channels to be swapped. Pass &kAbgrI601Constants in RAWToI420, fix parameter names in source/convert.cc, and add a unit test. Test: libyuv_unittest --gtest_filter=*RAWToI420* Bug: libyuv:537503370 TAG=agy CONV=2c54c4b5-f515-421b-80b3-079caa9f948b Change-Id: Ic72470813eaf15e80046c2c01cf804cb827039ab Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8133048 Reviewed-by: richard winterton <rrwinterton@gmail.com> |
||
|---|---|---|
| .. | ||
| 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 | ||