问题1? gpu 解码 是把内存中AVPacket 拷贝到gp显存中进行处理的吗?
看来是的,代码中通过 av_read_frame(input_ctx, &packet) 读取数据包,其数据操作流向应该是 video file -> memory
问题2? gpu 解码 的 数据流向?
videofile-> avpacket ->decoding frame's in gpu-> transfer rame in gpu into host memory
问题3? gpu 解码数据 cuvid 解码器,也是api,对应的数据操作流向?
videofile-> avpacket ->decoding frame's in gpu-> transfer rame in gpu into host memory
VDPAU 简介
Developed by NVIDIA for Unix/Linux systems. To enable this you typically need the libvdpau development package in your distribution, and a compatible graphics card.
Note that VDPAU cannot be used to decode frames in memory, the compressed frames are sent by libavcodec to the GPU device supported by VDPAU and then the decoded image can be accessed using the VDPAU API. This is not done automatically by FFmpeg, but must be done at the application level (check for example the ffmpeg_vdpau.c file used by ffmpeg.c). Also, note that with this API it is not possible to move the decoded frame back to RAM, for example in case you need to encode again the decoded frame (e.g. when doing transcoding on a server).
Several decoders are currently supported through VDPAU in libavcodec, in particular H.264, MPEG-1/2/4, and VC-1.
翻译:
由NVIDIA开发的Unix / Linux系统。 要启用此功能,您通常需要分发中的libvdpau开发包和兼容的图形卡。
注意,VDPAU不能用于解码内存中的帧,压缩帧由libavcodec发送到VDPAU支持的GPU设备,然后可以使用VDPAU API访问解码图像。
这不是由FFmpeg自动完成的,但必须在应用