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

Side by Side Diff: source/row_msa.cc

Issue 2446313002: white spaces and comments for msa (Closed)
Patch Set: no lint for macro casts Created 4 years, 1 month 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/macros_msa.h ('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
1 /* 1 /*
2 * Copyright 2016 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2016 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 12
13 // This module is for GCC MSA 13 // This module is for GCC MSA
14 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 14 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
15 #include "libyuv/macros_msa.h" 15 #include "libyuv/macros_msa.h"
16 16
17 #ifdef __cplusplus 17 #ifdef __cplusplus
18 namespace libyuv { 18 namespace libyuv {
19 extern "C" { 19 extern "C" {
20 #endif 20 #endif
21 21
22 // Convert 8 pixels of YUV 420 to RGB.
22 #define I422TORGB(in0, in1, in2, ub, vr, ug, vg, \ 23 #define I422TORGB(in0, in1, in2, ub, vr, ug, vg, \
23 bb, bg, br, yg, out0, out1, out2) { \ 24 bb, bg, br, yg, out0, out1, out2) { \
24 v8i16 vec0_m; \ 25 v8i16 vec0_m; \
25 v4i32 reg0_m, reg1_m, reg2_m, reg3_m, reg4_m; \ 26 v4i32 reg0_m, reg1_m, reg2_m, reg3_m, reg4_m; \
26 v4i32 reg5_m, reg6_m, reg7_m, reg8_m, reg9_m; \ 27 v4i32 reg5_m, reg6_m, reg7_m, reg8_m, reg9_m; \
27 v4i32 max_val_m = __msa_ldi_w(255); \ 28 v4i32 max_val_m = __msa_ldi_w(255); \
28 v8i16 zero_m = { 0 }; \ 29 v8i16 zero_m = { 0 }; \
29 \ 30 \
30 in1 = (v16u8) __msa_ilvr_b((v16i8) in1, (v16i8) in1); \ 31 in1 = (v16u8) __msa_ilvr_b((v16i8) in1, (v16i8) in1); \
31 in2 = (v16u8) __msa_ilvr_b((v16i8) in2, (v16i8) in2); \ 32 in2 = (v16u8) __msa_ilvr_b((v16i8) in2, (v16i8) in2); \
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 dst_argb += 64; 554 dst_argb += 64;
554 } 555 }
555 } 556 }
556 557
557 #ifdef __cplusplus 558 #ifdef __cplusplus
558 } // extern "C" 559 } // extern "C"
559 } // namespace libyuv 560 } // namespace libyuv
560 #endif 561 #endif
561 562
562 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) 563 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
OLDNEW
« no previous file with comments | « include/libyuv/macros_msa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698