<div dir="auto"><div>Hi Patrik,<br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Le mer. 26 févr. 2025, 06 h 30, Pratik Pachange (QUIC) via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="m_-8756859038899525037WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi Team,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">For AV1 codec format, there are certain no-show frames (show_frame flag set to 0) given by the video driver/fw as decoded output which needs to dropped/discarded by the client.<br>
On v4l2 side, the only way to identify such buffers is that their bytesused is 0 (or filledlen is 0).</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The only AV1 decoder we have in upstream GStreamer is the stateless decoder, which does not have this issue. I know some HW vendor added AV1 in downstream kernel, without ever upstreaming it and getting their design reviewed. This obviously lead to mistakes like this.</div><div dir="auto"><br></div><div dir="auto">That being said, I'm not against fixing it with your suggestions. Though some more thought needs to placed into that since that clashes with the legacy way to signal EOS, and we also need to make sure it aligns with the rest of V4L specific mainline.</div><div dir="auto"><br></div><div dir="auto">An alternative is to define V4L2 AV1 as TU aligned. Then multiple frame gets submitted to the decoder, and only one is to be produced. The downside is that bitstream buffer size estimation will fall appart, since we have no idea how many frames a bitstream (OUTPUT queue buffer) may endup.</div><div dir="auto"><br></div><div dir="auto">Since this is a well know problem surface, we could also consider adding signalling in the av1parse element.</div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="m_-8756859038899525037WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><br>
Currently in v4l2 plugins, there is no handling to drop such buffers. <br>
Can we plan to add any handling to drop/discard empty buffers (bytesused 0).</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">We do have some code to drop very old GstVideoFrame objects, but it takes quite some time. It was added to workaround similar issues when with interlaced video (H.264) mostly. Assuming it works with H.264 interlaced, and does not go against the spec, I'll be happy to review and merge your patches. Use the following to see the contribution manual.</div><div dir="auto"><br></div><div dir="auto"><a href="https://gstreamer.freedesktop.org/documentation/contribute/index.html">https://gstreamer.freedesktop.org/documentation/contribute/index.html</a></div><div dir="auto"><br></div><div dir="auto">Nicolas</div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="m_-8756859038899525037WordSection1"><p class="MsoNormal">
<u></u><u></u></p>
</div>
</div>

</blockquote></div></div></div>