hls::AXIvideo2Mat


Synopsis

template<int W, int ROWS, int COLS, int T>
int hls::AXIvideo2Mat( hls::stream<ap_axiu<W,1,1,1> >& AXI_video_strm,
                       hls::Mat<ROWS, COLS, T>& mat );

Parameters

  • AXI_video_strm – input AXI video stream in hls::stream format, compatible with AXI4-Stream protocol.
  • mat – output image in hls::Mat format.

Description


Converts image data stored in hls::Mat format to an AXI4 video stream(hls::stream) format.
Image data must be stored in AXI_video_strm, and the data field of mat must be empty before invocations. Invoking this function will consume the data in AXI_video_strm, and filling the image data of mat.
The data width of a pixel in mat must be no greater than W, the data width of TDATA in AXI4-Stream protocol.
This function is able to perform frame sync for the input video stream, by detecting the TUSER bit to mark the top-left pixel of an input frame.It will return bit error of ERROR_IO_EOL_EARLY or ERROR_IO_EOL_LATE to indicate an unexpected line length, by detecting TLAST input.