Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Unified Diff: media/base/simd/convert_rgb_to_yuv_sse2.cc

Issue 10537037: Fix gcc 4.7 building problems - cont' (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Modified per Brett and Peter's comment Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/simd/convert_rgb_to_yuv_sse2.cc
diff --git a/media/base/simd/convert_rgb_to_yuv_sse2.cc b/media/base/simd/convert_rgb_to_yuv_sse2.cc
index bb803f6189cc637030baa65135fa4918acb44a35..b96bd3b0e8922b916752ec6d4f817537ac2a8c34 100644
--- a/media/base/simd/convert_rgb_to_yuv_sse2.cc
+++ b/media/base/simd/convert_rgb_to_yuv_sse2.cc
@@ -17,14 +17,15 @@ namespace media {
#define FIX_SHIFT 12
#define FIX(x) ((x) * (1 << FIX_SHIFT))
+#define INT16_FIX(x) static_cast<int16>(FIX(x))
SIMD_ALIGNED(const int16 ConvertRGBAToYUV_kTable[8 * 3]) = {
- FIX(0.098), FIX(0.504), FIX(0.257), 0,
- FIX(0.098), FIX(0.504), FIX(0.257), 0,
- FIX(0.439), -FIX(0.291), -FIX(0.148), 0,
- FIX(0.439), -FIX(0.291), -FIX(0.148), 0,
- -FIX(0.071), -FIX(0.368), FIX(0.439), 0,
- -FIX(0.071), -FIX(0.368), FIX(0.439), 0,
+ INT16_FIX(0.098), INT16_FIX(0.504), INT16_FIX(0.257), 0,
+ INT16_FIX(0.098), INT16_FIX(0.504), INT16_FIX(0.257), 0,
+ INT16_FIX(0.439), -INT16_FIX(0.291), -INT16_FIX(0.148), 0,
+ INT16_FIX(0.439), -INT16_FIX(0.291), -INT16_FIX(0.148), 0,
+ -INT16_FIX(0.071), -INT16_FIX(0.368), INT16_FIX(0.439), 0,
+ -INT16_FIX(0.071), -INT16_FIX(0.368), INT16_FIX(0.439), 0,
};
// This is the final offset for the conversion from signed yuv values to

Powered by Google App Engine
This is Rietveld 408576698