Lines Matching refs:kWidth

43   const int kWidth = ((W1280) > 0) ? (W1280) : 1;                              \
45 align_buffer_64(src_y, kWidth * kHeight + OFF); \
47 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
50 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
52 align_buffer_64(dst_y_c, kWidth * kHeight); \
54 SUBSAMPLE(kWidth, SUBSAMP_X) * \
57 SUBSAMPLE(kWidth, SUBSAMP_X) * \
59 align_buffer_64(dst_y_opt, kWidth * kHeight); \
61 SUBSAMPLE(kWidth, SUBSAMP_X) * \
64 SUBSAMPLE(kWidth, SUBSAMP_X) * \
68 for (int j = 0; j < kWidth; ++j) \
69 src_y[(i * kWidth) + j + OFF] = (random() & 0xff); \
71 for (int j = 0; j < SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
72 src_u[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
74 src_v[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
78 memset(dst_y_c, 1, kWidth * kHeight); \
79 memset(dst_u_c, 2, SUBSAMPLE(kWidth, SUBSAMP_X) * \
81 memset(dst_v_c, 3, SUBSAMPLE(kWidth, SUBSAMP_X) * \
83 memset(dst_y_opt, 101, kWidth * kHeight); \
84 memset(dst_u_opt, 102, SUBSAMPLE(kWidth, SUBSAMP_X) * \
86 memset(dst_v_opt, 103, SUBSAMPLE(kWidth, SUBSAMP_X) * \
89 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
91 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
93 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
94 dst_y_c, kWidth, \
95 dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
96 dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
97 kWidth, NEG kHeight); \
100 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
102 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
104 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
105 dst_y_opt, kWidth, \
106 dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
107 dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
108 kWidth, NEG kHeight); \
112 for (int j = 0; j < kWidth; ++j) { \
114 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
115 static_cast<int>(dst_y_opt[i * kWidth + j])); \
123 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
126 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
128 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
136 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
139 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
141 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
188 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
190 align_buffer_64(src_y, kWidth * kHeight + OFF); \
192 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
195 SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
197 align_buffer_64(dst_y_c, kWidth * kHeight); \
198 align_buffer_64(dst_uv_c, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
200 align_buffer_64(dst_y_opt, kWidth * kHeight); \
201 align_buffer_64(dst_uv_opt, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
205 for (int j = 0; j < kWidth; ++j) \
206 src_y[(i * kWidth) + j + OFF] = (random() & 0xff); \
208 for (int j = 0; j < SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
209 src_u[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
211 src_v[(i * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
215 memset(dst_y_c, 1, kWidth * kHeight); \
216 memset(dst_uv_c, 2, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
218 memset(dst_y_opt, 101, kWidth * kHeight); \
219 memset(dst_uv_opt, 102, SUBSAMPLE(kWidth * 2, SUBSAMP_X) * \
222 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
224 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
226 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
227 dst_y_c, kWidth, \
228 dst_uv_c, SUBSAMPLE(kWidth * 2, SUBSAMP_X), \
229 kWidth, NEG kHeight); \
232 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
234 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
236 SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
237 dst_y_opt, kWidth, \
239 SUBSAMPLE(kWidth * 2, SUBSAMP_X), \
240 kWidth, NEG kHeight); \
244 for (int j = 0; j < kWidth; ++j) { \
246 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
247 static_cast<int>(dst_y_opt[i * kWidth + j])); \
255 for (int j = 0; j < SUBSAMPLE(kWidth * 2, SUBSAMP_X); ++j) { \
258 SUBSAMPLE(kWidth * 2, SUBSAMP_X) + j]) - \
260 SUBSAMPLE(kWidth * 2, SUBSAMP_X) + j])); \
297 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
299 align_buffer_64(src_y, kWidth * kHeight + OFF); \
300 align_buffer_64(src_uv, 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X) * \
302 align_buffer_64(dst_y_c, kWidth * kHeight); \
304 SUBSAMPLE(kWidth, SUBSAMP_X) * \
307 SUBSAMPLE(kWidth, SUBSAMP_X) * \
309 align_buffer_64(dst_y_opt, kWidth * kHeight); \
311 SUBSAMPLE(kWidth, SUBSAMP_X) * \
314 SUBSAMPLE(kWidth, SUBSAMP_X) * \
318 for (int j = 0; j < kWidth; ++j) \
319 src_y[(i * kWidth) + j + OFF] = (random() & 0xff); \
321 for (int j = 0; j < 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X); ++j) { \
322 src_uv[(i * 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X)) + j + OFF] = \
326 memset(dst_y_c, 1, kWidth * kHeight); \
327 memset(dst_u_c, 2, SUBSAMPLE(kWidth, SUBSAMP_X) * \
329 memset(dst_v_c, 3, SUBSAMPLE(kWidth, SUBSAMP_X) * \
331 memset(dst_y_opt, 101, kWidth * kHeight); \
332 memset(dst_u_opt, 102, SUBSAMPLE(kWidth, SUBSAMP_X) * \
334 memset(dst_v_opt, 103, SUBSAMPLE(kWidth, SUBSAMP_X) * \
337 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
339 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
340 dst_y_c, kWidth, \
341 dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
342 dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
343 kWidth, NEG kHeight); \
346 SRC_FMT_PLANAR##To##FMT_PLANAR(src_y + OFF, kWidth, \
348 2 * SUBSAMPLE(kWidth, SRC_SUBSAMP_X), \
349 dst_y_opt, kWidth, \
350 dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
351 dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
352 kWidth, NEG kHeight); \
356 for (int j = 0; j < kWidth; ++j) { \
358 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
359 static_cast<int>(dst_y_opt[i * kWidth + j])); \
367 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
370 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
372 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
380 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
383 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
385 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
425 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
427 const int kStrideB = ALIGNINT(kWidth * BPP_B, ALIGN); \
429 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y); \
430 align_buffer_64(src_y, kWidth * kHeight + OFF); \
436 for (int i = 0; i < kWidth * kHeight; ++i) { \
446 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
447 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
448 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
450 kWidth, NEG kHeight); \
453 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
454 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
455 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \
457 kWidth, NEG kHeight); \
461 align_buffer_64(dst_argb32_c, kWidth * BPP_C * kHeight); \
462 align_buffer_64(dst_argb32_opt, kWidth * BPP_C * kHeight); \
463 memset(dst_argb32_c, 2, kWidth * BPP_C * kHeight); \
464 memset(dst_argb32_opt, 102, kWidth * BPP_C * kHeight); \
466 dst_argb32_c, kWidth * BPP_C , \
467 kWidth, kHeight); \
469 dst_argb32_opt, kWidth * BPP_C , \
470 kWidth, kHeight); \
471 for (int i = 0; i < kWidth * BPP_C * kHeight; ++i) { \
529 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
531 const int kStrideB = kWidth * BPP_B; \
532 align_buffer_64(src_y, kWidth * kHeight + OFF); \
534 SUBSAMPLE(kWidth, SUBSAMP_X) * \
540 for (int j = 0; j < kWidth; ++j) \
541 src_y[(i * kWidth) + j + OFF] = (random() & 0xff); \
543 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X) * 2; ++j) { \
544 src_uv[(i * SUBSAMPLE(kWidth, SUBSAMP_X)) * 2 + j + OFF] = \
551 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
552 src_uv + OFF, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, \
553 dst_argb_c, kWidth * BPP_B, \
554 kWidth, NEG kHeight); \
557 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \
558 src_uv + OFF, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, \
559 dst_argb_opt, kWidth * BPP_B, \
560 kWidth, NEG kHeight); \
563 align_buffer_64(dst_argb32_c, kWidth * 4 * kHeight); \
564 align_buffer_64(dst_argb32_opt, kWidth * 4 * kHeight); \
565 memset(dst_argb32_c, 2, kWidth * 4 * kHeight); \
566 memset(dst_argb32_opt, 102, kWidth * 4 * kHeight); \
568 dst_argb32_c, kWidth * 4, \
569 kWidth, kHeight); \
571 dst_argb32_opt, kWidth * 4, \
572 kWidth, kHeight); \
575 for (int j = 0; j < kWidth * 4; ++j) { \
577 abs(static_cast<int>(dst_argb32_c[i * kWidth * 4 + j]) - \
578 static_cast<int>(dst_argb32_opt[i * kWidth * 4 + j])); \
611 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
614 (SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMP_X * 8 * BPP_A + 7) / 8; \
616 align_buffer_64(dst_y_c, kWidth * kHeight); \
618 SUBSAMPLE(kWidth, SUBSAMP_X) * \
621 SUBSAMPLE(kWidth, SUBSAMP_X) * \
623 align_buffer_64(dst_y_opt, kWidth * kHeight); \
625 SUBSAMPLE(kWidth, SUBSAMP_X) * \
628 SUBSAMPLE(kWidth, SUBSAMP_X) * \
630 memset(dst_y_c, 1, kWidth * kHeight); \
632 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
634 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
635 memset(dst_y_opt, 101, kWidth * kHeight); \
637 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
639 SUBSAMPLE(kWidth, SUBSAMP_X) * SUBSAMPLE(kHeight, SUBSAMP_Y)); \
646 dst_y_c, kWidth, \
647 dst_u_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
648 dst_v_c, SUBSAMPLE(kWidth, SUBSAMP_X), \
649 kWidth, NEG kHeight); \
653 dst_y_opt, kWidth, \
654 dst_u_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
655 dst_v_opt, SUBSAMPLE(kWidth, SUBSAMP_X), \
656 kWidth, NEG kHeight); \
660 for (int j = 0; j < kWidth; ++j) { \
662 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
663 static_cast<int>(dst_y_opt[i * kWidth + j])); \
671 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
674 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
676 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
684 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) { \
687 SUBSAMPLE(kWidth, SUBSAMP_X) + j]) - \
689 SUBSAMPLE(kWidth, SUBSAMP_X) + j])); \
747 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
749 const int kStride = (kWidth * 8 * BPP_A + 7) / 8; \
751 align_buffer_64(dst_y_c, kWidth * kHeight); \
753 SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
755 align_buffer_64(dst_y_opt, kWidth * kHeight); \
757 SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
763 memset(dst_y_c, 1, kWidth * kHeight); \
764 memset(dst_uv_c, 2, SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
766 memset(dst_y_opt, 101, kWidth * kHeight); \
767 memset(dst_uv_opt, 102, SUBSAMPLE(kWidth, SUBSAMP_X) * 2 * \
771 dst_y_c, kWidth, \
772 dst_uv_c, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, \
773 kWidth, NEG kHeight); \
777 dst_y_opt, kWidth, \
778 dst_uv_opt, SUBSAMPLE(kWidth, SUBSAMP_X) * 2, \
779 kWidth, NEG kHeight); \
783 for (int j = 0; j < kWidth; ++j) { \
785 abs(static_cast<int>(dst_y_c[i * kWidth + j]) - \
786 static_cast<int>(dst_y_opt[i * kWidth + j])); \
794 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X) * 2; ++j) { \
797 SUBSAMPLE(kWidth, SUBSAMP_X) * 2 + j]) - \
799 SUBSAMPLE(kWidth, SUBSAMP_X) * 2 + j])); \
830 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
834 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
835 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B; \
848 kWidth, NEG kHeight); \
853 kWidth, NEG kHeight); \
875 const int kWidth = (random() & 63) + 1; \
879 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A;\
880 const int kStrideB = (kWidth * BPP_B + STRIDE_B - 1) / STRIDE_B * STRIDE_B;\
892 kWidth, kHeight); \
896 kWidth, kHeight); \
970 const int kWidth = ((W1280) > 0) ? (W1280) : 1; \
973 const int kStrideA = (kWidth * BPP_A + STRIDE_A - 1) / STRIDE_A * STRIDE_A; \
986 kWidth, NEG kHeight); \
991 kWidth, NEG kHeight); \
996 kWidth, NEG kHeight); \
1000 kWidth, NEG kHeight); \
1163 const int kWidth = benchmark_width_;
1169 const int sample_size = kWidth * kHeight +
1170 SUBSAMPLE(kWidth, SUBSAMP_X) *
1173 uint8* src_uv = src_y + kWidth * kHeight;
1193 for (int j = 0; j < kWidth; ++j)
1194 src_y[(i * kWidth) + j] = (random() & 0xff);
1196 for (int j = 0; j < SUBSAMPLE(kWidth, SUBSAMP_X); ++j) {
1197 src_uv[(i * SUBSAMPLE(kWidth, SUBSAMP_X)) + j * 2 + 0] =
1199 src_uv[(i * SUBSAMPLE(kWidth, SUBSAMP_X)) + j * 2 + 1] =
1214 NV12ToI420(src_y + crop_y * kWidth, kWidth,
1215 src_uv + (crop_y / 2) * kWidth, kWidth,
1226 kWidth, kHeight,
1232 EXPECT_EQ(dst_y[i * kWidth + j], dst_y_2[i * kWidth + j]);