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

Side by Side Diff: unit_test/convert_test.cc

Issue 2399153004: libyuv::YUY2ToY for isolating Y channel of YUY2. (Closed)
Patch Set: coalesce for YUY2ToY 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/row_neon.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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, \ 308 TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, \
309 SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ 309 SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
310 benchmark_width_, _Invert, -, 0, PN, OFF_U, OFF_V) \ 310 benchmark_width_, _Invert, -, 0, PN, OFF_U, OFF_V) \
311 TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, \ 311 TESTAPLANARTOPI(SRC_FMT_PLANAR, PIXEL_STRIDE, SRC_SUBSAMP_X, \
312 SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ 312 SRC_SUBSAMP_Y, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
313 benchmark_width_, _Opt, +, 0, PN, OFF_U, OFF_V) 313 benchmark_width_, _Opt, +, 0, PN, OFF_U, OFF_V)
314 314
315 TESTAPLANARTOP(Android420, I420, 1, 0, 0, 2, 2, I420, 2, 2) 315 TESTAPLANARTOP(Android420, I420, 1, 0, 0, 2, 2, I420, 2, 2)
316 TESTAPLANARTOP(Android420, NV12, 2, 0, 1, 2, 2, I420, 2, 2) 316 TESTAPLANARTOP(Android420, NV12, 2, 0, 1, 2, 2, I420, 2, 2)
317 TESTAPLANARTOP(Android420, NV21, 2, 1, 0, 2, 2, I420, 2, 2) 317 TESTAPLANARTOP(Android420, NV21, 2, 1, 0, 2, 2, I420, 2, 2)
318 // YUV3 causes msan failure. skip for now.
319 //TESTAPLANARTOP(Android420, YUV3, 3, 0, 1, 2, 2, I420, 2, 2)
320 318
321 #define TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \ 319 #define TESTPLANARTOBPI(SRC_FMT_PLANAR, SRC_SUBSAMP_X, SRC_SUBSAMP_Y, \
322 FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, OFF) \ 320 FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, W1280, N, NEG, OFF) \
323 TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \ 321 TEST_F(LibYUVConvertTest, SRC_FMT_PLANAR##To##FMT_PLANAR##N) { \
324 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \ 322 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
325 const int kHeight = benchmark_height_; \ 323 const int kHeight = benchmark_height_; \
326 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \ 324 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
327 align_buffer_page_end(src_u, \ 325 align_buffer_page_end(src_u, \
328 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \ 326 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
329 SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + OFF); \ 327 SUBSAMPLE(kHeight, SRC_SUBSAMP_Y) + OFF); \
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 TESTATOB(ABGR, 4, 4, 1, ARGB, 4, 4, 1, 0) 1130 TESTATOB(ABGR, 4, 4, 1, ARGB, 4, 4, 1, 0)
1133 TESTATOB(RGBA, 4, 4, 1, ARGB, 4, 4, 1, 0) 1131 TESTATOB(RGBA, 4, 4, 1, ARGB, 4, 4, 1, 0)
1134 TESTATOB(RAW, 3, 3, 1, ARGB, 4, 4, 1, 0) 1132 TESTATOB(RAW, 3, 3, 1, ARGB, 4, 4, 1, 0)
1135 TESTATOB(RAW, 3, 3, 1, RGB24, 3, 3, 1, 0) 1133 TESTATOB(RAW, 3, 3, 1, RGB24, 3, 3, 1, 0)
1136 TESTATOB(RGB24, 3, 3, 1, ARGB, 4, 4, 1, 0) 1134 TESTATOB(RGB24, 3, 3, 1, ARGB, 4, 4, 1, 0)
1137 TESTATOB(RGB565, 2, 2, 1, ARGB, 4, 4, 1, 0) 1135 TESTATOB(RGB565, 2, 2, 1, ARGB, 4, 4, 1, 0)
1138 TESTATOB(ARGB1555, 2, 2, 1, ARGB, 4, 4, 1, 0) 1136 TESTATOB(ARGB1555, 2, 2, 1, ARGB, 4, 4, 1, 0)
1139 TESTATOB(ARGB4444, 2, 2, 1, ARGB, 4, 4, 1, 0) 1137 TESTATOB(ARGB4444, 2, 2, 1, ARGB, 4, 4, 1, 0)
1140 TESTATOB(YUY2, 2, 4, 1, ARGB, 4, 4, 1, 4) 1138 TESTATOB(YUY2, 2, 4, 1, ARGB, 4, 4, 1, 4)
1141 TESTATOB(UYVY, 2, 4, 1, ARGB, 4, 4, 1, 4) 1139 TESTATOB(UYVY, 2, 4, 1, ARGB, 4, 4, 1, 4)
1140 TESTATOB(YUY2, 2, 4, 1, Y, 1, 1, 1, 0)
1142 TESTATOB(I400, 1, 1, 1, ARGB, 4, 4, 1, 0) 1141 TESTATOB(I400, 1, 1, 1, ARGB, 4, 4, 1, 0)
1143 TESTATOB(J400, 1, 1, 1, ARGB, 4, 4, 1, 0) 1142 TESTATOB(J400, 1, 1, 1, ARGB, 4, 4, 1, 0)
1144 TESTATOB(I400, 1, 1, 1, I400, 1, 1, 1, 0) 1143 TESTATOB(I400, 1, 1, 1, I400, 1, 1, 1, 0)
1145 TESTATOB(J400, 1, 1, 1, J400, 1, 1, 1, 0) 1144 TESTATOB(J400, 1, 1, 1, J400, 1, 1, 1, 0)
1146 TESTATOB(I400, 1, 1, 1, I400Mirror, 1, 1, 1, 0) 1145 TESTATOB(I400, 1, 1, 1, I400Mirror, 1, 1, 1, 0)
1147 TESTATOB(ARGB, 4, 4, 1, ARGBMirror, 4, 4, 1, 0) 1146 TESTATOB(ARGB, 4, 4, 1, ARGBMirror, 4, 4, 1, 0)
1148 1147
1149 #define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, \ 1148 #define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, \
1150 FMT_B, BPP_B, STRIDE_B, HEIGHT_B, \ 1149 FMT_B, BPP_B, STRIDE_B, HEIGHT_B, \
1151 W1280, DIFF, N, NEG, OFF) \ 1150 W1280, DIFF, N, NEG, OFF) \
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ 2001 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \
2003 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ 2002 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
2004 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ 2003 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \
2005 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ 2004 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \
2006 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) 2005 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1)
2007 2006
2008 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) 2007 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4)
2009 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) 2008 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4)
2010 2009
2011 } // namespace libyuv 2010 } // namespace libyuv
OLDNEW
« no previous file with comments | « source/row_neon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698