Check if LIBYUV_UNLIMITED_DATA is defined to avoid -Wundef.

No-Try: True
Bug: None
Change-Id: I32f6da42c82628210f82ce446d4ec69e2013a2ff
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2799761
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Mirko Bonadei 2021-04-01 17:39:01 +02:00 committed by Commit Bot
parent 8a13626e42
commit 34bf48e160

View File

@ -1486,7 +1486,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.
#if LIBYUV_UNLIMITED_DATA
#if defined(LIBYUV_UNLIMITED_DATA)
#define UB 129 /* round(2.018 * 64) */
#else
#define UB 128 /* max(128, round(2.018 * 64)) */
@ -1540,7 +1540,7 @@ MAKEYUVCONSTANTS(JPEG, YG, YB, UB, UG, VG, VR, BB, BG, BR)
// KR = 0.2126, KB = 0.0722
// U and V contributions to R,G,B.
#if LIBYUV_UNLIMITED_DATA
#if defined(LIBYUV_UNLIMITED_DATA)
#define UB 135 /* round(2.112 * 64) */
#else
#define UB 128 /* max(128, round(2.112 * 64)) */
@ -1594,7 +1594,7 @@ MAKEYUVCONSTANTS(F709, YG, YB, UB, UG, VG, VR, BB, BG, BR)
// KR = 0.2627; KB = 0.0593
// U and V contributions to R,G,B.
#if LIBYUV_UNLIMITED_DATA
#if defined(LIBYUV_UNLIMITED_DATA)
#define UB 137 /* round(2.142 * 64) */
#else
#define UB 128 /* max(128, round(2.142 * 64)) */
@ -1646,7 +1646,7 @@ MAKEYUVCONSTANTS(V2020, YG, YB, UB, UG, VG, VR, BB, BG, BR)
#undef MAKEYUVCONSTANTS
#if LIBYUV_UNLIMITED_DATA
#if defined(LIBYUV_UNLIMITED_DATA)
// C reference code that mimics the YUV assembly.
// Reads 8 bit YUV and leaves result as 16 bit.