Chromium Code Reviews| OLD | NEW |
|---|---|
| (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) | |
| 23 void MirrorRow_MSA(const uint8* src, uint8* dst, int width) { | |
| 24 int count; | |
| 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; count += 64) { | |
| 32 src -= 64; | |
|
fbarchard1
2016/09/19 17:32:41
src -= 64 just before using src could cause a stal
manojkumar.bhosale
2016/09/21 06:30:49
Done.
| |
| 33 LD_UB4(src, 16, src3, src2, src1, src0); | |
| 34 VSHF_B2_UB(src3, src3, src2, src2, mask, mask, dst3, dst2); | |
| 35 VSHF_B2_UB(src1, src1, src0, src0, mask, mask, dst1, dst0); | |
| 36 ST_UB4(dst0, dst1, dst2, dst3, dst, 16); | |
| 37 dst += 64; | |
| 38 } | |
| 39 } | |
| 40 #endif // !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) | |
| 41 | |
| 42 #ifdef __cplusplus | |
| 43 } // extern "C" | |
| 44 } // namespace libyuv | |
| 45 #endif | |
| OLD | NEW |