hbDNNDataType

typedef enum { HB_DNN_IMG_TYPE_Y, HB_DNN_IMG_TYPE_NV12, HB_DNN_IMG_TYPE_NV12_SEPARATE, HB_DNN_IMG_TYPE_YUV444, HB_DNN_IMG_TYPE_RGB, HB_DNN_IMG_TYPE_BGR, HB_DNN_TENSOR_TYPE_S4, HB_DNN_TENSOR_TYPE_U4, HB_DNN_TENSOR_TYPE_S8, HB_DNN_TENSOR_TYPE_U8, HB_DNN_TENSOR_TYPE_F16, HB_DNN_TENSOR_TYPE_S16, HB_DNN_TENSOR_TYPE_U16, HB_DNN_TENSOR_TYPE_F32, HB_DNN_TENSOR_TYPE_S32, HB_DNN_TENSOR_TYPE_U32, HB_DNN_TENSOR_TYPE_F64, HB_DNN_TENSOR_TYPE_S64, HB_DNN_TENSOR_TYPE_U64, HB_DNN_TENSOR_TYPE_BOOL8, HB_DNN_TENSOR_TYPE_MAX } hbDNNDataType;

Tensor type.

S stands for Signed, U for Unsigned, and F for Floating-point, followed by a number that stands for the number of bits.

HB_DNN_IMG_TYPE_NV12 and HB_DNN_IMG_TYPE_NV12_SEPARATE both represent NV12 data, but there are differences in storage.

  • HB_DNN_IMG_TYPE_NV12 stores Y data and UV data in a piece of memory. When you are ready to input, just put the data in hbDNNTensor.sysMem[0].

  • HB_DNN_IMG_TYPE_NV12_SEPARATE stores Y data and UV data separately, Y data is stored in hbDNNTensor.sysMem[0], and UV data is stored in hbDNNTensor.sysMem[1].

  • Member

Member NameDescription
HB_DNN_IMG_TYPE_YTensor type: Image with Y channel only.
HB_DNN_IMG_TYPE_NV12Tensor type: An NV12 Image.
HB_DNN_IMG_TYPE_NV12_SEPARATETensor type: Image with Y & UV channels as input.
HB_DNN_IMG_TYPE_YUV444Tensor type: Image with YUV444 as input. J6 is deprecated.
HB_DNN_IMG_TYPE_RGBTensor type: Image with RGB as input. J6 is deprecated
HB_DNN_IMG_TYPE_BGRTensor type: Image with BGR as input. J6 is deprecated
HB_DNN_TENSOR_TYPE_S4Tensor type: Signed 4 bit.
HB_DNN_TENSOR_TYPE_U4Tensor type: Unsigned 4 bit.
HB_DNN_TENSOR_TYPE_S8Tensor type: Signed 8 bit.
HB_DNN_TENSOR_TYPE_U8Tensor type: Unsigned 8 bit.
HB_DNN_TENSOR_TYPE_F16Tensor type: 16 bit floating-point.
HB_DNN_TENSOR_TYPE_S16Tensor type: Signed 16 bit.
HB_DNN_TENSOR_TYPE_U16Tensor type: Unsigned 16 bit.
HB_DNN_TENSOR_TYPE_F32Tensor type: 32 bit floating-point.
HB_DNN_TENSOR_TYPE_S32Tensor type: Signed 32 bit.
HB_DNN_TENSOR_TYPE_U32Tensor type: Unsigned 32 bit.
HB_DNN_TENSOR_TYPE_F64Tensor type: 64 bit floating-point.
HB_DNN_TENSOR_TYPE_S64Tensor type: Signed 64 bit.
HB_DNN_TENSOR_TYPE_U64Tensor type: Unsigned 64 bit.
HB_DNN_TENSOR_TYPE_BOOL8Tensor type: Bool 8bit。
HB_DNN_TENSOR_TYPE_MAXMaximum tensor type number.