VpcResize

Function Usage

Image resizing function. Before calling this API, call Init to initialize this function.

  • Supported image formats of the input/output data:
    • Atlas 200/300/500 inference product: YUV_SP_420 and YVU_SP_420 (nv12 and nv21).
    • Atlas 200I/500 A2 inference product: supports YUV_SP_420 and YVU_SP_420 (nv12 and nv21).
    • Atlas inference product: YUV_SP_420, YVU_SP_420, RGB_888 and BGR_888 (nv12, nv21, rgb, and bgr). The resolution of the RGB (BGR) image format cannot exceed 4096 x 4096.
  • inputDataInfo: The actual image resolution range is [18 x 6, 4096 x 4096]. The size of YUV_SP_420 or YVU_SP_420 image can reach 8192 x 8192.
  • resize: Its maximum resolution is 4096 x 4096, and the minimum resolution is 32 x 6.
  • outputImage: The width is automatically aligned by 16, and the height is automatically aligned by 2. So the size range is [32 x 6, 4096 x 4096].
  • The width and height of the resized image is a multiple of [1/32, 16] of the actual width and height range.

Prototype

1
APP_ERROR DvppWrapper::VpcResize(DvppDataInfo& inputDataInfo, DvppDataInfo& outputDataInfo, ResizeConfig& resizeConfig, AscendStream& stream);
1
APP_ERROR DvppWrapper::VpcResize(DvppDataInfo& inputDataInfo, DvppDataInfo& outputDataInfo, ResizeConfig& resizeConfig);

Parameters

Parameter

Input/Output

Description

inputDataInfo

Input

Source image information.

outputDataInfo

Output

Resized data.

resizeConfig

Input

Resizing configuration.

stream

Input

AscendStream type. When AscendStream& stream is not specified or the value is AscendStream::DefaultStream(), the API performs a synchronous operation. In other cases, the API performs asynchronous operations.

Response Parameters

Data Structure

Description

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.