OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 // This is the slowest of the scalers. | 56 // This is the slowest of the scalers. |
57 void ScaleYUVToRGB32Row(const uint8* y_buf, | 57 void ScaleYUVToRGB32Row(const uint8* y_buf, |
58 const uint8* u_buf, | 58 const uint8* u_buf, |
59 const uint8* v_buf, | 59 const uint8* v_buf, |
60 uint8* rgb_buf, | 60 uint8* rgb_buf, |
61 int width, | 61 int width, |
62 int scaled_dx); | 62 int scaled_dx); |
63 } // extern "C" | 63 } // extern "C" |
64 | 64 |
65 #if !defined(USE_MMX) | 65 #if !defined(USE_MMX) |
66 // Windows, Mac and Linux use MMX | 66 // Windows, Mac and Linux/BSD use MMX |
Evan Martin
2010/03/25 21:42:08
I guess this comment is wrong, since Mac is specif
Peter Valchev
2010/03/25 21:47:29
it's only excluded in the 64-bit case, i'm not fam
fbarchard
2010/03/26 01:43:42
For Mac, its my intent to use the linux x264 code.
Peter Valchev
2010/03/26 23:49:46
Yes, yuv_row_linux.cc is actually used on BSD :) M
fbarchard
2010/03/30 01:51:02
I wrote the mac code, and there is only 32 bit ver
| |
67 #if defined(ARCH_CPU_X86) || (defined(ARCH_CPU_X86_64) && defined(OS_LINUX)) | 67 #if defined(ARCH_CPU_X86) || (defined(ARCH_CPU_X86_64) && defined(OS_POSIX) && ! defined(OS_MACOSX)) |
68 #define USE_MMX 1 | 68 #define USE_MMX 1 |
69 #else | 69 #else |
70 #define USE_MMX 0 | 70 #define USE_MMX 0 |
71 #endif | 71 #endif |
72 #endif | 72 #endif |
73 | 73 |
74 // x64 uses MMX2 (SSE) so emms is not required. | 74 // x64 uses MMX2 (SSE) so emms is not required. |
75 #if USE_MMX && !defined(ARCH_CPU_X86_64) | 75 #if USE_MMX && !defined(ARCH_CPU_X86_64) |
76 #if defined(_MSC_VER) | 76 #if defined(_MSC_VER) |
77 #define EMMS() __asm emms | 77 #define EMMS() __asm emms |
78 #else | 78 #else |
79 #define EMMS() asm("emms") | 79 #define EMMS() asm("emms") |
80 #endif | 80 #endif |
81 #else | 81 #else |
82 #define EMMS() | 82 #define EMMS() |
83 #endif | 83 #endif |
84 | 84 |
85 #endif // MEDIA_BASE_YUV_ROW_H_ | 85 #endif // MEDIA_BASE_YUV_ROW_H_ |
OLD | NEW |