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

Side by Side Diff: source/planar_functions.cc

Issue 2285683002: Add MIPS SIMD Arch (MSA) optimized MirrorRow function (Closed)
Patch Set: Changes as per 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
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 405 #if defined(HAS_MIRRORROW_MSA)
406 if (TestCpuFlag(kCpuHasMSA)) {
407 MirrorRow = MirrorRow_MSA;
408 }
409 #endif
406 // Mirror plane 410 // Mirror plane
407 for (y = 0; y < height; ++y) { 411 for (y = 0; y < height; ++y) {
408 MirrorRow(src_y, dst_y, width); 412 MirrorRow(src_y, dst_y, width);
409 src_y += src_stride_y; 413 src_y += src_stride_y;
410 dst_y += dst_stride_y; 414 dst_y += dst_stride_y;
411 } 415 }
412 } 416 }
413 417
414 // Convert YUY2 to I422. 418 // Convert YUY2 to I422.
415 LIBYUV_API 419 LIBYUV_API
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 } 2806 }
2803 free_aligned_buffer_64(rows); 2807 free_aligned_buffer_64(rows);
2804 } 2808 }
2805 return 0; 2809 return 0;
2806 } 2810 }
2807 2811
2808 #ifdef __cplusplus 2812 #ifdef __cplusplus
2809 } // extern "C" 2813 } // extern "C"
2810 } // namespace libyuv 2814 } // namespace libyuv
2811 #endif 2815 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698