| 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 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, |
| 64 YUVType yuv_type); | 64 YUVType yuv_type); |
| 65 | 65 |
| 66 MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8* yplane, |
| 67 const uint8* uplane, |
| 68 const uint8* vplane, |
| 69 uint8* rgbframe, |
| 70 int width, |
| 71 int height, |
| 72 int ystride, |
| 73 int uvstride, |
| 74 int rgbstride, |
| 75 YUVType yuv_type); |
| 76 |
| 66 MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane, | 77 MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane, |
| 67 const uint8* uplane, | 78 const uint8* uplane, |
| 68 const uint8* vplane, | 79 const uint8* vplane, |
| 69 const uint8* aplane, | 80 const uint8* aplane, |
| 70 uint8* rgbframe, | 81 uint8* rgbframe, |
| 71 int width, | 82 int width, |
| 72 int height, | 83 int height, |
| 73 int ystride, | 84 int ystride, |
| 74 int uvstride, | 85 int uvstride, |
| 75 int avstride, | 86 int avstride, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Assembly functions are declared without namespace. | 119 // Assembly functions are declared without namespace. |
| 109 extern "C" { | 120 extern "C" { |
| 110 | 121 |
| 111 // We use ptrdiff_t instead of int for yasm routine parameters to portably | 122 // 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 | 123 // 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 | 124 // 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 | 125 // 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 | 126 // issue on at least Win64. The C-equivalent RowProc versions' prototypes |
| 116 // include the same change to ptrdiff_t to reuse the typedefs. | 127 // include the same change to ptrdiff_t to reuse the typedefs. |
| 117 | 128 |
| 129 MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane, |
| 130 const uint8* uplane, |
| 131 const uint8* vplane, |
| 132 uint8* rgbframe, |
| 133 ptrdiff_t width, |
| 134 const int16 convert_table[1024][4]); |
| 135 |
| 118 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, | 136 MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, |
| 119 const uint8* uplane, | 137 const uint8* uplane, |
| 120 const uint8* vplane, | 138 const uint8* vplane, |
| 121 const uint8* aplane, | 139 const uint8* aplane, |
| 122 uint8* rgbframe, | 140 uint8* rgbframe, |
| 123 ptrdiff_t width, | 141 ptrdiff_t width, |
| 124 const int16 convert_table[1024][4]); | 142 const int16 convert_table[1024][4]); |
| 125 | 143 |
| 126 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane, | 144 MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane, |
| 127 const uint8* uplane, | 145 const uint8* uplane, |
| 128 const uint8* vplane, | 146 const uint8* vplane, |
| 129 uint8* rgbframe, | 147 uint8* rgbframe, |
| 130 ptrdiff_t width, | 148 ptrdiff_t width, |
| 131 const int16 convert_table[1024][4]); | 149 const int16 convert_table[1024][4]); |
| 132 | 150 |
| 151 MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf, |
| 152 const uint8* u_buf, |
| 153 const uint8* v_buf, |
| 154 uint8* rgb_buf, |
| 155 ptrdiff_t width, |
| 156 ptrdiff_t source_dx, |
| 157 const int16 convert_table[1024][4]); |
| 158 |
| 133 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, | 159 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, |
| 134 const uint8* u_buf, | 160 const uint8* u_buf, |
| 135 const uint8* v_buf, | 161 const uint8* v_buf, |
| 136 uint8* rgb_buf, | 162 uint8* rgb_buf, |
| 137 ptrdiff_t width, | 163 ptrdiff_t width, |
| 138 ptrdiff_t source_dx, | 164 ptrdiff_t source_dx, |
| 139 const int16 convert_table[1024][4]); | 165 const int16 convert_table[1024][4]); |
| 140 | 166 |
| 141 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64( | 167 MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64( |
| 142 const uint8* y_buf, | 168 const uint8* y_buf, |
| 143 const uint8* u_buf, | 169 const uint8* u_buf, |
| 144 const uint8* v_buf, | 170 const uint8* v_buf, |
| 145 uint8* rgb_buf, | 171 uint8* rgb_buf, |
| 146 ptrdiff_t width, | 172 ptrdiff_t width, |
| 147 ptrdiff_t source_dx, | 173 ptrdiff_t source_dx, |
| 148 const int16 convert_table[1024][4]); | 174 const int16 convert_table[1024][4]); |
| 149 | 175 |
| 176 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX( |
| 177 const uint8* y_buf, |
| 178 const uint8* u_buf, |
| 179 const uint8* v_buf, |
| 180 uint8* rgb_buf, |
| 181 ptrdiff_t width, |
| 182 ptrdiff_t source_dx, |
| 183 const int16 convert_table[1024][4]); |
| 184 |
| 150 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE( | 185 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE( |
| 151 const uint8* y_buf, | 186 const uint8* y_buf, |
| 152 const uint8* u_buf, | 187 const uint8* u_buf, |
| 153 const uint8* v_buf, | 188 const uint8* v_buf, |
| 154 uint8* rgb_buf, | 189 uint8* rgb_buf, |
| 155 ptrdiff_t width, | 190 ptrdiff_t width, |
| 156 ptrdiff_t source_dx, | 191 ptrdiff_t source_dx, |
| 157 const int16 convert_table[1024][4]); | 192 const int16 convert_table[1024][4]); |
| 158 | 193 |
| 159 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64( | 194 MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX_X64( |
| 160 const uint8* y_buf, | 195 const uint8* y_buf, |
| 161 const uint8* u_buf, | 196 const uint8* u_buf, |
| 162 const uint8* v_buf, | 197 const uint8* v_buf, |
| 163 uint8* rgb_buf, | 198 uint8* rgb_buf, |
| 164 ptrdiff_t width, | 199 ptrdiff_t width, |
| 165 ptrdiff_t source_dx, | 200 ptrdiff_t source_dx, |
| 166 const int16 convert_table[1024][4]); | 201 const int16 convert_table[1024][4]); |
| 167 | 202 |
| 168 } // extern "C" | 203 } // extern "C" |
| 169 | 204 |
| 170 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ | 205 #endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ |
| OLD | NEW |