[FFmpeg-devel] have some major changes for nvenc support
nfxjfg at googlemail.com
Thu Nov 5 11:31:41 CET 2015
On Thu, 5 Nov 2015 16:23:04 +0800
Agatha Hu <ahu at nvidia.com> wrote:
> 2) We use AVFrame::opaque field to store a customized ffnvinfo struture
> to prevent expensive CPU<->GPU transferration. Without it, the workflow
> will be like CPU AVFrame input-->copy to GPU-->do CUDA resizing-->copy
> to CPU AVFrame-->copy to GPU-->NVENC encoding. And now it becomes:
> CPU AVFrame input-->copy to GPU-->do CUDA resizing-->NVENC encoding.
> Our strategy is to check whether AVFrame::opaque is not null AND its
> first 128 bytes matches some particular GUID. If so, AVFrame::opaque is
> a valid ffnvinfo struture and we read GPU address directly from it
> instead of copying data from AVFrame.
Please no, not another hack that makes the hw decoding API situation
worse. Do this properly and coordinate with Gwenole Beauchesne, who
plans improvements into this direction.
More information about the ffmpeg-devel