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

Side by Side Diff: unit_test/convert_test.cc

Issue 1388273002: Reimplement NV21ToARGB to allow different color matrix. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: include scale_row.h for scaling macros Created 5 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/scale_gcc.cc ('k') | no next file » | 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ 664 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
665 benchmark_width_, DIFF, _Unaligned, +, 1) \ 665 benchmark_width_, DIFF, _Unaligned, +, 1) \
666 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ 666 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
667 benchmark_width_, DIFF, _Invert, -, 0) \ 667 benchmark_width_, DIFF, _Invert, -, 0) \
668 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ 668 TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
669 benchmark_width_, DIFF, _Opt, +, 0) 669 benchmark_width_, DIFF, _Opt, +, 0)
670 670
671 TESTBIPLANARTOB(NV12, 2, 2, ARGB, 4, 2) 671 TESTBIPLANARTOB(NV12, 2, 2, ARGB, 4, 2)
672 TESTBIPLANARTOB(NV21, 2, 2, ARGB, 4, 2) 672 TESTBIPLANARTOB(NV21, 2, 2, ARGB, 4, 2)
673 TESTBIPLANARTOB(NV12, 2, 2, RGB565, 2, 9) 673 TESTBIPLANARTOB(NV12, 2, 2, RGB565, 2, 9)
674 TESTBIPLANARTOB(NV21, 2, 2, RGB565, 2, 9)
675 674
676 #define TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ 675 #define TESTATOPLANARI(FMT_A, BPP_A, YALIGN, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
677 W1280, DIFF, N, NEG, OFF) \ 676 W1280, DIFF, N, NEG, OFF) \
678 TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##N) { \ 677 TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##N) { \
679 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \ 678 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
680 const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \ 679 const int kHeight = ALIGNINT(benchmark_height_, YALIGN); \
681 const int kStride = \ 680 const int kStride = \
682 (SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMP_X * 8 * BPP_A + 7) / 8; \ 681 (SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMP_X * 8 * BPP_A + 7) / 8; \
683 align_buffer_64(src_argb, kStride * kHeight + OFF); \ 682 align_buffer_64(src_argb, kStride * kHeight + OFF); \
684 align_buffer_64(dst_y_c, kWidth * kHeight); \ 683 align_buffer_64(dst_y_c, kWidth * kHeight); \
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 free_aligned_buffer_64(dst_y_orig); \ 1693 free_aligned_buffer_64(dst_y_orig); \
1695 free_aligned_buffer_64(dst_uv_orig); \ 1694 free_aligned_buffer_64(dst_uv_orig); \
1696 free_aligned_buffer_64(dst_y); \ 1695 free_aligned_buffer_64(dst_y); \
1697 free_aligned_buffer_64(dst_uv); \ 1696 free_aligned_buffer_64(dst_uv); \
1698 } 1697 }
1699 1698
1700 TESTPTOB(TestYUY2ToNV12, YUY2ToI420, YUY2ToNV12) 1699 TESTPTOB(TestYUY2ToNV12, YUY2ToI420, YUY2ToNV12)
1701 TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12) 1700 TESTPTOB(TestUYVYToNV12, UYVYToI420, UYVYToNV12)
1702 1701
1703 } // namespace libyuv 1702 } // namespace libyuv
OLDNEW
« no previous file with comments | « source/scale_gcc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698