aboutsummaryrefslogtreecommitdiff
path: root/source/row_neon.cc
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2022-03-25 11:05:19 -0700
committerlibyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-03-25 20:39:38 +0000
commitf4d25308467cbd50c2706a46fa0ddcef939e715a (patch)
tree2d629a487735cffa2beaff7219cefcfb697e1303 /source/row_neon.cc
parentebd9e130f0418b0ba67369663b1850285406fedf (diff)
downloadlibyuv-f4d25308467cbd50c2706a46fa0ddcef939e715a.tar.gz
Declare RgbConstants structs as static const
These RgbConstants structs were added in https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3534023. They should be declared as static const. These four symbols were detected by Chrome's android-binary-size trybot as "Mutable Constants". Change-Id: I3b4d4ff4b32e261ba528c07647b9d69ac368ab5b Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3553035 Reviewed-by: Mirko Bonadei <mbonadei@chromium.org> Commit-Queue: Wan-Teh Chang <wtc@google.com>
Diffstat (limited to 'source/row_neon.cc')
-rw-r--r--source/row_neon.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/row_neon.cc b/source/row_neon.cc
index aa3ac70a..cda171ad 100644
--- a/source/row_neon.cc
+++ b/source/row_neon.cc
@@ -2501,9 +2501,9 @@ struct RgbConstants {
// G * 0.5870 coefficient = 150
// R * 0.2990 coefficient = 77
// Add 0.5 = 0x80
-struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128};
+static const struct RgbConstants kRgb24JPEGConstants = {{29, 150, 77, 0}, 128};
-struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128};
+static const struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128};
// RGB to BT.601 coefficients
// B * 0.1016 coefficient = 25
@@ -2511,9 +2511,10 @@ struct RgbConstants kRawJPEGConstants = {{77, 150, 29, 0}, 128};
// R * 0.2578 coefficient = 66
// Add 16.5 = 0x1080
-struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0}, 0x1080};
+static const struct RgbConstants kRgb24I601Constants = {{25, 129, 66, 0},
+ 0x1080};
-struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080};
+static const struct RgbConstants kRawI601Constants = {{66, 129, 25, 0}, 0x1080};
// ARGB expects first 3 values to contain RGB and 4th value is ignored.
void ARGBToYMatrixRow_NEON(const uint8_t* src_argb,