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

Side by Side Diff: source/rotate_mips.cc

Issue 1677633002: rename MIPS_DSPR2 to DSPR2 for consistency (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: git cl try Created 4 years, 10 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/rotate_any.cc ('k') | source/row_any.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
11 #include "libyuv/row.h" 11 #include "libyuv/row.h"
12 #include "libyuv/rotate_row.h" 12 #include "libyuv/rotate_row.h"
13 13
14 #include "libyuv/basic_types.h" 14 #include "libyuv/basic_types.h"
15 15
16 #ifdef __cplusplus 16 #ifdef __cplusplus
17 namespace libyuv { 17 namespace libyuv {
18 extern "C" { 18 extern "C" {
19 #endif 19 #endif
20 20
21 #if !defined(LIBYUV_DISABLE_MIPS) && \ 21 #if !defined(LIBYUV_DISABLE_MIPS) && \
22 defined(__mips_dsp) && (__mips_dsp_rev >= 2) && \ 22 defined(__mips_dsp) && (__mips_dsp_rev >= 2) && \
23 (_MIPS_SIM == _MIPS_SIM_ABI32) 23 (_MIPS_SIM == _MIPS_SIM_ABI32)
24 24
25 void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, 25 void TransposeWx8_DSPR2(const uint8* src, int src_stride,
26 uint8* dst, int dst_stride, int width) { 26 uint8* dst, int dst_stride, int width) {
27 __asm__ __volatile__ ( 27 __asm__ __volatile__ (
28 ".set push \n" 28 ".set push \n"
29 ".set noreorder \n" 29 ".set noreorder \n"
30 "sll $t2, %[src_stride], 0x1 \n" // src_stride x 2 30 "sll $t2, %[src_stride], 0x1 \n" // src_stride x 2
31 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4 31 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4
32 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8 32 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8
33 "addu $t3, $t2, %[src_stride] \n" 33 "addu $t3, $t2, %[src_stride] \n"
34 "addu $t5, $t4, %[src_stride] \n" 34 "addu $t5, $t4, %[src_stride] \n"
35 "addu $t6, $t2, $t4 \n" 35 "addu $t6, $t2, $t4 \n"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 [dst] "+r" (dst), 99 [dst] "+r" (dst),
100 [width] "+r" (width) 100 [width] "+r" (width)
101 :[src_stride] "r" (src_stride), 101 :[src_stride] "r" (src_stride),
102 [dst_stride] "r" (dst_stride) 102 [dst_stride] "r" (dst_stride)
103 : "t0", "t1", "t2", "t3", "t4", "t5", 103 : "t0", "t1", "t2", "t3", "t4", "t5",
104 "t6", "t7", "t8", "t9", 104 "t6", "t7", "t8", "t9",
105 "s0", "s1" 105 "s0", "s1"
106 ); 106 );
107 } 107 }
108 108
109 void TransposeWx8_Fast_MIPS_DSPR2(const uint8* src, int src_stride, 109 void TransposeWx8_Fast_DSPR2(const uint8* src, int src_stride,
110 uint8* dst, int dst_stride, int width) { 110 uint8* dst, int dst_stride, int width) {
111 __asm__ __volatile__ ( 111 __asm__ __volatile__ (
112 ".set noat \n" 112 ".set noat \n"
113 ".set push \n" 113 ".set push \n"
114 ".set noreorder \n" 114 ".set noreorder \n"
115 "beqz %[width], 2f \n" 115 "beqz %[width], 2f \n"
116 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2 116 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2
117 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4 117 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4
118 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8 118 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8
119 "addu $t3, $t2, %[src_stride] \n" 119 "addu $t3, $t2, %[src_stride] \n"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 :[src] "+r" (src), 301 :[src] "+r" (src),
302 [dst] "+r" (dst), 302 [dst] "+r" (dst),
303 [width] "+r" (width) 303 [width] "+r" (width)
304 :[src_stride] "r" (src_stride), 304 :[src_stride] "r" (src_stride),
305 [dst_stride] "r" (dst_stride) 305 [dst_stride] "r" (dst_stride)
306 : "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", 306 : "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9",
307 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7" 307 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7"
308 ); 308 );
309 } 309 }
310 310
311 void TransposeUVWx8_MIPS_DSPR2(const uint8* src, int src_stride, 311 void TransposeUVWx8_DSPR2(const uint8* src, int src_stride,
312 uint8* dst_a, int dst_stride_a, 312 uint8* dst_a, int dst_stride_a,
313 uint8* dst_b, int dst_stride_b, 313 uint8* dst_b, int dst_stride_b,
314 int width) { 314 int width) {
315 __asm__ __volatile__ ( 315 __asm__ __volatile__ (
316 ".set push \n" 316 ".set push \n"
317 ".set noreorder \n" 317 ".set noreorder \n"
318 "beqz %[width], 2f \n" 318 "beqz %[width], 2f \n"
319 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2 319 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2
320 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4 320 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4
321 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8 321 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 "s4", "s5", "s6" 475 "s4", "s5", "s6"
476 ); 476 );
477 } 477 }
478 478
479 #endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2) 479 #endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2)
480 480
481 #ifdef __cplusplus 481 #ifdef __cplusplus
482 } // extern "C" 482 } // extern "C"
483 } // namespace libyuv 483 } // namespace libyuv
484 #endif 484 #endif
OLDNEW
« no previous file with comments | « source/rotate_any.cc ('k') | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698