| OLD | NEW |
| 1 ; Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 ; Copyright (c) 2011 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 %include "media/base/simd/media_export.asm" | 5 %include "media/base/simd/media_export.asm" |
| 6 %include "third_party/x86inc/x86inc.asm" | 6 %include "third_party/x86inc/x86inc.asm" |
| 7 | 7 |
| 8 ; | 8 ; |
| 9 ; This file uses SSE, SSE2, SSE3, and SSSE3, which are supported by all ATOM | 9 ; This file uses SSE, SSE2, SSE3, and SSSE3, which are supported by all ATOM |
| 10 ; processors. | 10 ; processors. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 %if SUBSAMPLING == 1 && LINE == 1 | 234 %if SUBSAMPLING == 1 && LINE == 1 |
| 235 ; %1.b[0] = (%1.b[0] + %3.b[0] + 1) / 2; | 235 ; %1.b[0] = (%1.b[0] + %3.b[0] + 1) / 2; |
| 236 ; %1.b[1] = (%1.b[1] + %3.b[1] + 1) / 2; | 236 ; %1.b[1] = (%1.b[1] + %3.b[1] + 1) / 2; |
| 237 movd xmm2, %4 | 237 movd xmm2, %4 |
| 238 pavgb %1, xmm2 | 238 pavgb %1, xmm2 |
| 239 %endif | 239 %endif |
| 240 %endmacro | 240 %endmacro |
| 241 | 241 |
| 242 ; | 242 ; |
| 243 ; extern "C" void ConvertARGBToYUVRow_SSSE3(const uint8* argb, | 243 ; extern "C" void ConvertARGBToYUVRow_SSSE3(const uint8_t* argb, |
| 244 ; uint8* y, | 244 ; uint8_t* y, |
| 245 ; uint8* u, | 245 ; uint8_t* u, |
| 246 ; uint8* v, | 246 ; uint8_t* v, |
| 247 ; ptrdiff_t width); | 247 ; ptrdiff_t width); |
| 248 ; | 248 ; |
| 249 %define SYMBOL ConvertARGBToYUVRow_SSSE3 | 249 %define SYMBOL ConvertARGBToYUVRow_SSSE3 |
| 250 %define PIXELSIZE 4 | 250 %define PIXELSIZE 4 |
| 251 %define SUBSAMPLING 0 | 251 %define SUBSAMPLING 0 |
| 252 %define LINE 0 | 252 %define LINE 0 |
| 253 %include "convert_rgb_to_yuv_ssse3.inc" | 253 %include "convert_rgb_to_yuv_ssse3.inc" |
| 254 | 254 |
| 255 ; | 255 ; |
| 256 ; extern "C" void ConvertRGBToYUVRow_SSSE3(const uint8* rgb, | 256 ; extern "C" void ConvertRGBToYUVRow_SSSE3(const uint8_t* rgb, |
| 257 ; uint8* y, | 257 ; uint8_t* y, |
| 258 ; uint8* u, | 258 ; uint8_t* u, |
| 259 ; uint8* v, | 259 ; uint8_t* v, |
| 260 ; ptrdiff_t width); | 260 ; ptrdiff_t width); |
| 261 ; | 261 ; |
| 262 %define SYMBOL ConvertRGBToYUVRow_SSSE3 | 262 %define SYMBOL ConvertRGBToYUVRow_SSSE3 |
| 263 %define PIXELSIZE 3 | 263 %define PIXELSIZE 3 |
| 264 %define SUBSAMPLING 0 | 264 %define SUBSAMPLING 0 |
| 265 %define LINE 0 | 265 %define LINE 0 |
| 266 %include "convert_rgb_to_yuv_ssse3.inc" | 266 %include "convert_rgb_to_yuv_ssse3.inc" |
| 267 | 267 |
| 268 ; | 268 ; |
| 269 ; extern "C" void ConvertARGBToYUVEven_SSSE3(const uint8* argb, | 269 ; extern "C" void ConvertARGBToYUVEven_SSSE3(const uint8_t* argb, |
| 270 ; uint8* y, | 270 ; uint8_t* y, |
| 271 ; uint8* u, | 271 ; uint8_t* u, |
| 272 ; uint8* v, | 272 ; uint8_t* v, |
| 273 ; ptrdiff_t width); | 273 ; ptrdiff_t width); |
| 274 ; | 274 ; |
| 275 %define SYMBOL ConvertARGBToYUVEven_SSSE3 | 275 %define SYMBOL ConvertARGBToYUVEven_SSSE3 |
| 276 %define PIXELSIZE 4 | 276 %define PIXELSIZE 4 |
| 277 %define SUBSAMPLING 1 | 277 %define SUBSAMPLING 1 |
| 278 %define LINE 0 | 278 %define LINE 0 |
| 279 %include "convert_rgb_to_yuv_ssse3.inc" | 279 %include "convert_rgb_to_yuv_ssse3.inc" |
| 280 | 280 |
| 281 ; | 281 ; |
| 282 ; extern "C" void ConvertARGBToYUVOdd_SSSE3(const uint8* argb, | 282 ; extern "C" void ConvertARGBToYUVOdd_SSSE3(const uint8_t* argb, |
| 283 ; uint8* y, | 283 ; uint8_t* y, |
| 284 ; uint8* u, | 284 ; uint8_t* u, |
| 285 ; uint8* v, | 285 ; uint8_t* v, |
| 286 ; ptrdiff_t width); | 286 ; ptrdiff_t width); |
| 287 ; | 287 ; |
| 288 %define SYMBOL ConvertARGBToYUVOdd_SSSE3 | 288 %define SYMBOL ConvertARGBToYUVOdd_SSSE3 |
| 289 %define PIXELSIZE 4 | 289 %define PIXELSIZE 4 |
| 290 %define SUBSAMPLING 1 | 290 %define SUBSAMPLING 1 |
| 291 %define LINE 1 | 291 %define LINE 1 |
| 292 %include "convert_rgb_to_yuv_ssse3.inc" | 292 %include "convert_rgb_to_yuv_ssse3.inc" |
| 293 | 293 |
| 294 ; | 294 ; |
| 295 ; extern "C" void ConvertRGBToYUVEven_SSSE3(const uint8* rgb, | 295 ; extern "C" void ConvertRGBToYUVEven_SSSE3(const uint8_t* rgb, |
| 296 ; uint8* y, | 296 ; uint8_t* y, |
| 297 ; uint8* u, | 297 ; uint8_t* u, |
| 298 ; uint8* v, | 298 ; uint8_t* v, |
| 299 ; ptrdiff_t width); | 299 ; ptrdiff_t width); |
| 300 ; | 300 ; |
| 301 %define SYMBOL ConvertRGBToYUVEven_SSSE3 | 301 %define SYMBOL ConvertRGBToYUVEven_SSSE3 |
| 302 %define PIXELSIZE 3 | 302 %define PIXELSIZE 3 |
| 303 %define SUBSAMPLING 1 | 303 %define SUBSAMPLING 1 |
| 304 %define LINE 0 | 304 %define LINE 0 |
| 305 %include "convert_rgb_to_yuv_ssse3.inc" | 305 %include "convert_rgb_to_yuv_ssse3.inc" |
| 306 | 306 |
| 307 ; | 307 ; |
| 308 ; extern "C" void ConvertRGBToYUVOdd_SSSE3(const uint8* rgb, | 308 ; extern "C" void ConvertRGBToYUVOdd_SSSE3(const uint8_t* rgb, |
| 309 ; uint8* y, | 309 ; uint8_t* y, |
| 310 ; uint8* u, | 310 ; uint8_t* u, |
| 311 ; uint8* v, | 311 ; uint8_t* v, |
| 312 ; ptrdiff_t width); | 312 ; ptrdiff_t width); |
| 313 ; | 313 ; |
| 314 %define SYMBOL ConvertRGBToYUVOdd_SSSE3 | 314 %define SYMBOL ConvertRGBToYUVOdd_SSSE3 |
| 315 %define PIXELSIZE 3 | 315 %define PIXELSIZE 3 |
| 316 %define SUBSAMPLING 1 | 316 %define SUBSAMPLING 1 |
| 317 %define LINE 1 | 317 %define LINE 1 |
| 318 %include "convert_rgb_to_yuv_ssse3.inc" | 318 %include "convert_rgb_to_yuv_ssse3.inc" |
| OLD | NEW |