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

Side by Side Diff: source/planar_functions.cc

Issue 2285683002: Add MIPS SIMD Arch (MSA) optimized MirrorRow function (Closed)
Patch Set: Fixed merge conflicts with master Created 4 years, 2 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
« no previous file with comments | « source/cpu_id.cc ('k') | source/rotate.cc » ('j') | 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 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
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 #endif 396 #endif
397 // TODO(fbarchard): Mirror on mips handle unaligned memory. 397 // TODO(fbarchard): Mirror on mips handle unaligned memory.
398 #if defined(HAS_MIRRORROW_DSPR2) 398 #if defined(HAS_MIRRORROW_DSPR2)
399 if (TestCpuFlag(kCpuHasDSPR2) && 399 if (TestCpuFlag(kCpuHasDSPR2) &&
400 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 400 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
401 IS_ALIGNED(dst_y, 4) && IS_ALIGNED(dst_stride_y, 4)) { 401 IS_ALIGNED(dst_y, 4) && IS_ALIGNED(dst_stride_y, 4)) {
402 MirrorRow = MirrorRow_DSPR2; 402 MirrorRow = MirrorRow_DSPR2;
403 } 403 }
404 #endif 404 #endif
405 #if defined(HAS_MIRRORROW_MSA)
406 if (TestCpuFlag(kCpuHasMSA)) {
407 MirrorRow = MirrorRow_Any_MSA;
408 if (IS_ALIGNED(width, 64)) {
409 MirrorRow = MirrorRow_MSA;
410 }
411 }
412 #endif
405 413
406 // Mirror plane 414 // Mirror plane
407 for (y = 0; y < height; ++y) { 415 for (y = 0; y < height; ++y) {
408 MirrorRow(src_y, dst_y, width); 416 MirrorRow(src_y, dst_y, width);
409 src_y += src_stride_y; 417 src_y += src_stride_y;
410 dst_y += dst_stride_y; 418 dst_y += dst_stride_y;
411 } 419 }
412 } 420 }
413 421
414 // Convert YUY2 to I422. 422 // Convert YUY2 to I422.
(...skipping 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 } 2810 }
2803 free_aligned_buffer_64(rows); 2811 free_aligned_buffer_64(rows);
2804 } 2812 }
2805 return 0; 2813 return 0;
2806 } 2814 }
2807 2815
2808 #ifdef __cplusplus 2816 #ifdef __cplusplus
2809 } // extern "C" 2817 } // extern "C"
2810 } // namespace libyuv 2818 } // namespace libyuv
2811 #endif 2819 #endif
OLDNEW
« no previous file with comments | « source/cpu_id.cc ('k') | source/rotate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698