aclvdecSetChannelDesc Series

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

x

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Sets the description of a video decoding channel.

Prototype

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
aclError aclvdecSetChannelDescChannelId(aclvdecChannelDesc *channelDesc, uint32_t channelId)
aclError aclvdecSetChannelDescThreadId(aclvdecChannelDesc *channelDesc, uint64_t threadId)
aclError aclvdecSetChannelDescCallback(aclvdecChannelDesc *channelDesc, aclvdecCallback callback)
aclError aclvdecSetChannelDescEnType(aclvdecChannelDesc *channelDesc, acldvppStreamFormat enType)
aclError aclvdecSetChannelDescOutPicFormat(aclvdecChannelDesc *channelDesc, acldvppPixelFormat outPicFormat)
aclError aclvdecSetChannelDescOutPicWidth(aclvdecChannelDesc *channelDesc, uint32_t outPicWidth)
aclError aclvdecSetChannelDescOutPicHeight(aclvdecChannelDesc *channelDesc, uint32_t outPicHeight)
aclError aclvdecSetChannelDescRefFrameNum(aclvdecChannelDesc *channelDesc, uint32_t refFrameNum)
aclError aclvdecSetChannelDescOutMode(aclvdecChannelDesc *channelDesc, uint32_t outMode)
aclError aclvdecSetChannelDescBitDepth(aclvdecChannelDesc *channelDesc, uint32_t bitDepth)

Parameters

Parameter

Input/Output

Description

channelDesc

Output

Pointer to the description of a video decoding channel.

Call aclvdecCreateChannelDesc to create data of the aclvdecChannelDesc type in advance.

channelId

Input

Channel ID.

Atlas training products: Must be in the range of [0, 31].

Atlas inference products: Must be in the range of [0, 255].

Atlas 200I/500 A2 inference products: Must be in the range of [0, 255].

Atlas A2 training products/Atlas A2 inference products: Must be in the range of [0, 255].

Atlas A3 training products/Atlas A3 inference products: Must be in the range of [0, 255].

threadId

Input

Callback thread ID.

Do not pass the same thread ID for subscribing to VDEC callback functions on different devices in the same process.

On a single device, the same thread ID can be specified for multiple VDEC channels. Compared with the scenario where each VDEC channel is processed by a separate thread, VDEC is less performant when multiple VDEC channels are processed in serial in a single thread.

callback

Input

Decoding callback function.

For details, see aclvdecCallback.

enType

Input

Video coding protocol: H.265 main level (0), H.264 baseline level (1), H.264 main level (2), or H.264 high level (3). For details, see acldvppStreamFormat.

outPicFormat

Input

Storage format of the output image. For details, see acldvppPixelFormat.

For details about the supported formats, see Restrictions on Stream/Image Formats, Width and Height Alignment, and Buffers.

Defaults to YUV420SP NV12.

outPicWidth

Input

Maximum output width.

Atlas training products: Defaults to 1920.

Atlas inference products: Defaults to 4096.

Atlas 200I/500 A2 inference products: Defaults to 4096.

Atlas A2 training products/Atlas A2 inference products: Defaults to 4096.

Atlas A3 training products/Atlas A3 inference products: Defaults to 4096.

outPicHeight

Input

Maximum output height.

Atlas training products: Defaults to 1120.

Atlas inference products: Defaults to 4096.

Atlas 200I/500 A2 inference products: Defaults to 4096.

Atlas A2 training products/Atlas A2 inference products: Defaults to 4096.

Atlas A3 training products/Atlas A3 inference products: Defaults to 4096.

refFrameNum

Input

Number of reference frames. Must be in the range of [0, 16].

Atlas training products: Not configurable in the current version.

Atlas inference products: Defaults to 8.

Atlas 200I/500 A2 inference products: Defaults to 8.

Atlas A2 training products/Atlas A2 inference products: Defaults to 8.

Atlas A3 training products/Atlas A3 inference products: Defaults to 8.

outMode

Input

Frame output mode, to set whether to output frames in real time.

Value range:
  • 0: delayed frame output mode. VDEC starts to output the decoding result only after receiving multiple frames in the stream.
  • 1: real-time frame output mode. VDEC starts to output the decoding result in real time after receiving one frame in the stream. Only H.264/H.265 standard streams with simple reference relationships are supported (no long-term reference frames or B-frames).

bitDepth

Input

Video bit depth.

Value range:
  • 0: 8-bit
  • 1: 10-bit (default)

Atlas training products: Not configurable in the current version.

Returns

0 on success; else, failure. For details, see aclError.