<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, May 8, 2025 at 5:39 AM Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com">randrianasulu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I am trying to find out why our (cinelerra-gg) ffmpeg integration refuses to load filtergraph < and crashes and burns! > if I set hw decoding to any value (it works for sw decoding).<div dir="auto"><br></div><div dir="auto">So far I found this example (not accepted) on ffmpeg-devel, but I am still not sure how to apply ot for our case (we use av_buffersink_get_frame() )</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><a href="https://ffmpeg.org/pipermail/ffmpeg-devel/2018-August/233555.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://ffmpeg.org/pipermail/ffmpeg-devel/2018-August/233555.html</a></div><div dir="auto"><br></div><div dir="auto">In general, I hope to get hw decoding (now via vulkan ) + libplacebo doing tonemapping purely on GPU *before* frames ingested into cingg for further (mostly software/host) manipulation, display and encode.</div><div dir="auto"><br></div><div dir="auto">But I guess for this I need to pass around hw_device_context created for decoder for this media/input file? (our filtering options are either global or per-file)</div><div dir="auto"><br></div><div dir="auto"><pre>filter_graph->filters[i]->hw_device_ctx = av_buffer_ref(hw_device_ctx);</pre></div><div dir="auto">Paul, your lavfi-preview does not have hw filters previews yet, or I read sources too diagonally?</div></div></blockquote><div><br></div><div>Personally, I do not use/have hw filtering (even for decoding/encoding) enabled. The max hw that i bothered to work with was opencl and little of vulkan.</div><div><br></div><div>Also I find that enabling hw stuff for filtering within ffmpeg CLI (both OpenCL and Vulkan) is still too complex and cryptic.</div><div><br></div><div>The lavfi-preview build have not support code to enable any hw ctx - even if build of ffmpeg that is used by lavfi-preview have support for it - I never bothered to test or add support for any hw related  stuff.</div></div></div>