Function: dvpp_vpc_pyr_down_async

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

x

Atlas training products

x

Atlas inference products

Atlas 200I/500 A2 inference products

x

Function Usage

Performs pyramid resizing to resize the output image to half the original size. This API is asynchronous.

Prototype

  • C Prototype
    1
    aclError acldvppVpcPyrDownAsync(acldvppChannelDesc *channelDesc, acldvppPicDesc *inputDesc, acldvppPicDesc *outputDesc, void *reserve, aclrtStream stream)
    
  • Python Function
    1
    ret = acl.media.dvpp_vpc_pyr_down_async(dvpp_channel_desc, input_dvpp_pic_desc, output_dvpp_pic_desc, reserve, stream)
    

Parameter Description

Parameter

Description

dvpp_channel_desc

Int, pointer address of the channel description. It must be the same as dvpp_channel_desc passed to the acl.media.dvpp_create_channel call.

input_dvpp_pic_desc

Int, pointer address of the input image information.
  • Call acl.media.dvpp_create_pic_desc to create an image description.
  • Call the acl.media.dvpp_set_pic_desc APIs to set the image description (including the memory address, memory size, image format, and image resolution).

output_dvpp_pic_desc

Int, pointer address of the output image information.

When it is used as an input, the user needs to:
  • Call acl.media.dvpp_create_pic_desc to create an image description.
  • Call the acl.media.dvpp_set_pic_desc APIs to set the image description (including the memory address, memory size, image format, and image resolution).

    Specify the width, height, width stride, height stride, memory address, memory size, and format of the output image.

    • The width and height of the output image must be the same as those of the input image. Otherwise, an error is reported.

      If the width or height of the output image is set to 0, VPC uses the width and height of the input image as the width and height of the output image respectively. In addition, VPC calculates the width stride and height stride based on the alignment requirements, which vary with the image format. For details, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.

    • The width stride and height stride of the output image must meet the alignment requirements, which vary with the image format. For details, see Restrictions on Image Formats, Width and Height Alignment, and Buffers.

reserve

Int, pointer address of the pyramid configuration parameter. This parameter is reserved.

stream

Int, stream object.

Return Value Description

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Restrictions