Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 for (count = 0; count < width; count += 64) { | 31 for (count = 0; count < width; count += 64) { |
| 32 LD_UB4(src, 16, src3, src2, src1, src0); | 32 LD_UB4(src, 16, src3, src2, src1, src0); |
| 33 VSHF_B2_UB(src3, src3, src2, src2, mask, mask, dst3, dst2); | 33 VSHF_B2_UB(src3, src3, src2, src2, mask, mask, dst3, dst2); |
| 34 VSHF_B2_UB(src1, src1, src0, src0, mask, mask, dst1, dst0); | 34 VSHF_B2_UB(src1, src1, src0, src0, mask, mask, dst1, dst0); |
| 35 ST_UB4(dst0, dst1, dst2, dst3, dst, 16); | 35 ST_UB4(dst0, dst1, dst2, dst3, dst, 16); |
| 36 dst += 64; | 36 dst += 64; |
| 37 src -= 64; | 37 src -= 64; |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | |
| 41 void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width) { | |
| 42 int count; | |
|
fbarchard1
2016/09/26 18:04:34
prefer int x for horizontal counts for consistency
| |
| 43 v16u8 src0, src1, src2, src3; | |
| 44 v16u8 dst0, dst1, dst2, dst3; | |
| 45 v4i32 mask = { 3, 2, 1, 0 }; | |
| 46 | |
| 47 src += width * 4 - 64; | |
| 48 | |
| 49 for (count = 0; count < width; count += 16) { | |
| 50 LD_UB4(src, 16, src3, src2, src1, src0); | |
| 51 VSHF_W4_UB(src0, src0, src1, src1, src2, src2, src3, src3, | |
|
fbarchard1
2016/09/26 18:04:34
consider less unrolling. (measure performance)
F
| |
| 52 mask, mask, mask, mask, dst0, dst1, dst2, dst3); | |
| 53 ST_UB4(dst0, dst1, dst2, dst3, dst, 16); | |
| 54 dst += 64; | |
| 55 src -= 64; | |
| 56 } | |
| 57 } | |
| 40 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) | 58 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) |
| 41 | 59 |
| 42 #ifdef __cplusplus | 60 #ifdef __cplusplus |
| 43 } // extern "C" | 61 } // extern "C" |
| 44 } // namespace libyuv | 62 } // namespace libyuv |
| 45 #endif | 63 #endif |
| OLD | NEW |