Function: dvpp_create_channel

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Description

Creates an image processing channel, which is reusable. After being destroyed, the channel is no longer available.

Prototype

  • C Prototype
    1
    aclError acldvppCreateChannel(acldvppChannelDesc *channelDesc)
    
  • Python Function
    1
    ret = acl.media.dvpp_create_channel(dvpp_channel_desc)
    

Parameters

Parameter

Description

dvpp_channel_desc

Int, pointer address of the channel description. The input data is created by calling acl.media.dvpp_create_channel_desc.

In addition, for the Atlas inference product , you need to call dvpp_set_channel_desc_mode to specify the channel mode in the channel description and specify the function to be implemented by the image data processing channel. Currently, the VPC, JPEGD, PNGD, and JPEGE functions are supported. If the channel mode is not specified, the system creates channels in the four modes by default, which may occupy channel resources. For details about the limit on the number of channels, see Functions and Restrictions.

Return Value

Return Value

Description

ret

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

Restrictions

  • Channels are thread-unsafe, that is, a separate channel should be created for each thread.
  • A channel cannot be used concurrently across streams at the same time.
  • The acl.media.dvpp_create_channel API calls the acl.rt.create_stream API once to create a stream. The stream is used to create a stream task. After the stream creation task is complete, the stream resources are automatically released.

    When creating a stream, you must comply with the constraints of the acl.rt.create_stream API, for example, the number of streams.

Reference

For details about the API call sequence and examples, see Media Data Processing V1.