| OLD | NEW |
| 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 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 // Expect failure because image is not really valid. | 1341 // Expect failure because image is not really valid. |
| 1342 EXPECT_EQ(1, ret); | 1342 EXPECT_EQ(1, ret); |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 free_aligned_buffer_page_end(dst_argb_opt); | 1345 free_aligned_buffer_page_end(dst_argb_opt); |
| 1346 free_aligned_buffer_page_end(orig_pixels); | 1346 free_aligned_buffer_page_end(orig_pixels); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 #endif // HAVE_JPEG | 1349 #endif // HAVE_JPEG |
| 1350 | 1350 |
| 1351 TEST_F(LibYUVConvertTest, CropNV12) { | 1351 TEST_F(LibYUVConvertTest, NV12Crop) { |
| 1352 const int SUBSAMP_X = 2; | 1352 const int SUBSAMP_X = 2; |
| 1353 const int SUBSAMP_Y = 2; | 1353 const int SUBSAMP_Y = 2; |
| 1354 const int kWidth = benchmark_width_; | 1354 const int kWidth = benchmark_width_; |
| 1355 const int kHeight = benchmark_height_; | 1355 const int kHeight = benchmark_height_; |
| 1356 const int crop_y = | 1356 const int crop_y = |
| 1357 ((benchmark_height_ - (benchmark_height_ * 360 / 480)) / 2 + 1) & ~1; | 1357 ((benchmark_height_ - (benchmark_height_ * 360 / 480)) / 2 + 1) & ~1; |
| 1358 const int kDestWidth = benchmark_width_; | 1358 const int kDestWidth = benchmark_width_; |
| 1359 const int kDestHeight = benchmark_height_ - crop_y * 2; | 1359 const int kDestHeight = benchmark_height_ - crop_y * 2; |
| 1360 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); | 1360 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); |
| 1361 const int sample_size = kWidth * kHeight + | 1361 const int sample_size = kWidth * kHeight + |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ | 1850 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ |
| 1851 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ | 1851 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ |
| 1852 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ | 1852 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ |
| 1853 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ | 1853 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ |
| 1854 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) | 1854 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) |
| 1855 | 1855 |
| 1856 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) | 1856 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) |
| 1857 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) | 1857 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) |
| 1858 | 1858 |
| 1859 } // namespace libyuv | 1859 } // namespace libyuv |
| OLD | NEW |