From: Kacper Michajlow <kasper93@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v5 1/2] avfilter: add scale_d3d11 filter
Date: Sun, 20 Jul 2025 18:21:04 +0200
Message-ID: <CABPLASSgbGLzLTzzB+yi=vufgzS1oGfca5dHpg32CKcn54a=DA@mail.gmail.com> (raw)
In-Reply-To: <CA+anqdwrcSRMARikFveHYkcB_vVJO_DLBJUmdvXy_dNv13rs9g@mail.gmail.com>
On Sun, 20 Jul 2025 at 11:52, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
> On Sun, Jul 20, 2025 at 11:15 AM Dash Santosh Sathyanarayanan
> <dash.sathyanarayanan@multicorewareinc.com> wrote:
> >
> > Regarding the while loop in hwcontext_d3d11va get_buffer, I understand
> > the concern about introducing an unbounded wait. However, there have been
> > a couple of issues reported in the past that highlight this problem:
> >
> > - https://lists.ffmpeg.org/pipermail/libav-user/2024-March/013469.html
> > -
> https://lists.ffmpeg.org/pipermail/ffmpeg-trac/2023-October/067420.html
> >
> > In both the cases, the error reported was: "static surface pool size
> exceeded".
> > The suggested workaround was to increase extra_hw_frames, but in
> practice,
> > this isn't always feasible. But in practice, for decoder-bound D3D11
> resources,
> > the driver restricts ArraySize to 64, which caps the total surface pool
> size -
> > so increasing extra_hw_frames isn’t always viable.
> >
> > In such scenarios, a short retry loop becomes necessary to maintain
> pipeline
> > flow and avoid premature allocation failures. I instrumented the retry
> logic
> > in one of my test cases - 4K to 1080p AVC transcode using D3D11VA decode
> > and Media Foundation encode - and observed the following behavior:
> >
> > - Most frames succeed with 1-2 retries
> > - Roughly 1 in 100 frames may require up to 10 retries
> >
> > Based on this, I’ve bounded the retry count to 50. This allows enough
> headroom
> > without risking an infinite loop. Please let me know if this works.
> >
>
> You are just piling hacks ontop of hacks. As I have said before, this
> is the wrong layer to solve your specific problem. It will not be
> accepted as part of the hwcontext.
> Move it to a user-layer.
>
>
Wouldn't vaapi_vpp.c and related vf_scale_vaapi.c, vf_deinterlace_vaapi.c
be good examples of how to integrate this? Also scale may be a good
starting point, but d3d11 video processor supports way more, so it should
be modular to make it possible to add more filters, like deinterlace,
tonemapping, motion interpolation and whatever is supported these days in
d3d11 VP.
- Kacper
_______________________________________________
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:[~2025-07-20 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 9:15 Dash Santosh Sathyanarayanan
2025-07-20 9:52 ` Hendrik Leppkes
2025-07-20 16:21 ` Kacper Michajlow [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='CABPLASSgbGLzLTzzB+yi=vufgzS1oGfca5dHpg32CKcn54a=DA@mail.gmail.com' \
--to=kasper93@gmail.com \
--cc=ffmpeg-devel@ffmpeg.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