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

Side by Side Diff: source/row_win.cc

Issue 2626123003: Libyuv MIPS DSPR2 optimizations. (Closed)
Patch Set: Created 3 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 | « source/row_mips.cc ('k') | source/scale.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 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 __asm vpsubw ymm0, ymm3, ymm0 /* Step 2: Find Y contribution to 16 R,G,B values */ \ 2025 __asm vpsubw ymm0, ymm3, ymm0 /* Step 2: Find Y contribution to 16 R,G,B values */ \
2026 __asm vpmulhuw ymm4, ymm4, ymmword ptr [YuvConstants + KYTORGB] \ 2026 __asm vpmulhuw ymm4, ymm4, ymmword ptr [YuvConstants + KYTORGB] \
2027 __asm vpaddsw ymm0, ymm0, ymm4 /* B += Y */ \ 2027 __asm vpaddsw ymm0, ymm0, ymm4 /* B += Y */ \
2028 __asm vpaddsw ymm1, ymm1, ymm4 /* G += Y */ \ 2028 __asm vpaddsw ymm1, ymm1, ymm4 /* G += Y */ \
2029 __asm vpaddsw ymm2, ymm2, ymm4 /* R += Y */ \ 2029 __asm vpaddsw ymm2, ymm2, ymm4 /* R += Y */ \
2030 __asm vpsraw ymm0, ymm0, 6 \ 2030 __asm vpsraw ymm0, ymm0, 6 \
2031 __asm vpsraw ymm1, ymm1, 6 \ 2031 __asm vpsraw ymm1, ymm1, 6 \
2032 __asm vpsraw ymm2, ymm2, 6 \ 2032 __asm vpsraw ymm2, ymm2, 6 \
2033 __asm vpackuswb ymm0, ymm0, ymm0 /* B */ \ 2033 __asm vpackuswb ymm0, ymm0, ymm0 /* B */ \
2034 __asm vpackuswb ymm1, ymm1, ymm1 /* G */ \ 2034 __asm vpackuswb ymm1, ymm1, ymm1 /* G */ \
2035 __asm vpackuswb ymm2, ymm2, ymm2 /* R */ \ 2035 __asm vpackuswb ymm2, ymm2, ymm2 /* R */ \
2036 } 2036 }
2037 2037
2038 // Store 16 ARGB values. 2038 // Store 16 ARGB values.
2039 #define STOREARGB_AVX2 \ 2039 #define STOREARGB_AVX2 \
2040 __asm { \ 2040 __asm { \
2041 __asm vpunpcklbw ymm0, ymm0, ymm1 /* BG */ \ 2041 __asm vpunpcklbw ymm0, ymm0, ymm1 /* BG */ \
2042 __asm vpermq ymm0, ymm0, 0xd8 \ 2042 __asm vpermq ymm0, ymm0, 0xd8 \
2043 __asm vpunpcklbw ymm2, ymm2, ymm5 /* RA */ \ 2043 __asm vpunpcklbw ymm2, ymm2, ymm5 /* RA */ \
2044 __asm vpermq ymm2, ymm2, 0xd8 \ 2044 __asm vpermq ymm2, ymm2, 0xd8 \
2045 __asm vpunpcklwd ymm1, ymm0, ymm2 /* BGRA first 8 pixels */ \ 2045 __asm vpunpcklwd ymm1, ymm0, ymm2 /* BGRA first 8 pixels */ \
(...skipping 4286 matching lines...) Expand 10 before | Expand all | Expand 10 after
6332 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 6332 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
6333 6333
6334 #endif // defined(_M_X64) 6334 #endif // defined(_M_X64)
6335 6335
6336 #ifdef __cplusplus 6336 #ifdef __cplusplus
6337 } // extern "C" 6337 } // extern "C"
6338 } // namespace libyuv 6338 } // namespace libyuv
6339 #endif 6339 #endif
6340 6340
6341 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) 6341 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64))
OLDNEW
« no previous file with comments | « source/row_mips.cc ('k') | source/scale.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698