From: Michael Diesel <not.michael.diesel@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: r.arzumanyan@visionlabs.ai, timo@rothenpieler.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/cuviddec: update amount of decoder surfaces from within sequence decode callback
Date: Wed, 9 Aug 2023 00:55:09 +0300
Message-ID: <9d6b8529-2623-4a8c-a5d1-6f72f709b37f@gmail.com> (raw)
In-Reply-To: <4b2e5f71-f8b0-8abf-d3bc-daea4fbe3134@rothenpieler.org>
Hello ,
after this patch I get stutter in the output video when using h264_cuvid
as decoder
With "surfaces" as -1 will result :
CUVIDPARSERPARAMS::ulMaxNumDecodeSurfaces = 5 =
CUVID_DEFAULT_NUM_SURFACES
CUVIDDECODECREATEINFO::ulNumDecodeSurfaces = 8 =
format->min_num_decode_surfaces + 3
As per NVDEC Video Decoder API Programming Guide / Creating a parser ,
the two values should be equal.
cuvid_handle_video_sequence/pfnSequenceCallback should return a value :
">1: succeeded, and driver should override
CUVIDPARSERPARAMS::ulMaxNumDecodeSurfaces with this return value"
Something like:
if(ctx->cuparseinfo.ulMaxNumDecodeSurfaces !=
cuinfo.ulNumDecodeSurfaces)
return cuinfo.ulNumDecodeSurfaces;
else
return 1;
This solves partially the problem , there's still occasional stutter , a
value of 8 is not sufficient.
On my test system 12 is the magic number.
Timo Rothenpieler wrote:
> applied with minor amendments.
>
> Turned the if-statements around, we don't do them that way around in
> ffmpeg code.
> And switched the surfaces option to have a default of -1, to not rely on
> a magic value of 25. That could surprise users who happen to request 25
> surfaces.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2023-08-08 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJZRZVnbFVOQaUuvA=F7qUmr+P_wfrjJnga2cq=tdNtm4Ky0sQ@mail.gmail.com>
2023-06-05 7:30 ` Roman Arzumanyan
2023-06-05 10:19 ` Anton Khirnov
2023-06-05 12:29 ` Roman Arzumanyan
2023-06-06 13:35 ` Timo Rothenpieler
2023-08-08 21:55 ` Michael Diesel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d6b8529-2623-4a8c-a5d1-6f72f709b37f@gmail.com \
--to=not.michael.diesel@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=r.arzumanyan@visionlabs.ai \
--cc=timo@rothenpieler.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git