OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This webpage shows layout of YV12 and other YUV formats | 5 // This webpage shows layout of YV12 and other YUV formats |
6 // http://www.fourcc.org/yuv.php | 6 // http://www.fourcc.org/yuv.php |
7 // The actual conversion is best described here | 7 // The actual conversion is best described here |
8 // http://en.wikipedia.org/wiki/YUV | 8 // http://en.wikipedia.org/wiki/YUV |
9 // An article on optimizing YUV conversion using tables instead of multiplies | 9 // An article on optimizing YUV conversion using tables instead of multiplies |
10 // http://lestourtereaux.free.fr/papers/data/yuvrgb.pdf | 10 // http://lestourtereaux.free.fr/papers/data/yuvrgb.pdf |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 g_filter_yuv_rows_proc_ = FilterYUVRows_C; | 125 g_filter_yuv_rows_proc_ = FilterYUVRows_C; |
126 g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_C; | 126 g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_C; |
127 g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_C; | 127 g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_C; |
128 g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_C; | 128 g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_C; |
129 g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_C; | 129 g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_C; |
130 g_convert_rgb24_to_yuv_proc_ = ConvertRGB24ToYUV_C; | 130 g_convert_rgb24_to_yuv_proc_ = ConvertRGB24ToYUV_C; |
131 g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_C; | 131 g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_C; |
132 g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_C; | 132 g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_C; |
133 g_empty_register_state_proc_ = EmptyRegisterStateStub; | 133 g_empty_register_state_proc_ = EmptyRegisterStateStub; |
134 | 134 |
135 #if defined(ARCH_CPU_X86_FAMILY) | 135 // Assembly code confuses MemorySanitizer. |
| 136 #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) |
136 base::CPU cpu; | 137 base::CPU cpu; |
137 if (cpu.has_mmx()) { | 138 if (cpu.has_mmx()) { |
138 g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; | 139 g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; |
139 g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; | 140 g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; |
140 g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; | 141 g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; |
141 g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; | 142 g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; |
142 g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; | 143 g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; |
143 | 144 |
144 #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) | 145 #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) |
145 g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; | 146 g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 width, | 646 width, |
646 height, | 647 height, |
647 ystride, | 648 ystride, |
648 uvstride, | 649 uvstride, |
649 astride, | 650 astride, |
650 rgbstride, | 651 rgbstride, |
651 yuv_type); | 652 yuv_type); |
652 } | 653 } |
653 | 654 |
654 } // namespace media | 655 } // namespace media |
OLD | NEW |