Function: dvpp_create_roi_config

Applicability

Product

Supported

Ascend 950PR/Ascend 950DT

x

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Creates data of the acldvppRoiConfig type as an ROI configuration.

To destroy data of the acldvppRoiConfig type, call acl.media.dvpp.destroy_roi_config.

Prototype

  • C Prototype
    1
    acldvppRoiConfig *acldvppCreateRoiConfig(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom)
    
  • Python Function
    1
    dvpp_roi_config = acl.media.dvpp_create_roi_config(left, right, top, bottom)
    

Parameters

Parameter

Description

left

Int, left offset.

  • For the Atlas training product, the value must be an even number. If used to describe the paste ROI, the left offset must be rounded up to the nearest multiple of 16.
  • For the Atlas inference product, the value does not need to be an even number. If used to describe the paste ROI, the left offset must be rounded up to the nearest multiple of 16.
  • For the Atlas A2 training product/Atlas A2 inference product, the value does not need to be an even number or aligned.
  • For the Atlas A3 training product/Atlas A3 inference product, the value does not need to be an even number or aligned.

right

Int, right offset.

  • For the Atlas training product, the value must be an odd number.
  • For the Atlas inference product, the value does not need to be an odd number.
  • For the Atlas A2 training product/Atlas A2 inference product, the value does not need to be an odd number.
  • For the Atlas A3 training product/Atlas A3 inference product, the value does not need to be an odd number.

top

Int, top offset.

  • For the Atlas training product, the value must be an even number.
  • For the Atlas inference product, the value does not need to be an even number.
  • For the Atlas A2 training product/Atlas A2 inference product, the value does not need to be an even number.
  • For the Atlas A3 training product/Atlas A3 inference product, the value does not need to be an even number.

bottom

Int, bottom offset.

  • For the Atlas training product, the value must be an odd number.
  • For the Atlas inference product, the value does not need to be an odd number.
  • For the Atlas A2 training product/Atlas A2 inference product, the value does not need to be an odd number.
  • For the Atlas A3 training product/Atlas A3 inference product, the value does not need to be an odd number.

Return Value

Return Value

Description

dvpp_roi_config

Int, pointer address of the data of the acldvppRoiConfig type.

  • If a non-zero value is returned, the operation is successful.
  • If 0 is returned, the operation fails.