| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // yuv_row internal functions to handle YUV conversion and scaling to RGB. | 5 // yuv_row internal functions to handle YUV conversion and scaling to RGB. |
| 6 // These functions are used from both yuv_convert.cc and yuv_scale.cc. | 6 // These functions are used from both yuv_convert.cc and yuv_scale.cc. |
| 7 | 7 |
| 8 // TODO(fbarchard): Write function that can handle rotation and scaling. | 8 // TODO(fbarchard): Write function that can handle rotation and scaling. |
| 9 | 9 |
| 10 #ifndef MEDIA_BASE_YUV_ROW_H_ | 10 #ifndef MEDIA_BASE_YUV_ROW_H_ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #if !defined(USE_MMX) | 72 #if !defined(USE_MMX) |
| 73 // Windows, Mac and Linux/BSD use MMX | 73 // Windows, Mac and Linux/BSD use MMX |
| 74 #if defined(__MMX__) || defined(_MSC_VER) | 74 #if defined(__MMX__) || defined(_MSC_VER) |
| 75 #define USE_MMX 1 | 75 #define USE_MMX 1 |
| 76 #else | 76 #else |
| 77 #define USE_MMX 0 | 77 #define USE_MMX 0 |
| 78 #endif | 78 #endif |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 #if !defined(USE_SSE) | 81 #if !defined(USE_SSE) |
| 82 #if defined(__SSE2__) || defined(_MSC_VER) | 82 #if defined(__SSE2__) || defined(ARCH_CPU_X86_64) || _M_IX86_FP==2 |
| 83 #define USE_SSE 1 | 83 #define USE_SSE 1 |
| 84 #else | 84 #else |
| 85 #define USE_SSE 0 | 85 #define USE_SSE 0 |
| 86 #endif | 86 #endif |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 // x64 uses MMX2 (SSE) so emms is not required. | 89 // x64 uses MMX2 (SSE) so emms is not required. |
| 90 #if USE_MMX && !defined(ARCH_CPU_X86_64) | 90 #if USE_MMX && !defined(ARCH_CPU_X86_64) |
| 91 #if defined(_MSC_VER) | 91 #if defined(_MSC_VER) |
| 92 #define EMMS() __asm emms | 92 #define EMMS() __asm emms |
| 93 #pragma warning(disable: 4799) |
| 93 #else | 94 #else |
| 94 #define EMMS() asm("emms") | 95 #define EMMS() asm("emms") |
| 95 #endif | 96 #endif |
| 96 #else | 97 #else |
| 97 #define EMMS() | 98 #define EMMS() |
| 98 #endif | 99 #endif |
| 99 | 100 |
| 100 #endif // MEDIA_BASE_YUV_ROW_H_ | 101 #endif // MEDIA_BASE_YUV_ROW_H_ |
| OLD | NEW |