Sets the description of a video decoding channel. This API is synchronous.
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)
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. Must be in the range of [0, 31] for the Ascend 310 AI Processor. Must be in the range of [0, 31] for the Ascend 910 AI Processor. Must be in the range of [0, 255] for the Ascend 310P AI Processor. |
threadId |
Input |
Callback thread ID.
NOTE:
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). |
outPicFormat |
Input |
YUV image format.
Defaults to YUV420SP NV12. |
outPicWidth |
Input |
Maximum output width. Defaults to 1920 for the Ascend 310 AI Processor. Defaults to 1920 for the Ascend 310 AI Processor. Defaults to 4096 for the Ascend 610 AI Processor. |
outPicHeight |
Input |
Maximum output height Defaults to 1120 for the Ascend 310 AI Processor. Defaults to 1120 for the Ascend 310 AI Processor. Defaults to 4096 for the Ascend 610 AI Processor. |
refFrameNum |
Input |
Number of reference frames. Must be in the range of [0, 16]. Not configurable for the Ascend 310 AI Processor in the current version. Not configurable for the Ascend 910 AI Processor in the current version. Defaults to 8 for the Ascend 610 AI Processor. |
outMode |
Input |
Frame output mode.
The options are as follows:
|
bitDepth |
Input |
Video bit depth.
The options are as follows:
Not configurable for the Ascend 310 AI Processor in the current version. Not configurable for the Ascend 910 AI Processor in the current version. |
0 on success; else, failure.