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

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

Issue 591313008: Add support for Rec709 color space videos in software YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add enum to mojom Created 5 years, 11 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 | « media/base/simd/convert_rgb_to_yuv_sse2.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 11 matching lines...) Expand all
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]); 32 const int16* convert_table);
33 33
34 MEDIA_EXPORT void ConvertYUVAToARGB_C(const uint8* yplane, 34 MEDIA_EXPORT void ConvertYUVAToARGB_C(const uint8* yplane,
35 const uint8* uplane, 35 const uint8* uplane,
36 const uint8* vplane, 36 const uint8* vplane,
37 const uint8* aplane, 37 const uint8* aplane,
38 uint8* rgbframe, 38 uint8* rgbframe,
39 int width, 39 int width,
40 int height, 40 int height,
41 int ystride, 41 int ystride,
42 int uvstride, 42 int uvstride,
43 int avstride, 43 int avstride,
44 int rgbstride, 44 int rgbstride,
45 YUVType yuv_type); 45 YUVType yuv_type);
46 46
47 MEDIA_EXPORT void ConvertYUVAToARGBRow_C(const uint8* yplane, 47 MEDIA_EXPORT void ConvertYUVAToARGBRow_C(const uint8* yplane,
48 const uint8* uplane, 48 const uint8* uplane,
49 const uint8* vplane, 49 const uint8* vplane,
50 const uint8* aplane, 50 const uint8* aplane,
51 uint8* rgbframe, 51 uint8* rgbframe,
52 ptrdiff_t width, 52 ptrdiff_t width,
53 const int16 convert_table[1024][4]); 53 const int16* convert_table);
54 54
55 MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane, 55 MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane,
56 const uint8* uplane, 56 const uint8* uplane,
57 const uint8* vplane, 57 const uint8* vplane,
58 uint8* rgbframe, 58 uint8* rgbframe,
59 int width, 59 int width,
60 int height, 60 int height,
61 int ystride, 61 int ystride,
62 int uvstride, 62 int uvstride,
63 int rgbstride, 63 int rgbstride,
(...skipping 11 matching lines...) Expand all
75 int avstride, 75 int avstride,
76 int rgbstride, 76 int rgbstride,
77 YUVType yuv_type); 77 YUVType yuv_type);
78 78
79 MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8* y_buf, 79 MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8* y_buf,
80 const uint8* u_buf, 80 const uint8* u_buf,
81 const uint8* v_buf, 81 const uint8* v_buf,
82 uint8* rgb_buf, 82 uint8* rgb_buf,
83 ptrdiff_t width, 83 ptrdiff_t width,
84 ptrdiff_t source_dx, 84 ptrdiff_t source_dx,
85 const int16 convert_table[1024][4]); 85 const int16* convert_table);
86 86
87 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C( 87 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8* y_buf,
88 const uint8* y_buf, 88 const uint8* u_buf,
89 const uint8* u_buf, 89 const uint8* v_buf,
90 const uint8* v_buf, 90 uint8* rgb_buf,
91 uint8* rgb_buf, 91 ptrdiff_t width,
92 ptrdiff_t width, 92 ptrdiff_t source_dx,
93 ptrdiff_t source_dx, 93 const int16* convert_table);
94 const int16 convert_table[1024][4]);
95 94
96 MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( 95 MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C(
97 const uint8* y_buf, 96 const uint8* y_buf,
98 const uint8* u_buf, 97 const uint8* u_buf,
99 const uint8* v_buf, 98 const uint8* v_buf,
100 uint8* rgb_buf, 99 uint8* rgb_buf,
101 int dest_width, 100 int dest_width,
102 int source_x, 101 int source_x,
103 int source_dx, 102 int source_dx,
104 const int16 convert_table[1024][4]); 103 const int16* convert_table);
105 104
106 } // namespace media 105 } // namespace media
107 106
108 // Assembly functions are declared without namespace. 107 // Assembly functions are declared without namespace.
109 extern "C" { 108 extern "C" {
110 109
111 // We use ptrdiff_t instead of int for yasm routine parameters to portably 110 // We use ptrdiff_t instead of int for yasm routine parameters to portably
112 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack 111 // sign-extend int. On Win64, MSVC does not sign-extend the value in the stack
113 // home of int function parameters, and yasm routines are unaware of this lack 112 // home of int function parameters, and yasm routines are unaware of this lack
114 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this 113 // of extension and fault. ptrdiff_t is portably sign-extended and fixes this
115 // issue on at least Win64. The C-equivalent RowProc versions' prototypes 114 // issue on at least Win64. The C-equivalent RowProc versions' prototypes
116 // include the same change to ptrdiff_t to reuse the typedefs. 115 // include the same change to ptrdiff_t to reuse the typedefs.
117 116
118 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, 117 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane,
119 const uint8* uplane, 118 const uint8* uplane,
120 const uint8* vplane, 119 const uint8* vplane,
121 const uint8* aplane, 120 const uint8* aplane,
122 uint8* rgbframe, 121 uint8* rgbframe,
123 ptrdiff_t width, 122 ptrdiff_t width,
124 const int16 convert_table[1024][4]); 123 const int16* convert_table);
125 124
126 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane, 125 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane,
127 const uint8* uplane, 126 const uint8* uplane,
128 const uint8* vplane, 127 const uint8* vplane,
129 uint8* rgbframe, 128 uint8* rgbframe,
130 ptrdiff_t width, 129 ptrdiff_t width,
131 const int16 convert_table[1024][4]); 130 const int16* convert_table);
132 131
133 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, 132 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
134 const uint8* u_buf, 133 const uint8* u_buf,
135 const uint8* v_buf, 134 const uint8* v_buf,
136 uint8* rgb_buf, 135 uint8* rgb_buf,
137 ptrdiff_t width, 136 ptrdiff_t width,
138 ptrdiff_t source_dx, 137 ptrdiff_t source_dx,
139 const int16 convert_table[1024][4]); 138 const int16* convert_table);
140 139
141 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64( 140 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64(const uint8* y_buf,
142 const uint8* y_buf, 141 const uint8* u_buf,
143 const uint8* u_buf, 142 const uint8* v_buf,
144 const uint8* v_buf, 143 uint8* rgb_buf,
145 uint8* rgb_buf, 144 ptrdiff_t width,
146 ptrdiff_t width, 145 ptrdiff_t source_dx,
147 ptrdiff_t source_dx, 146 const int16* convert_table);
148 const int16 convert_table[1024][4]);
149 147
150 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE( 148 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
151 const uint8* y_buf, 149 const uint8* u_buf,
152 const uint8* u_buf, 150 const uint8* v_buf,
153 const uint8* v_buf, 151 uint8* rgb_buf,
154 uint8* rgb_buf, 152 ptrdiff_t width,
155 ptrdiff_t width, 153 ptrdiff_t source_dx,
156 ptrdiff_t source_dx, 154 const int16* convert_table);
157 const int16 convert_table[1024][4]);
158 155
159 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64( 156 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64(const uint8* y_buf,
160 const uint8* y_buf, 157 const uint8* u_buf,
161 const uint8* u_buf, 158 const uint8* v_buf,
162 const uint8* v_buf, 159 uint8* rgb_buf,
163 uint8* rgb_buf, 160 ptrdiff_t width,
164 ptrdiff_t width, 161 ptrdiff_t source_dx,
165 ptrdiff_t source_dx, 162 const int16* convert_table);
166 const int16 convert_table[1024][4]);
167 163
168 } // extern "C" 164 } // extern "C"
169 165
170 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ 166 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_
OLDNEW
« no previous file with comments | « media/base/simd/convert_rgb_to_yuv_sse2.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