Based on the number of pixels to process per clock cycle and the type
parameter, there are different possible data types. The Vitis Vision library
uses these datatypes for internal processing and inside the xf::cv::Mat
class. The following are a few supported types:
XF_TNAME(TYPE,NPPC)
resolves to the unsigned data type (number of bits * number of channels * NPPC) of the data member of thexf::cv::Mat
object. For instance,XF_TNAME(XF_8UC1,XF_NPPC8)
resolves toap_uint<64>
.XF_CTUNAME(TYPE,NPPC)
resolves to the data type specified in the TYPE (number of bits) of the data member of thexf::cv::Mat
object. For instance,XF_TNAME(XF_16SC3,XF_NPPC8)
resolves toap_int<16>
.Word width = pixel depth * number of channels * number of pixels to process per cycle (NPPC)
.XF_DTUNAME(TYPE,NPPC)
resolves to the unsigned data type of the pixel (number of bits * number of channels). For instance,XF_DTUNAME(XF_32FC1,XF_NPPC1)
resolves tofloat
,XF_DTUNAME(XF_16SC3,XF_NPPC4)
resolves toap_uint<48>
.XF_PTSNAME(TYPE,NPPC)
resolves to the ‘C’ data type of the pixel. For instance,XF_PTSNAME (XF_16UC1,XF_NPPC2)
resolves tounsigned short
.XF_DTPIXELDEPTH(TYPE,NPPC)
returns the bitdepth of a individual channel of the declaredxf::cv::Mat
object. For instanceXF_DTPIXELDEPTH(8UC3,XF_NPPC4)
resolves to 8.XF_PIXELWIDTH(TYPE,NPPC)
returns the pixeldepth (combined bitdepth of all channels) of the declaredxf::cv::Mat
object. For instanceXF_PIXELWIDTH(8UC3,XF_NPPC4)
resolves to 24.
Note
ap_uint<>
, ap_int<>
, ap_fixed<>
, and ap_ufixed<>
types belong to the high-level synthesis (HLS) library.
For more information, see the Vitis HLS User Guide: High-Level Synthesis (UG1399 ).