Function: dvpp_create_channel

Applicability

Product

Supported (√/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

Function Usage

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)
    

Parameter Description

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 products , 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. Unless the channel mode is specified, the system creates all these modes of channels by default, which may occupy more channel resources. (For details about the limit on the number of channels, see General Description.)

Return Value Description

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.
  • Do not use a channel concurrently across streams.
  • acl.media.dvpp_create_channel creates a stream internally by calling acl.rt.create_stream once. The stream is used for a channel creation task, and is automatically destroyed when the task is complete.

    When creating a channel, observe the restrictions of acl.rt.create_stream, such as the number of streams.

Reference

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