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

Side by Side Diff: media/base/simd/convert_yuv_to_rgb.h

Issue 263723004: Revert of Add correct support for videos with YUVJ420P color format, in the software conversion path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuvnopic
Patch Set: Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | media/base/simd/convert_yuv_to_rgb_c.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 10 matching lines...) Expand all
21 int height, 21 int height,
22 int ystride, 22 int ystride,
23 int uvstride, 23 int uvstride,
24 int rgbstride, 24 int rgbstride,
25 YUVType yuv_type); 25 YUVType yuv_type);
26 26
27 MEDIA_EXPORT void ConvertYUVToRGB32Row_C(const uint8* yplane, 27 MEDIA_EXPORT void ConvertYUVToRGB32Row_C(const uint8* yplane,
28 const uint8* uplane, 28 const uint8* uplane,
29 const uint8* vplane, 29 const uint8* vplane,
30 uint8* rgbframe, 30 uint8* rgbframe,
31 ptrdiff_t width, 31 ptrdiff_t width);
32 const int16 convert_table[1024][4]);
33 32
34 MEDIA_EXPORT void ConvertYUVAToARGB_C(const uint8* yplane, 33 MEDIA_EXPORT void ConvertYUVAToARGB_C(const uint8* yplane,
35 const uint8* uplane, 34 const uint8* uplane,
36 const uint8* vplane, 35 const uint8* vplane,
37 const uint8* aplane, 36 const uint8* aplane,
38 uint8* rgbframe, 37 uint8* rgbframe,
39 int width, 38 int width,
40 int height, 39 int height,
41 int ystride, 40 int ystride,
42 int uvstride, 41 int uvstride,
43 int avstride, 42 int avstride,
44 int rgbstride, 43 int rgbstride,
45 YUVType yuv_type); 44 YUVType yuv_type);
46 45
47 MEDIA_EXPORT void ConvertYUVAToARGBRow_C(const uint8* yplane, 46 MEDIA_EXPORT void ConvertYUVAToARGBRow_C(const uint8* yplane,
48 const uint8* uplane, 47 const uint8* uplane,
49 const uint8* vplane, 48 const uint8* vplane,
50 const uint8* aplane, 49 const uint8* aplane,
51 uint8* rgbframe, 50 uint8* rgbframe,
52 ptrdiff_t width, 51 ptrdiff_t width);
53 const int16 convert_table[1024][4]);
54 52
55 MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane, 53 MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane,
56 const uint8* uplane, 54 const uint8* uplane,
57 const uint8* vplane, 55 const uint8* vplane,
58 uint8* rgbframe, 56 uint8* rgbframe,
59 int width, 57 int width,
60 int height, 58 int height,
61 int ystride, 59 int ystride,
62 int uvstride, 60 int uvstride,
63 int rgbstride, 61 int rgbstride,
(...skipping 21 matching lines...) Expand all
85 int uvstride, 83 int uvstride,
86 int avstride, 84 int avstride,
87 int rgbstride, 85 int rgbstride,
88 YUVType yuv_type); 86 YUVType yuv_type);
89 87
90 MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8* y_buf, 88 MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8* y_buf,
91 const uint8* u_buf, 89 const uint8* u_buf,
92 const uint8* v_buf, 90 const uint8* v_buf,
93 uint8* rgb_buf, 91 uint8* rgb_buf,
94 ptrdiff_t width, 92 ptrdiff_t width,
95 ptrdiff_t source_dx, 93 ptrdiff_t source_dx);
96 const int16 convert_table[1024][4]);
97 94
98 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C( 95 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8* y_buf,
99 const uint8* y_buf, 96 const uint8* u_buf,
100 const uint8* u_buf, 97 const uint8* v_buf,
101 const uint8* v_buf, 98 uint8* rgb_buf,
102 uint8* rgb_buf, 99 ptrdiff_t width,
103 ptrdiff_t width, 100 ptrdiff_t source_dx);
104 ptrdiff_t source_dx,
105 const int16 convert_table[1024][4]);
106 101
107 MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( 102 MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C(const uint8* y_buf,
108 const uint8* y_buf, 103 const uint8* u_buf,
109 const uint8* u_buf, 104 const uint8* v_buf,
110 const uint8* v_buf, 105 uint8* rgb_buf,
111 uint8* rgb_buf, 106 int dest_width,
112 int dest_width, 107 int source_x,
113 int source_x, 108 int source_dx);
114 int source_dx,
115 const int16 convert_table[1024][4]);
116 109
117 } // namespace media 110 } // namespace media
118 111
119 // Assembly functions are declared without namespace. 112 // Assembly functions are declared without namespace.
120 extern "C" { 113 extern "C" {
121 114
122 // We use ptrdiff_t instead of int for yasm routine parameters to portably 115 // We use ptrdiff_t instead of int for yasm routine parameters to portably
123 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack 116 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack
124 // home of int function parameters, and yasm routines are unaware of this lack 117 // home of int function parameters, and yasm routines are unaware of this lack
125 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this 118 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this
126 // issue on at least Win64. The C-equivalent RowProc versions' prototypes 119 // issue on at least Win64. The C-equivalent RowProc versions' prototypes
127 // include the same change to ptrdiff_t to reuse the typedefs. 120 // include the same change to ptrdiff_t to reuse the typedefs.
128 121
129 MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane, 122 MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane,
130 const uint8* uplane, 123 const uint8* uplane,
131 const uint8* vplane, 124 const uint8* vplane,
132 uint8* rgbframe, 125 uint8* rgbframe,
133 ptrdiff_t width, 126 ptrdiff_t width);
134 const int16 convert_table[1024][4]);
135 127
136 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, 128 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane,
137 const uint8* uplane, 129 const uint8* uplane,
138 const uint8* vplane, 130 const uint8* vplane,
139 const uint8* aplane, 131 const uint8* aplane,
140 uint8* rgbframe, 132 uint8* rgbframe,
141 ptrdiff_t width, 133 ptrdiff_t width);
142 const int16 convert_table[1024][4]);
143 134
144 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane, 135 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane,
145 const uint8* uplane, 136 const uint8* uplane,
146 const uint8* vplane, 137 const uint8* vplane,
147 uint8* rgbframe, 138 uint8* rgbframe,
148 ptrdiff_t width, 139 ptrdiff_t width);
149 const int16 convert_table[1024][4]);
150 140
151 MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf, 141 MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf,
152 const uint8* u_buf, 142 const uint8* u_buf,
153 const uint8* v_buf, 143 const uint8* v_buf,
154 uint8* rgb_buf, 144 uint8* rgb_buf,
155 ptrdiff_t width, 145 ptrdiff_t width,
156 ptrdiff_t source_dx, 146 ptrdiff_t source_dx);
157 const int16 convert_table[1024][4]);
158 147
159 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, 148 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
160 const uint8* u_buf, 149 const uint8* u_buf,
161 const uint8* v_buf, 150 const uint8* v_buf,
162 uint8* rgb_buf, 151 uint8* rgb_buf,
163 ptrdiff_t width, 152 ptrdiff_t width,
164 ptrdiff_t source_dx, 153 ptrdiff_t source_dx);
165 const int16 convert_table[1024][4]);
166 154
167 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64( 155 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64(const uint8* y_buf,
168 const uint8* y_buf, 156 const uint8* u_buf,
169 const uint8* u_buf, 157 const uint8* v_buf,
170 const uint8* v_buf, 158 uint8* rgb_buf,
171 uint8* rgb_buf, 159 ptrdiff_t width,
172 ptrdiff_t width, 160 ptrdiff_t source_dx);
173 ptrdiff_t source_dx,
174 const int16 convert_table[1024][4]);
175 161
176 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX( 162 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8* y_buf,
177 const uint8* y_buf, 163 const uint8* u_buf,
178 const uint8* u_buf, 164 const uint8* v_buf,
179 const uint8* v_buf, 165 uint8* rgb_buf,
180 uint8* rgb_buf, 166 ptrdiff_t width,
181 ptrdiff_t width, 167 ptrdiff_t source_dx);
182 ptrdiff_t source_dx,
183 const int16 convert_table[1024][4]);
184 168
185 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE( 169 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
186 const uint8* y_buf, 170 const uint8* u_buf,
187 const uint8* u_buf, 171 const uint8* v_buf,
188 const uint8* v_buf, 172 uint8* rgb_buf,
189 uint8* rgb_buf, 173 ptrdiff_t width,
190 ptrdiff_t width, 174 ptrdiff_t source_dx);
191 ptrdiff_t source_dx,
192 const int16 convert_table[1024][4]);
193 175
194 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64( 176 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64(const uint8* y_buf,
195 const uint8* y_buf, 177 const uint8* u_buf,
196 const uint8* u_buf, 178 const uint8* v_buf,
197 const uint8* v_buf, 179 uint8* rgb_buf,
198 uint8* rgb_buf, 180 ptrdiff_t width,
199 ptrdiff_t width, 181 ptrdiff_t source_dx);
200 ptrdiff_t source_dx,
201 const int16 convert_table[1024][4]);
202 182
203 } // extern "C" 183 } // extern "C"
204 184
205 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ 185 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_
OLDNEW
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | media/base/simd/convert_yuv_to_rgb_c.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698