stagefright:ColorConverter: add support for BT.601/709/2020 limited and full range
Previously, 10-bit sources supported only BT.709 and BT.2020 limited range, and 8-bit sources only BT.601 limited range. - Added matrix coefficients for all supported color spaces. - Combined the various vendor YUV420Planar conversions into a base routine. - Fix BT709 support for libyuv (current libyuv only supports limited range) - Added fall-back from libyuv for unsupported color spaces (newer libyuv does support all of our color spaces, but we cannot use these yet.) - Added rounding. - Reduce the divisor of the 10-bit transform matrix to match the other 8-bit matrices. The actual matrix was purely divisable so no actual precision is lost. Bug: 206040283 Test: manual Photos && atest MediaMetadataRetrieverTest.java Change-Id: I607c9a7e903378a81e4784cc222f7e76bf836d41
Loading