diff options
author | Frank Barchard <fbarchard@google.com> | 2022-04-07 11:53:03 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-07 21:06:44 +0000 |
commit | 2ad73733d93e0fc8932178e4211b3b4c36443ad1 (patch) | |
tree | e8ecd7b4bedb6cdd627a85f4dc52a53858814260 /source/row_common.cc | |
parent | a77d615e1067fe5bb48444a073f7ee08fd273b8a (diff) | |
download | libyuv-2ad73733d93e0fc8932178e4211b3b4c36443ad1.tar.gz |
I422Rotate update to remove name space for ios build warning
- Remove libyuv:: from within libyuv to resolve a build warning on IOS.
- Check src_y parameter is not NULL if there is a dst_y parameter
- Apply clang-format
- Bump version
Performance on Intel Skylake Xeon
ARGBRotate90_Opt (795 ms)
I420Rotate90_Opt (283 ms)
I422Rotate90_Opt (867 ms) <-- scales and rotates
I444Rotate90_Opt (565 ms)
NV12Rotate90_Opt (289 ms)
Performance on Pixel 4 (Cortex A76)
ARGBRotate90_Opt (4208 ms)
I420Rotate90_Opt (273 ms)
I422Rotate90_Opt (1207 ms)
I444Rotate90_Opt (718 ms)
NV12Rotate90_Opt (282 ms)
Bug: libyuv:926
Change-Id: I42e1b93a9595f6ed075918e91bed977dd3d23f6f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3576778
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/row_common.cc')
-rw-r--r-- | source/row_common.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/row_common.cc b/source/row_common.cc index 3e5f419d..8cf826ec 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -22,10 +22,15 @@ namespace libyuv { extern "C" { #endif -// This macro control YUV to RGB using unsigned math to extend range of +// This macro controls YUV to RGB using unsigned math to extend range of // YUV to RGB coefficients to 0 to 4 instead of 0 to 2 for more accuracy on B: // LIBYUV_UNLIMITED_DATA +// Macros to enable unlimited data for each colorspace +// LIBYUV_UNLIMITED_BT601 +// LIBYUV_UNLIMITED_BT709 +// LIBYUV_UNLIMITED_BT2020 + // The following macro from row_win makes the C code match the row_win code, // which is 7 bit fixed point for ARGBToI420: #if !defined(LIBYUV_BIT_EXACT) && !defined(LIBYUV_DISABLE_X86) && \ @@ -1463,7 +1468,7 @@ void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width) { // KR = 0.299; KB = 0.114 // U and V contributions to R,G,B. -#ifdef LIBYUV_UNLIMITED_DATA +#if defined(LIBYUV_UNLIMITED_DATA) || defined(LIBYUV_UNLIMITED_BT601) #define UB 129 /* round(2.018 * 64) */ #else #define UB 128 /* max(128, round(2.018 * 64)) */ @@ -1517,7 +1522,7 @@ MAKEYUVCONSTANTS(JPEG, YG, YB, UB, UG, VG, VR) // KR = 0.2126, KB = 0.0722 // U and V contributions to R,G,B. -#ifdef LIBYUV_UNLIMITED_DATA +#if defined(LIBYUV_UNLIMITED_DATA) || defined(LIBYUV_UNLIMITED_BT709) #define UB 135 /* round(2.112 * 64) */ #else #define UB 128 /* max(128, round(2.112 * 64)) */ @@ -1571,7 +1576,7 @@ MAKEYUVCONSTANTS(F709, YG, YB, UB, UG, VG, VR) // KR = 0.2627; KB = 0.0593 // U and V contributions to R,G,B. -#ifdef LIBYUV_UNLIMITED_DATA +#if defined(LIBYUV_UNLIMITED_DATA) || defined(LIBYUV_UNLIMITED_BT2020) #define UB 137 /* round(2.142 * 64) */ #else #define UB 128 /* max(128, round(2.142 * 64)) */ |