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

Side by Side Diff: source/row_msa.cc

Issue 2285683002: Add MIPS SIMD Arch (MSA) optimized MirrorRow function (Closed)
Patch Set: Incorporated review comments Created 4 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
« source/rotate.cc ('K') | « source/row_any.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 The LibYuv Project Authors. All rights reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "libyuv/row.h"
12
13 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
14 #include "libyuv/macros_msa.h"
15 #endif
16
17 #ifdef __cplusplus
18 namespace libyuv {
19 extern "C" {
20 #endif
21
22 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
fbarchard1 2016/09/17 01:01:30 note this is fine for the entire file. if theres
manojkumar.bhosale 2016/09/19 08:07:21 Acknowledged.
23 void MirrorRow_MSA(const uint8* src, uint8* dst, int width) {
24 int count;
fbarchard1 2016/09/17 01:01:31 indent should be 2 spaces https://google.github.io
manojkumar.bhosale 2016/09/19 08:07:21 Done.
25 v16u8 src0, src1, src2, src3;
26 v16u8 dst0, dst1, dst2, dst3;
27 v16i8 mask = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
28
29 src += width;
30
31 for (count = 0; count < (width >> 6); count++) {
fbarchard1 2016/09/17 01:01:31 I've usually done counting by pixels for (x = 0;
manojkumar.bhosale 2016/09/19 08:07:21 Done.
32 src -= 64;
33 LD_UB4(src, 16, src3, src2, src1, src0);
34
35 VSHF_B2_UB(src3, src3, src2, src2, mask, mask, dst3, dst2);
36 VSHF_B2_UB(src1, src1, src0, src0, mask, mask, dst1, dst0);
37
38 ST_UB4(dst0, dst1, dst2, dst3, dst, 16);
39 dst += 64;
40 }
41 }
42 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
43
44 #ifdef __cplusplus
45 } // extern "C"
46 } // namespace libyuv
47 #endif
OLDNEW
« source/rotate.cc ('K') | « source/row_any.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698