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

Side by Side Diff: source/libvpx/third_party/libyuv/source/rotate_mips.cc

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
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 13
13 #include "libyuv/basic_types.h" 14 #include "libyuv/basic_types.h"
14 15
15 #ifdef __cplusplus 16 #ifdef __cplusplus
16 namespace libyuv { 17 namespace libyuv {
17 extern "C" { 18 extern "C" {
18 #endif 19 #endif
19 20
20 #if !defined(LIBYUV_DISABLE_MIPS) && \ 21 #if !defined(LIBYUV_DISABLE_MIPS) && \
21 defined(__mips_dsp) && (__mips_dsp_rev >= 2) && \ 22 defined(__mips_dsp) && (__mips_dsp_rev >= 2) && \
22 (_MIPS_SIM == _MIPS_SIM_ABI32) 23 (_MIPS_SIM == _MIPS_SIM_ABI32)
23 24
24 void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride, 25 void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
25 uint8* dst, int dst_stride, 26 uint8* dst, int dst_stride, int width) {
26 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"
36 "andi $t0, %[dst], 0x3 \n" 36 "andi $t0, %[dst], 0x3 \n"
(...skipping 62 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_MIPS_DSPR2(const uint8* src, int src_stride,
110 uint8* dst, int dst_stride, 110 uint8* dst, int dst_stride, int width) {
111 int width) {
112 __asm__ __volatile__ ( 111 __asm__ __volatile__ (
113 ".set noat \n" 112 ".set noat \n"
114 ".set push \n" 113 ".set push \n"
115 ".set noreorder \n" 114 ".set noreorder \n"
116 "beqz %[width], 2f \n" 115 "beqz %[width], 2f \n"
117 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2 116 " sll $t2, %[src_stride], 0x1 \n" // src_stride x 2
118 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4 117 "sll $t4, %[src_stride], 0x2 \n" // src_stride x 4
119 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8 118 "sll $t9, %[src_stride], 0x3 \n" // src_stride x 8
120 "addu $t3, $t2, %[src_stride] \n" 119 "addu $t3, $t2, %[src_stride] \n"
121 "addu $t5, $t4, %[src_stride] \n" 120 "addu $t5, $t4, %[src_stride] \n"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 "s4", "s5", "s6" 475 "s4", "s5", "s6"
477 ); 476 );
478 } 477 }
479 478
480 #endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2) 479 #endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2)
481 480
482 #ifdef __cplusplus 481 #ifdef __cplusplus
483 } // extern "C" 482 } // extern "C"
484 } // namespace libyuv 483 } // namespace libyuv
485 #endif 484 #endif
OLDNEW
« no previous file with comments | « source/libvpx/third_party/libyuv/source/rotate_gcc.cc ('k') | source/libvpx/third_party/libyuv/source/rotate_neon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698