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

Side by Side Diff: source/row_common.cc

Issue 1355393002: yuy2 to rgb gcc versions (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years, 2 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 | « include/libyuv/version.h ('k') | source/row_gcc.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 /* 1 /*
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 NV12ToARGBRow_SSSE3(src_y, src_uv, row, yuvconstants, twidth); 2469 NV12ToARGBRow_SSSE3(src_y, src_uv, row, yuvconstants, twidth);
2470 ARGBToRGB565Row_SSE2(row, dst_rgb565, twidth); 2470 ARGBToRGB565Row_SSE2(row, dst_rgb565, twidth);
2471 src_y += twidth; 2471 src_y += twidth;
2472 src_uv += twidth; 2472 src_uv += twidth;
2473 dst_rgb565 += twidth * 2; 2473 dst_rgb565 += twidth * 2;
2474 width -= twidth; 2474 width -= twidth;
2475 } 2475 }
2476 } 2476 }
2477 #endif 2477 #endif
2478 2478
2479 #if defined(HAS_YUY2TOARGBROW_SSSE3)
2480 void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
2481 uint8* dst_argb,
2482 struct YuvConstants* yuvconstants,
2483 int width) {
2484 // Row buffers for intermediate YUV pixels.
2485 SIMD_ALIGNED(uint8 row_y[MAXTWIDTH]);
2486 SIMD_ALIGNED(uint8 row_u[MAXTWIDTH / 2]);
2487 SIMD_ALIGNED(uint8 row_v[MAXTWIDTH / 2]);
2488 while (width > 0) {
2489 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width;
2490 YUY2ToUV422Row_SSE2(src_yuy2, row_u, row_v, twidth);
2491 YUY2ToYRow_SSE2(src_yuy2, row_y, twidth);
2492 I422ToARGBRow_SSSE3(row_y, row_u, row_v, dst_argb, yuvconstants, twidth);
2493 src_yuy2 += twidth * 2;
2494 dst_argb += twidth * 4;
2495 width -= twidth;
2496 }
2497 }
2498 #endif
2499
2500 #if defined(HAS_UYVYTOARGBROW_SSSE3)
2501 void UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
2502 uint8* dst_argb,
2503 struct YuvConstants* yuvconstants,
2504 int width) {
2505 // Row buffers for intermediate YUV pixels.
2506 SIMD_ALIGNED(uint8 row_y[MAXTWIDTH]);
2507 SIMD_ALIGNED(uint8 row_u[MAXTWIDTH / 2]);
2508 SIMD_ALIGNED(uint8 row_v[MAXTWIDTH / 2]);
2509 while (width > 0) {
2510 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width;
2511 UYVYToUV422Row_SSE2(src_uyvy, row_u, row_v, twidth);
2512 UYVYToYRow_SSE2(src_uyvy, row_y, twidth);
2513 I422ToARGBRow_SSSE3(row_y, row_u, row_v, dst_argb, yuvconstants, twidth);
2514 src_uyvy += twidth * 2;
2515 dst_argb += twidth * 4;
2516 width -= twidth;
2517 }
2518 }
2519 #endif // !defined(LIBYUV_DISABLE_X86)
2520
2521 #if defined(HAS_I422TORGB565ROW_AVX2) 2479 #if defined(HAS_I422TORGB565ROW_AVX2)
2522 void I422ToRGB565Row_AVX2(const uint8* src_y, 2480 void I422ToRGB565Row_AVX2(const uint8* src_y,
2523 const uint8* src_u, 2481 const uint8* src_u,
2524 const uint8* src_v, 2482 const uint8* src_v,
2525 uint8* dst_rgb565, 2483 uint8* dst_rgb565,
2526 struct YuvConstants* yuvconstants, 2484 struct YuvConstants* yuvconstants,
2527 int width) { 2485 int width) {
2528 SIMD_ALIGNED32(uint8 row[MAXTWIDTH * 4]); 2486 SIMD_ALIGNED32(uint8 row[MAXTWIDTH * 4]);
2529 while (width > 0) { 2487 while (width > 0) {
2530 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width; 2488 int twidth = width > MAXTWIDTH ? MAXTWIDTH : width;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 dst_argb += twidth * 4; 2646 dst_argb += twidth * 4;
2689 width -= twidth; 2647 width -= twidth;
2690 } 2648 }
2691 } 2649 }
2692 #endif // !defined(LIBYUV_DISABLE_X86) 2650 #endif // !defined(LIBYUV_DISABLE_X86)
2693 2651
2694 #ifdef __cplusplus 2652 #ifdef __cplusplus
2695 } // extern "C" 2653 } // extern "C"
2696 } // namespace libyuv 2654 } // namespace libyuv
2697 #endif 2655 #endif
OLDNEW
« no previous file with comments | « include/libyuv/version.h ('k') | source/row_gcc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698