Lines Matching refs:stack
192 ImagePipelineStack stack;
193 stack.push_first_node<ImagePipelineNodeBufferedCallableSource>(4, 3, PixelFormat::I8,
201 ASSERT_TRUE(stack.get_next_row_data(out_data.data()));
205 ASSERT_TRUE(stack.get_next_row_data(out_data.data()));
209 ASSERT_TRUE(stack.get_next_row_data(out_data.data()));
224 ImagePipelineStack stack;
225 stack.push_first_node<ImagePipelineNodeArraySource>(3, 1, PixelFormat::RGB888,
227 stack.push_node<ImagePipelineNodeFormatConvert>(PixelFormat::BGR161616);
229 ASSERT_EQ(stack.get_output_width(), 3u);
230 ASSERT_EQ(stack.get_output_height(), 1u);
231 ASSERT_EQ(stack.get_output_row_bytes(), 6u * 3);
232 ASSERT_EQ(stack.get_output_format(), PixelFormat::BGR161616);
234 auto out_data = stack.get_all_data();
260 ImagePipelineStack stack;
261 stack.push_first_node<ImagePipelineNodeArraySource>(20, 2, PixelFormat::I8,
263 stack.push_node<ImagePipelineNodeDesegment>(20, std::vector<unsigned>{ 0, 2, 1, 3 }, 5, 1, 1);
265 ASSERT_EQ(stack.get_output_width(), 20u);
266 ASSERT_EQ(stack.get_output_height(), 2u);
267 ASSERT_EQ(stack.get_output_row_bytes(), 20u);
268 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
270 auto out_data = stack.get_all_data();
288 ImagePipelineStack stack;
289 stack.push_first_node<ImagePipelineNodeArraySource>(10, 2, PixelFormat::I8,
291 stack.push_node<ImagePipelineNodeDeinterleaveLines>(2, 1);
293 ASSERT_EQ(stack.get_output_width(), 20u);
294 ASSERT_EQ(stack.get_output_height(), 1u);
295 ASSERT_EQ(stack.get_output_row_bytes(), 20u);
296 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
298 auto out_data = stack.get_all_data();
316 ImagePipelineStack stack;
317 stack.push_first_node<ImagePipelineNodeArraySource>(4, 2, PixelFormat::RGB888,
319 stack.push_node<ImagePipelineNodeDeinterleaveLines>(2, 1);
321 ASSERT_EQ(stack.get_output_width(), 8u);
322 ASSERT_EQ(stack.get_output_height(), 1u);
323 ASSERT_EQ(stack.get_output_row_bytes(), 24u);
324 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
326 auto out_data = stack.get_all_data();
346 ImagePipelineStack stack;
347 stack.push_first_node<ImagePipelineNodeArraySource>(4, 1, PixelFormat::RGB161616,
349 stack.push_node<ImagePipelineNodeSwap16BitEndian>();
351 ASSERT_EQ(stack.get_output_width(), 4u);
352 ASSERT_EQ(stack.get_output_height(), 1u);
353 ASSERT_EQ(stack.get_output_row_bytes(), 24u);
354 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB161616);
356 auto out_data = stack.get_all_data();
384 ImagePipelineStack stack;
385 stack.push_first_node<ImagePipelineNodeArraySource>(4, 1, PixelFormat::RGB161616,
387 stack.push_node<ImagePipelineNodeInvert>();
389 ASSERT_EQ(stack.get_output_width(), 4u);
390 ASSERT_EQ(stack.get_output_height(), 1u);
391 ASSERT_EQ(stack.get_output_row_bytes(), 24u);
392 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB161616);
394 auto out_data_8bit = stack.get_all_data();
420 ImagePipelineStack stack;
421 stack.push_first_node<ImagePipelineNodeArraySource>(8, 1, PixelFormat::RGB888,
423 stack.push_node<ImagePipelineNodeInvert>();
425 ASSERT_EQ(stack.get_output_width(), 8u);
426 ASSERT_EQ(stack.get_output_height(), 1u);
427 ASSERT_EQ(stack.get_output_row_bytes(), 24u);
428 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
430 auto out_data = stack.get_all_data();
451 ImagePipelineStack stack;
452 stack.push_first_node<ImagePipelineNodeArraySource>(32, 1, PixelFormat::RGB111,
454 stack.push_node<ImagePipelineNodeInvert>();
456 ASSERT_EQ(stack.get_output_width(), 32u);
457 ASSERT_EQ(stack.get_output_height(), 1u);
458 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
459 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB111);
461 auto out_data = stack.get_all_data();
481 ImagePipelineStack stack;
482 stack.push_first_node<ImagePipelineNodeArraySource>(8, 3, PixelFormat::I8,
484 stack.push_node<ImagePipelineNodeMergeMonoLinesToColor>(ColorOrder::RGB);
486 ASSERT_EQ(stack.get_output_width(), 8u);
487 ASSERT_EQ(stack.get_output_height(), 1u);
488 ASSERT_EQ(stack.get_output_row_bytes(), 24u);
489 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
491 auto out_data = stack.get_all_data();
514 ImagePipelineStack stack;
515 stack.push_first_node<ImagePipelineNodeArraySource>(8, 1, PixelFormat::RGB888,
517 stack.push_node<ImagePipelineNodeMergeColorToGray>();
519 ASSERT_EQ(stack.get_output_width(), 8u);
520 ASSERT_EQ(stack.get_output_height(), 1u);
521 ASSERT_EQ(stack.get_output_row_bytes(), 8u);
522 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
524 auto out_data = stack.get_all_data();
545 ImagePipelineStack stack;
546 stack.push_first_node<ImagePipelineNodeArraySource>(8, 1, PixelFormat::RGB888,
548 stack.push_node<ImagePipelineNodeSplitMonoLines>();
550 ASSERT_EQ(stack.get_output_width(), 8u);
551 ASSERT_EQ(stack.get_output_height(), 3u);
552 ASSERT_EQ(stack.get_output_row_bytes(), 8u);
553 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
555 auto out_data = stack.get_all_data();
577 ImagePipelineStack stack;
578 stack.push_first_node<ImagePipelineNodeArraySource>(4, 4, PixelFormat::RGB888,
580 stack.push_node<ImagePipelineNodeComponentShiftLines>(0, 1, 2);
582 ASSERT_EQ(stack.get_output_width(), 4u);
583 ASSERT_EQ(stack.get_output_height(), 2u);
584 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
585 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
587 auto out_data = stack.get_all_data();
608 ImagePipelineStack stack;
609 stack.push_first_node<ImagePipelineNodeArraySource>(4, 4, PixelFormat::RGB888,
611 stack.push_node<ImagePipelineNodePixelShiftLines>(std::vector<std::size_t>{0, 2});
613 ASSERT_EQ(stack.get_output_width(), 4u);
614 ASSERT_EQ(stack.get_output_height(), 2u);
615 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
616 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
618 auto out_data = stack.get_all_data();
644 ImagePipelineStack stack;
645 stack.push_first_node<ImagePipelineNodeArraySource>(12, 9, PixelFormat::I8,
647 stack.push_node<ImagePipelineNodePixelShiftLines>(std::vector<std::size_t>{0, 2, 1, 3});
649 ASSERT_EQ(stack.get_output_width(), 12u);
650 ASSERT_EQ(stack.get_output_height(), 6u);
651 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
652 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
654 auto out_data = stack.get_all_data();
761 ImagePipelineStack stack;
762 stack.push_first_node<ImagePipelineNodeArraySource>(12, 2, PixelFormat::I8, in_data);
763 stack.push_node<ImagePipelineNodePixelShiftColumns>(std::vector<std::size_t>{0, 1, 2, 3});
765 ASSERT_EQ(stack.get_output_width(), 12u);
766 ASSERT_EQ(stack.get_output_height(), 2u);
767 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
768 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
770 auto out_data = stack.get_all_data();
784 ImagePipelineStack stack;
785 stack.push_first_node<ImagePipelineNodeArraySource>(12, 2, PixelFormat::I8, in_data);
786 stack.push_node<ImagePipelineNodePixelShiftColumns>(std::vector<std::size_t>{3, 1, 2, 0});
788 ASSERT_EQ(stack.get_output_width(), 12u);
789 ASSERT_EQ(stack.get_output_height(), 2u);
790 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
791 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
793 auto out_data = stack.get_all_data();
811 ImagePipelineStack stack;
812 stack.push_first_node<ImagePipelineNodeArraySource>(13, 2, PixelFormat::I8, in_data);
813 stack.push_node<ImagePipelineNodePixelShiftColumns>(std::vector<std::size_t>{3, 1, 2, 0});
815 ASSERT_EQ(stack.get_output_width(), 12u);
816 ASSERT_EQ(stack.get_output_height(), 2u);
817 ASSERT_EQ(stack.get_output_row_bytes(), 12u);
818 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
820 auto out_data = stack.get_all_data();
838 ImagePipelineStack stack;
839 stack.push_first_node<ImagePipelineNodeArraySource>(12, 2, PixelFormat::I8, in_data);
840 stack.push_node<ImagePipelineNodePixelShiftColumns>(std::vector<std::size_t>{7, 1, 5, 0});
842 ASSERT_EQ(stack.get_output_width(), 8u);
843 ASSERT_EQ(stack.get_output_height(), 2u);
844 ASSERT_EQ(stack.get_output_row_bytes(), 8u);
845 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
847 auto out_data = stack.get_all_data();
865 ImagePipelineStack stack;
866 stack.push_first_node<ImagePipelineNodeArraySource>(13, 2, PixelFormat::I8, in_data);
867 stack.push_node<ImagePipelineNodePixelShiftColumns>(std::vector<std::size_t>{7, 1, 5, 0});
869 ASSERT_EQ(stack.get_output_width(), 8u);
870 ASSERT_EQ(stack.get_output_height(), 2u);
871 ASSERT_EQ(stack.get_output_row_bytes(), 8u);
872 ASSERT_EQ(stack.get_output_format(), PixelFormat::I8);
874 auto out_data = stack.get_all_data();
899 ImagePipelineStack stack;
900 stack.push_first_node<ImagePipelineNodeArraySource>(1, 1, PixelFormat::RGB888,
902 stack.push_node<ImagePipelineNodeCalibrate>(bottom, top, 0);
904 ASSERT_EQ(stack.get_output_width(), 1u);
905 ASSERT_EQ(stack.get_output_height(), 1u);
906 ASSERT_EQ(stack.get_output_row_bytes(), 3u);
907 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB888);
909 auto out_data = stack.get_all_data();
935 ImagePipelineStack stack;
936 stack.push_first_node<ImagePipelineNodeArraySource>(1, 1, PixelFormat::RGB161616,
938 stack.push_node<ImagePipelineNodeCalibrate>(bottom, top, 0);
940 ASSERT_EQ(stack.get_output_width(), 1u);
941 ASSERT_EQ(stack.get_output_height(), 1u);
942 ASSERT_EQ(stack.get_output_row_bytes(), 6u);
943 ASSERT_EQ(stack.get_output_format(), PixelFormat::RGB161616);
945 auto out_data = stack.get_all_data();