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

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

Issue 10543080: Fix gcc 4.7 building problems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | webkit/glue/webcursor_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/simd/convert_rgb_to_yuv_sse2.cc
===================================================================
--- media/base/simd/convert_rgb_to_yuv_sse2.cc (revision 141258)
+++ media/base/simd/convert_rgb_to_yuv_sse2.cc (working copy)
@@ -18,15 +18,20 @@
#define FIX_SHIFT 12
#define FIX(x) ((x) * (1 << FIX_SHIFT))
+// Define a convenient macro to do static cast.
+#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,
};
+#undef INT16_FIX
+
// This is the final offset for the conversion from signed yuv values to
// unsigned values. It is arranged so that offset of 16 is applied to Y
// components and 128 is added to UV components for 2 pixels.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | webkit/glue/webcursor_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698