| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2012 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 20 matching lines...) Expand all Loading... |
| 31 if (dst_width < 1) { | 31 if (dst_width < 1) { |
| 32 dst_width = 1; | 32 dst_width = 1; |
| 33 } | 33 } |
| 34 if (dst_height < 1) { | 34 if (dst_height < 1) { |
| 35 dst_height = 1; | 35 dst_height = 1; |
| 36 } | 36 } |
| 37 int src_stride_argb = src_width * kBpp; | 37 int src_stride_argb = src_width * kBpp; |
| 38 int src_argb_plane_size = src_stride_argb * abs(src_height); | 38 int src_argb_plane_size = src_stride_argb * abs(src_height); |
| 39 align_buffer_64(src_argb, src_argb_plane_size); | 39 align_buffer_64(src_argb, src_argb_plane_size); |
| 40 for (int i = 0; i < src_argb_plane_size; ++i) { | 40 for (int i = 0; i < src_argb_plane_size; ++i) { |
| 41 src_argb[i] = random() & 0xff; | 41 src_argb[i] = fastrand() & 0xff; |
| 42 } | 42 } |
| 43 | 43 |
| 44 int dst_stride_argb = dst_width * kBpp; | 44 int dst_stride_argb = dst_width * kBpp; |
| 45 int dst_argb_plane_size = dst_stride_argb * dst_height; | 45 int dst_argb_plane_size = dst_stride_argb * dst_height; |
| 46 align_buffer_64(dst_argb_c, dst_argb_plane_size); | 46 align_buffer_64(dst_argb_c, dst_argb_plane_size); |
| 47 align_buffer_64(dst_argb_opt, dst_argb_plane_size); | 47 align_buffer_64(dst_argb_opt, dst_argb_plane_size); |
| 48 memset(dst_argb_c, 2, dst_argb_plane_size); | 48 memset(dst_argb_c, 2, dst_argb_plane_size); |
| 49 memset(dst_argb_opt, 3, dst_argb_plane_size); | 49 memset(dst_argb_opt, 3, dst_argb_plane_size); |
| 50 | 50 |
| 51 if (kBpp == 1) { | 51 if (kBpp == 1) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 kRotate180, benchmark_iterations_, disable_cpu_flags_); | 192 kRotate180, benchmark_iterations_, disable_cpu_flags_); |
| 193 } | 193 } |
| 194 | 194 |
| 195 TEST_F(libyuvTest, RotatePlane270_Odd) { | 195 TEST_F(libyuvTest, RotatePlane270_Odd) { |
| 196 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 196 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
| 197 benchmark_height_ - 1, benchmark_width_ - 3, | 197 benchmark_height_ - 1, benchmark_width_ - 3, |
| 198 kRotate270, benchmark_iterations_, disable_cpu_flags_); | 198 kRotate270, benchmark_iterations_, disable_cpu_flags_); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace libyuv | 201 } // namespace libyuv |
| OLD | NEW |