Function: dvpp_create_channel

Applicable Products

Product

Supported (√/x)

Ascend 950PR&950DT products

x

Atlas A3 products

√

Atlas A2 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. Call acl.media.dvpp_create_channel_desc to create the input data.

In addition, for 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, VPC, JPEGD, PNGD, and JPEGE functions are supported. If the channel mode is not specified, the system creates all the four channels by default, which may occupy channel resources. (For details about the limit on the number of channels, see General Description.)

Return Values

Return Value

Description

ret

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

Constraints

  • 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 calls acl.rt.create_stream once to create a stream. This stream is used to create a channel. After the channel creation is complete, the stream resources are automatically released.

    When creating a channel, you must comply with the constraints of acl.rt.create_stream, such as the number of streams.

Reference

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