NVDEC硬解码API导读
NVDECODEAPI解码流程:
- Create a CUDA context.
创建CUDA上下文
static void createCudaContext(CUcontext* cuContext, int iGpu, unsigned int flags) - Query the decode capabilities of the hardware decoder.
查询硬解码器 - Create the decoder instance(s).
创建解码器实例 - De-Mux the content (like .mp4). This can be done using third party software like FFMPEG.
解封装。可以使用FFMPEG等第三方软件解封装 - Parse the video bitstream using third party parser like FFMPEG.
解析视频流。可以使用FFMPEG等第三方软件解析 - Kick off the Decoding using NVDECODE API.
调用NVIDIA API 解码 - Obtain the decoded YUV for further processing.
获取解码后的YUV进行进一步处理 - Query the status of the decoded frame.
查询解码帧的状态 - Depending on the decoding status, use the decoded output for further processing like rendering, inferencing, postprocessing etc.
根据解码状态进行渲染、后处理等 - If the application needs to display the output