Init

Function Usage

DVPP initialization function, which must be used together with DeInit.

It does not support video decoding and video encoding. For the video decoding initialization, use InitVdec; for the video encoding initialization, use InitVenc. After initialization, call the deinitialization function of the corresponding function to destroy resources.

Prototype

APP_ERROR DvppWrapper::Init(void);  // Applicable to the Atlas 200/300/500 inference product.
APP_ERROR DvppWrapper::Init(MxbaseDvppChannelMode dvppChannelMode);  // Applicable to the Atlas 200/300/500 inference product and Atlas inference products.

Parameter Description

Parameter

Input/Output

Description

dvppChannelMode

Input

Channel mode.

  • MXBASE_DVPP_CHNMODE_DEFAULT = 0 // For the Atlas 200/300/500 inference product, the default value is 0, including VPC, JPEGD, JPEGE, and PNG.
  • For the Atlas inference products, the following parameters must be specified:
    • MXBASE_DVPP_CHNMODE_VPC = 1 // Image cropping and resizing
    • MXBASE_DVPP_CHNMODE_JPEGD = 2 // Image decoding
    • MXBASE_DVPP_CHNMODE_JPEGE = 3 // Image encoding
    • MXBASE_DVPP_CHNMODE_PNGD = 4 // PNG decoding

Return Parameter Description

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.