DvppDataInfo

Function

Defines the DVPP entity data.

Structure Definition

struct DvppDataInfo {
    uint32_t width = 0;                                    
    uint32_t height = 0;                                  
    uint32_t widthStride = 0;                              
    uint32_t heightStride = 0;                             
    MxbasePixelFormat format = MXBASE_PIXEL_FORMAT_YUV_SEMIPLANAR_420;  
    uint32_t frameId = 0;                                  
    uint32_t channelId = 0;                                
    uint32_t dataSize = 0;
    uint32_t outDataSize = 0;
    uint32_t dataType = 0;                                
    uint8_t* data = nullptr;                              
    uint8_t* outData = nullptr;
    uint32_t resizeWidth = 0;
    uint32_t resizeHeight = 0;
    std::string device = "host:0";                         
    void (*destory)(void *) = nullptr;        
};

Parameter Description

Parameter

Input/Output

Description

width

Input

Width of the source image

height

Input

Height of the source image

widthStride

Input/Output

Width of the source image after alignment

heightStride

Input/Output

Height of the source image after alignment

format

Input/Output

Image format. The default value is MXBASE_PIXEL_FORMAT_YUV_SEMIPLANAR_420.

For details about the definition of the DVPP image format, see MxbasePixelFormat.

frameId

Input

ID of an image frame

channelId

Input

ID of an image channel

dataSize

Input/Output

Image data size, in bytes.

The size must be the same as the actual image size. Otherwise, a core dump may occur.

outDataSize

Input/Output

Size of the output image data, in bytes.

The value of outDataSize must be the same as that of the output image. Otherwise, a core dump may occur.

dataType

Input

Image data type

data

Input/Output

Image data

outData

Input/Output

Address of the pre-allocated memory, which is used to store the image data after video decoding.

resizeWidth

Input

Resizes the width during video decoding. Currently, only Atlas inference products support this parameter.

The default value is 0, indicating that no resizing is performed. Value range: [10, 4096]

resizeHeight

Input

Resizes the height during video decoding. Currently, only Atlas inference products support this parameter.

The default value is 0, indicating that no resizing is performed. Value range: [6, 4096]

device

Input

Device ID

destroy

Input/Output

Callback function for destroying the DVPP data