Function: dvpp_create_channel

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 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 Atlas inference products , you need to call dvpp_set_channel_desc_mode to specify the channel mode in the channel description to determine the function of the image data processing channel. Currently, the PNGDVPC, JPEGD, 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 General Description.

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.
  • acl.media.dvpp_create_channel calls acl.rt.create_stream 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 acl.rt.create_stream, for example, the number of streams.

Reference

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