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 #ifndef MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ | 5 #ifndef MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ |
6 #define MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ | 6 #define MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "media/base/yuv_convert.h" | 9 #include "media/base/yuv_convert.h" |
10 | 10 |
11 namespace media { | 11 namespace media { |
12 | 12 |
13 typedef void (*ConvertYUVToRGB32Proc)(const uint8*, | 13 typedef void (*ConvertYUVToRGB32Proc)(const uint8*, |
14 const uint8*, | 14 const uint8*, |
15 const uint8*, | 15 const uint8*, |
16 uint8*, | 16 uint8*, |
17 int, | 17 int, |
18 int, | 18 int, |
19 int, | 19 int, |
20 int, | 20 int, |
21 int, | 21 int, |
22 YUVType); | 22 YUVType); |
23 | 23 |
| 24 typedef void (*ConvertYUVAToARGBProc)(const uint8*, |
| 25 const uint8*, |
| 26 const uint8*, |
| 27 const uint8*, |
| 28 uint8*, |
| 29 int, |
| 30 int, |
| 31 int, |
| 32 int, |
| 33 int, |
| 34 int, |
| 35 YUVType); |
| 36 |
24 void ConvertYUVToRGB32_C(const uint8* yplane, | 37 void ConvertYUVToRGB32_C(const uint8* yplane, |
25 const uint8* uplane, | 38 const uint8* uplane, |
26 const uint8* vplane, | 39 const uint8* vplane, |
27 uint8* rgbframe, | 40 uint8* rgbframe, |
28 int width, | 41 int width, |
29 int height, | 42 int height, |
30 int ystride, | 43 int ystride, |
31 int uvstride, | 44 int uvstride, |
32 int rgbstride, | 45 int rgbstride, |
33 YUVType yuv_type); | 46 YUVType yuv_type); |
34 | 47 |
| 48 void ConvertYUVAToARGB_C(const uint8* yplane, |
| 49 const uint8* uplane, |
| 50 const uint8* vplane, |
| 51 const uint8* aplane, |
| 52 uint8* rgbframe, |
| 53 int width, |
| 54 int height, |
| 55 int ystride, |
| 56 int uvstride, |
| 57 int avstride, |
| 58 int rgbstride, |
| 59 YUVType yuv_type); |
| 60 |
35 void ConvertYUVToRGB32_SSE(const uint8* yplane, | 61 void ConvertYUVToRGB32_SSE(const uint8* yplane, |
36 const uint8* uplane, | 62 const uint8* uplane, |
37 const uint8* vplane, | 63 const uint8* vplane, |
38 uint8* rgbframe, | 64 uint8* rgbframe, |
39 int width, | 65 int width, |
40 int height, | 66 int height, |
41 int ystride, | 67 int ystride, |
42 int uvstride, | 68 int uvstride, |
43 int rgbstride, | 69 int rgbstride, |
44 YUVType yuv_type); | 70 YUVType yuv_type); |
45 | 71 |
46 void ConvertYUVToRGB32_MMX(const uint8* yplane, | 72 void ConvertYUVToRGB32_MMX(const uint8* yplane, |
47 const uint8* uplane, | 73 const uint8* uplane, |
48 const uint8* vplane, | 74 const uint8* vplane, |
49 uint8* rgbframe, | 75 uint8* rgbframe, |
50 int width, | 76 int width, |
51 int height, | 77 int height, |
52 int ystride, | 78 int ystride, |
53 int uvstride, | 79 int uvstride, |
54 int rgbstride, | 80 int rgbstride, |
55 YUVType yuv_type); | 81 YUVType yuv_type); |
56 | 82 |
| 83 void ConvertYUVAToARGB_MMX(const uint8* yplane, |
| 84 const uint8* uplane, |
| 85 const uint8* vplane, |
| 86 const uint8* aplane, |
| 87 uint8* rgbframe, |
| 88 int width, |
| 89 int height, |
| 90 int ystride, |
| 91 int uvstride, |
| 92 int avstride, |
| 93 int rgbstride, |
| 94 YUVType yuv_type); |
| 95 |
57 } // namespace media | 96 } // namespace media |
58 | 97 |
59 // Assembly functions are declared without namespace. | 98 // Assembly functions are declared without namespace. |
60 extern "C" { | 99 extern "C" { |
61 | 100 |
62 typedef void (*ConvertYUVToRGB32RowProc)(const uint8*, | 101 typedef void (*ConvertYUVToRGB32RowProc)(const uint8*, |
63 const uint8*, | 102 const uint8*, |
64 const uint8*, | 103 const uint8*, |
65 uint8*, | 104 uint8*, |
66 int); | 105 int); |
| 106 typedef void (*ConvertYUVAToARGBRowProc)(const uint8*, |
| 107 const uint8*, |
| 108 const uint8*, |
| 109 const uint8*, |
| 110 uint8*, |
| 111 int); |
67 typedef void (*ScaleYUVToRGB32RowProc)(const uint8*, | 112 typedef void (*ScaleYUVToRGB32RowProc)(const uint8*, |
68 const uint8*, | 113 const uint8*, |
69 const uint8*, | 114 const uint8*, |
70 uint8*, | 115 uint8*, |
71 int, | 116 int, |
72 int); | 117 int); |
73 | 118 |
74 void ConvertYUVToRGB32Row_C(const uint8* yplane, | 119 void ConvertYUVToRGB32Row_C(const uint8* yplane, |
75 const uint8* uplane, | 120 const uint8* uplane, |
76 const uint8* vplane, | 121 const uint8* vplane, |
77 uint8* rgbframe, | 122 uint8* rgbframe, |
78 int width); | 123 int width); |
79 | 124 |
| 125 void ConvertYUVAToARGBRow_C(const uint8* yplane, |
| 126 const uint8* uplane, |
| 127 const uint8* vplane, |
| 128 const uint8* aplane, |
| 129 uint8* rgbframe, |
| 130 int width); |
| 131 |
80 void ConvertYUVToRGB32Row_MMX(const uint8* yplane, | 132 void ConvertYUVToRGB32Row_MMX(const uint8* yplane, |
81 const uint8* uplane, | 133 const uint8* uplane, |
82 const uint8* vplane, | 134 const uint8* vplane, |
83 uint8* rgbframe, | 135 uint8* rgbframe, |
84 int width); | 136 int width); |
85 | 137 |
| 138 void ConvertYUVAToARGBRow_MMX(const uint8* yplane, |
| 139 const uint8* uplane, |
| 140 const uint8* vplane, |
| 141 const uint8* aplane, |
| 142 uint8* rgbframe, |
| 143 int width); |
| 144 |
86 void ConvertYUVToRGB32Row_SSE(const uint8* yplane, | 145 void ConvertYUVToRGB32Row_SSE(const uint8* yplane, |
87 const uint8* uplane, | 146 const uint8* uplane, |
88 const uint8* vplane, | 147 const uint8* vplane, |
89 uint8* rgbframe, | 148 uint8* rgbframe, |
90 int width); | 149 int width); |
91 | 150 |
92 void ScaleYUVToRGB32Row_C(const uint8* y_buf, | 151 void ScaleYUVToRGB32Row_C(const uint8* y_buf, |
93 const uint8* u_buf, | 152 const uint8* u_buf, |
94 const uint8* v_buf, | 153 const uint8* v_buf, |
95 uint8* rgb_buf, | 154 uint8* rgb_buf, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void LinearScaleYUVToRGB32Row_MMX_X64(const uint8* y_buf, | 208 void LinearScaleYUVToRGB32Row_MMX_X64(const uint8* y_buf, |
150 const uint8* u_buf, | 209 const uint8* u_buf, |
151 const uint8* v_buf, | 210 const uint8* v_buf, |
152 uint8* rgb_buf, | 211 uint8* rgb_buf, |
153 int width, | 212 int width, |
154 int source_dx); | 213 int source_dx); |
155 | 214 |
156 } // extern "C" | 215 } // extern "C" |
157 | 216 |
158 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ | 217 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ |
OLD | NEW |