• Home
  • Raw
  • Download

Lines Matching full:stack

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