Home | History | Annotate | Download | only in unit_test

Lines Matching defs:kWidth

36   const int kWidth = ((W1280) > 0) ? (W1280) : 1;                              \
38 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
40 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
43 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
45 align_buffer_page_end(dst_y_c, kWidth * kHeight); \
47 SUBSAMPLE(kWidth, SUBSAMP_X) * \
50 SUBSAMPLE(kWidth, SUBSAMP_X) * \
52 align_buffer_page_end(dst_y_opt, kWidth * kHeight); \
54 SUBSAMPLE(kWidth, SUBSAMP_X) * \
57 SUBSAMPLE(kWidth, SUBSAMP_X) * \
60 for (int j = 0; j < kWidth; ++j) \
61 src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
63 for (int j = 0; j < SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
64 src_u[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
66 src_v[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
70 memset(dst_y_c, 1, kWidth * kHeight); \
71 memset(dst_u_c, 2, SUBSAMPLE(kWidth, SUBSAMP_X) * \
73 memset(dst_v_c, 3, SUBSAMPLE(kWidth, SUBSAMP_X) * \
75 memset(dst_y_opt, 101, kWidth * kHeight); \
76 memset(dst_u_opt, 102, SUBSAMPLE(kWidth, SUBSAMP_X) * \
78 memset(dst_v_opt, 103, SUBSAMPLE(kWidth, SUBSAMP_X) * \
81 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
83 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
85 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
86 dst_y_c, kWidth, \
87 dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
88 dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
89 kWidth, NEG kHeight); \
92 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
94 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
96 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
97 dst_y_opt, kWidth, \
98 dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
99 dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
100 kWidth, NEG kHeight); \
104 for (int j = 0; j < kWidth; ++j) { \
106 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
107 static_cast<int>(dst_y_opt[i * kWidth + j])); \
115 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
118 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
120 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
128 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
131 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
133 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
180 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
182 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
184 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
187 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
189 align_buffer_page_end(dst_y_c, kWidth * kHeight); \
190 align_buffer_page_end(dst_uv_c, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
192 align_buffer_page_end(dst_y_opt, kWidth * kHeight); \
193 align_buffer_page_end(dst_uv_opt, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
196 for (int j = 0; j < kWidth; ++j) \
197 src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
199 for (int j = 0; j < SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
200 src_u[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
202 src_v[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
206 memset(dst_y_c, 1, kWidth * kHeight); \
207 memset(dst_uv_c, 2, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
209 memset(dst_y_opt, 101, kWidth * kHeight); \
210 memset(dst_uv_opt, 102, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
213 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
215 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
217 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
218 dst_y_c, kWidth, \
219 dst_uv_c, SUBSAMPLE(kWidth * 2, SUBSAMP_X), \
220 kWidth, NEG kHeight); \
223 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
225 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
227 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
228 dst_y_opt, kWidth, \
230 SUBSAMPLE(kWidth * 2, SUBSAMP_X), \
231 kWidth, NEG kHeight); \
235 for (int j = 0; j < kWidth; ++j) { \
237 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
238 static_cast<int>(dst_y_opt[i * kWidth + j])); \
246 for (int j = 0; j < SUBSAMPLE(kWidth * 2, SUBSAMP_X); ++j) { \
249 SUBSAMPLE(kWidth * 2, SUBSAMP_X) + j]) - \
251 SUBSAMPLE(kWidth * 2, SUBSAMP_X) + j])); \
288 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
290 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
291 align_buffer_page_end(src_uv, 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
293 align_buffer_page_end(dst_y_c, kWidth * kHeight); \
295 SUBSAMPLE(kWidth, SUBSAMP_X) * \
298 SUBSAMPLE(kWidth, SUBSAMP_X) * \
300 align_buffer_page_end(dst_y_opt, kWidth * kHeight); \
302 SUBSAMPLE(kWidth, SUBSAMP_X) * \
305 SUBSAMPLE(kWidth, SUBSAMP_X) * \
308 for (int j = 0; j < kWidth; ++j) \
309 src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
311 for (int j = 0; j < 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
312 src_uv[(i * 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
316 memset(dst_y_c, 1, kWidth * kHeight); \
317 memset(dst_u_c, 2, SUBSAMPLE(kWidth, SUBSAMP_X) * \
319 memset(dst_v_c, 3, SUBSAMPLE(kWidth, SUBSAMP_X) * \
321 memset(dst_y_opt, 101, kWidth * kHeight); \
322 memset(dst_u_opt, 102, SUBSAMPLE(kWidth, SUBSAMP_X) * \
324 memset(dst_v_opt, 103, SUBSAMPLE(kWidth, SUBSAMP_X) * \
327 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
329 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
330 dst_y_c, kWidth, \
331 dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
332 dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
333 kWidth, NEG kHeight); \
336 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
338 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
339 dst_y_opt, kWidth, \
340 dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
341 dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
342 kWidth, NEG kHeight); \
346 for (int j = 0; j < kWidth; ++j) { \
348 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
349 static_cast<int>(dst_y_opt[i * kWidth + j])); \
357 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
360 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
362 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
370 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
373 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
375 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
415 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
417 const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
418 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
420 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
425 for (int i = 0; i < kWidth * kHeight; ++i) { \
435 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
439 kWidth, NEG kHeight); \
442 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
446 kWidth, NEG kHeight); \
450 align_buffer_page_end(dst_argb32_c, kWidth * BPP_C * kHeight); \
451 align_buffer_page_end(dst_argb32_opt, kWidth * BPP_C * kHeight); \
452 memset(dst_argb32_c, 2, kWidth * BPP_C * kHeight); \
453 memset(dst_argb32_opt, 102, kWidth * BPP_C * kHeight); \
455 dst_argb32_c, kWidth * BPP_C , \
456 kWidth, kHeight); \
458 dst_argb32_opt, kWidth * BPP_C , \
459 kWidth, kHeight); \
460 for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \
524 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
526 const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
527 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
529 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
532 align_buffer_page_end(src_a, kWidth * kHeight + OFF); \
535 for (int i = 0; i < kWidth * kHeight; ++i) { \
546 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
549 src_a + OFF, kWidth, \
551 kWidth, NEG kHeight, ATTEN); \
554 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
557 src_a + OFF, kWidth, \
559 kWidth, NEG kHeight, ATTEN); \
562 for (int i = 0; i < kWidth * BPP_B * kHeight; ++i) { \
598 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
600 const int kStrideB = kWidth * BPP_B; \
601 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
602 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
608 for (int j = 0; j < kWidth; ++j) \
609 src_y[i * kWidth + j + OFF] = (fastrand() & 0xff); \
618 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
620 dst_argb_c, kWidth * BPP_B, \
621 kWidth, NEG kHeight); \
624 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
626 dst_argb_opt, kWidth * BPP_B, \
627 kWidth, NEG kHeight); \
630 align_buffer_page_end(dst_argb32_c, kWidth * 4 * kHeight); \
631 align_buffer_page_end(dst_argb32_opt, kWidth * 4 * kHeight); \
632 memset(dst_argb32_c, 2, kWidth * 4 * kHeight); \
633 memset(dst_argb32_opt, 102, kWidth * 4 * kHeight); \
635 dst_argb32_c, kWidth * 4, \
636 kWidth, kHeight); \
638 dst_argb32_opt, kWidth * 4, \
639 kWidth, kHeight); \
642 for (int j = 0; j < kWidth * 4; ++j) { \
644 abs(static_cast<int>(dst_argb32_c[i * kWidth * 4 + j]) - \
645 static_cast<int>(dst_argb32_opt[i * kWidth * 4 + j])); \
677 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
679 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
683 align_buffer_page_end(dst_y_c, kWidth * kHeight); \
688 align_buffer_page_end(dst_y_opt, kWidth * kHeight); \
694 memset(dst_y_c, 1, kWidth * kHeight); \
699 memset(dst_y_opt, 101, kWidth * kHeight); \
709 dst_y_c, kWidth, \
712 kWidth, NEG kHeight); \
716 dst_y_opt, kWidth, \
719 kWidth, NEG kHeight); \
722 for (int j = 0; j < kWidth; ++j) { \
723 EXPECT_NEAR(static_cast<int>(dst_y_c[i * kWidth + j]), \
724 static_cast<int>(dst_y_opt[i * kWidth + j]), DIFF); \
793 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
795 const int kStride = SUBSAMPLE(kWidth, SUB_A) * BPP_A; \
796 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
798 align_buffer_page_end(dst_y_c, kWidth * kHeight); \
801 align_buffer_page_end(dst_y_opt, kWidth * kHeight); \
807 memset(dst_y_c, 1, kWidth * kHeight); \
809 memset(dst_y_opt, 101, kWidth * kHeight); \
813 dst_y_c, kWidth, dst_uv_c, kStrideUV * 2, \
814 kWidth, NEG kHeight); \
818 dst_y_opt, kWidth, \
819 dst_uv_opt, kStrideUV * 2, kWidth, NEG kHeight); \
823 for (int j = 0; j < kWidth; ++j) { \
825 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
826 static_cast<int>(dst_y_opt[i * kWidth + j])); \
870 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
874 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
875 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
887 kWidth, NEG kHeight); \
892 kWidth, NEG kHeight); \
913 const int kWidth = (fastrand() & 63) + 1; \
917 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A;\
918 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B;\
930 kWidth, kHeight); \
934 kWidth, kHeight); \
1003 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
1007 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
1008 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
1020 NULL, kWidth, NEG kHeight); \
1025 NULL, kWidth, NEG kHeight); \
1046 const int kWidth = (fastrand() & 63) + 1; \
1050 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A;\
1051 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B;\
1063 NULL, kWidth, kHeight); \
1067 NULL, kWidth, kHeight); \
1106 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
1109 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
1121 kWidth, NEG kHeight); \
1126 kWidth, NEG kHeight); \
1131 kWidth, NEG kHeight); \
1135 kWidth, NEG kHeight); \
1353 const int kWidth = benchmark_width_;
1359 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X);
1360 const int sample_size = kWidth * kHeight +
1364 uint8* src_uv = src_y + kWidth * kHeight;
1382 for (int i = 0; i < kHeight * kWidth; ++i) {
1405 kWidth, kHeight,
1409 NV12ToI420(src_y + crop_y * kWidth, kWidth,
1419 EXPECT_EQ(dst_y[i * kWidth + j], dst_y_2[i * kWidth + j]);
1542 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
1544 const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
1545 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
1547 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
1552 for (int i = 0; i < kWidth * kHeight; ++i) { \
1562 FMT_PLANAR##To##FMT_B##Dither(src_y + OFF, kWidth, \
1566 NULL, kWidth, NEG kHeight); \
1569 FMT_PLANAR##To##FMT_B##Dither(src_y + OFF, kWidth, \
1573 NULL, kWidth, NEG kHeight); \
1577 align_buffer_page_end(dst_argb32_c, kWidth * BPP_C * kHeight); \
1578 align_buffer_page_end(dst_argb32_opt, kWidth * BPP_C * kHeight); \
1579 memset(dst_argb32_c, 2, kWidth * BPP_C * kHeight); \
1580 memset(dst_argb32_opt, 102, kWidth * BPP_C * kHeight); \
1582 dst_argb32_c, kWidth * BPP_C , \
1583 kWidth, kHeight); \
1585 dst_argb32_opt, kWidth * BPP_C , \
1586 kWidth, kHeight); \
1587 for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \
1620 const int kWidth = benchmark_width_; \
1624 4 * SUBSAMPLE(kWidth, 2) * kHeight); \
1625 align_buffer_page_end(orig_y, kWidth * kHeight); \
1627 SUBSAMPLE(kWidth, 2) * \
1630 SUBSAMPLE(kWidth, 2) * \
1633 align_buffer_page_end(dst_y_orig, kWidth * kHeight); \
1635 SUBSAMPLE(kWidth, 2) * \
1638 align_buffer_page_end(dst_y, kWidth * kHeight); \
1640 SUBSAMPLE(kWidth, 2) * \
1643 MemRandomize(orig_uyvy, 4 * SUBSAMPLE(kWidth, 2) * kHeight); \
1646 libyuv::UYVYTOI420(orig_uyvy, 4 * SUBSAMPLE(kWidth, 2), \
1647 orig_y, kWidth, \
1648 orig_u, SUBSAMPLE(kWidth, 2), \
1649 orig_v, SUBSAMPLE(kWidth, 2), \
1650 kWidth, kHeight); \
1651 libyuv::I420ToNV12(orig_y, kWidth, \
1652 orig_u, SUBSAMPLE(kWidth, 2), \
1653 orig_v, SUBSAMPLE(kWidth, 2), \
1654 dst_y_orig, kWidth, \
1655 dst_uv_orig, 2 * SUBSAMPLE(kWidth, 2), \
1656 kWidth, kHeight); \
1660 libyuv::UYVYTONV12(orig_uyvy, 4 * SUBSAMPLE(kWidth, 2), \
1661 dst_y, kWidth, \
1662 dst_uv, 2 * SUBSAMPLE(kWidth, 2), \
1663 kWidth, kHeight); \
1666 for (int i = 0; i < kWidth * kHeight; ++i) { \
1669 for (int i = 0; i < kWidth * kHeight; ++i) { \
1672 for (int i = 0; i < 2 * SUBSAMPLE(kWidth, 2) * SUBSAMPLE(kHeight, 2); ++i) { \
1692 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
1694 const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \
1695 const int kStrideUV = SUBSAMPLE(kWidth, SUBSAMP_X); \
1697 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
1701 for (int i = 0; i < kWidth * kHeight; ++i) { \
1710 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
1714 kWidth, NEG kHeight); \
1717 const int kStrideC = kWidth * BPP_C; \
1722 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \
1726 kWidth, NEG kHeight); \
1730 kWidth, kHeight); \
1789 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
1791 const int kStrideB = SUBSAMPLE(kWidth, SUB_B) * BPP_B; \
1793 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y); \
1794 align_buffer_page_end(src_y, kWidth * kHeight + OFF); \
1797 align_buffer_page_end(src_a, kWidth * kHeight + OFF); \
1799 for (int i = 0; i < kWidth * kHeight; ++i) { \
1809 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
1810 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
1811 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
1812 src_a + OFF, kWidth, \
1814 kWidth, NEG kHeight, ATTEN); \
1818 const int kStrideC = kWidth * BPP_C; \
1823 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \
1824 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
1825 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
1826 src_a + OFF, kWidth, \
1828 kWidth, NEG kHeight, ATTEN); \
1832 kWidth, kHeight); \