[FFmpeg-devel] [PATCH v2 3/3] avcodec/cuvid: introduce a ringbuffer to reattach additional data

Clément Péron peron.clem at gmail.com
Fri Dec 6 15:45:17 EET 2024


Hi Hendrik,

On Tue, 3 Dec 2024 at 19:05, Clément Péron <peron.clem at gmail.com> wrote:
>
> Hi Hendrik,
>
> On Tue, 3 Dec 2024 at 17:47, Devin Heitmueller
> <devin.heitmueller at ltnglobal.com> wrote:
> >
> > On Tue, Dec 3, 2024 at 9:57 AM Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> > > The real question is, why are you using cuviddec instead of nvdec?
> > > side data would already pass through natively with nvdec, and other
> > > hwaccel-based decoders.
>
> I think it's a good question and I will try to benchmark performance
> and latency of the nvdec against cuvid for my use case.
>
> Are you sure that side data would be natively supported with nvdec?
>
> Reading the source code, the only function I saw is
> ff_decode_frame_props(), which will make the side data not properly
> sync for my use case.

I have tested the nvdec and the side_data is properly reattached to
the correct packet!
But Why? I'm not sure to understand where this logic is done in FFmpeg.
Could you point me where this is done?

My test shows that the CUVID H264 decode frame latency is ~103ms with σ 35
CUDA seems much faster; the decode time is less than 10ms.

My GPU is a RTX4070 but I will run this on a prod machine on a L4.

So I will respin this series and drop this patch.
Thanks for your remark!


> >
> > I suspect there could be benefits if your workload involves alot of
> > decoding and the GPU only has a single nvdec unit on it.  Even if it's
> > less efficient to do it with CUDA, getting a graphics card with lots
> > of CUDA units could very well be cheaper than a card with multiple
> > nvdec fixed units on it (each of which might only be able to do 10-15
> > decodes depending on codec/resolution/framerate).
> >
> > Devin
> >
> > --
> > Devin Heitmueller, Senior Software Engineer
> > LTN Global Communications
> > o: +1 (301) 363-1001
> > w: https://ltnglobal.com  e: devin.heitmueller at ltnglobal.com
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list