VpcPadding

Function Usage

Padding function for image processing. Before calling this API, call Init to initialize this function.

  • Formats of the input and output Image class can be YUV_SP_420, YVU_SP_420, RGB_888 and BGR_888 (nv12, nv21, rgb, and bgr). The resolution of an RGB (BGR) image cannot exceed 4096 x 4096.
  • The actual inputImage resolution range is [18 x 6, 4096 x 4096].
  • Only the BORDER_CONSTANT padding method is supported. Other padding methods are reserved. For YUV_SP_420 and YVU_SP_420 formats, it is recommended that the padding size be an even number. If the padding size is an odd number, upward alignment is automatically performed. For example, if the padding size entered by the user is (1, 1, 1, 1), it is automatically aligned to (2, 2, 2, 2), which means two pixels are padded to the top, bottom, left, and right borders respectively. When the input image size is 4095 x 4095 and the padding size is (1, 0, 1, 0), the image size after automatic alignment is 4097 x 4097, which is out of the padding size range. As a result, padding fails.
  • The outputImage resolution range is [18 × 6, 4096 × 4096]. The width is a multiple of 16, and the height is a multiple of 2. The value range is [32 × 6, 4096 × 4096].

Prototype

1
APP_ERROR DvppWrapper::VpcPadding(DvppDataInfo &inputDataInfo, DvppDataInfo &outputDataInfo, MakeBorderConfig &makeBorderConfig);

Parameters

Parameter

Input/Output

Description

inputDataInfo

Input

Data to be padded.

outputDataInfo

Output

Data after padding.

makeBorderConfig

Input

Padding configuration. It is recommended that the padding size of YUV_SP_420 and YVU_SP_420 be an even number.

Response Parameters

Data Structure

Description

APP_ERROR

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