[FFmpeg-devel] Howto utilize GPU acceleration outside expected places?
Anton Khirnov
anton at khirnov.net
Thu Oct 10 13:35:47 EEST 2024
Quoting martin schitter (2024-10-10 10:50:45)
>
>
> On 10.10.24 08:06, Lynne via ffmpeg-devel wrote:
> > You can copy libavutil/vulkan* into whatever project you want, and
> > change 4 #include lines to make it compile.
> > This lets you use the same API to construct and execute shaders as you
> > would within lavc/lavfi/lavu into your own project. You will need to
> > make libavutil a dependency as hwcontext_vulkan.c cannot be exported and
> > must remain within libavutil.
>
> Thanks for this description and the link. It's very interesting but not
> exactly the kind of utilization I'm looking for.
>
> I don't want to use the ffmpeg vulkan utils in another application, as
> demonstrated in your example. I just want to use it within ffmpeg
> itself, but slightly different as in all places which I saw until now.
>
> To bring it to the point:
>
> I would like to accelerate this trivial 10 and 12bit decoding of
> bit-packed-scanlines in my DNxUncompressed implementation using compute
> shaders, whenever the required hardware support is available resp. was
> enabled on startup and fallback to CPU processing otherwise.
I have to wonder if it would actually help, given the overhead of
copying the data to the GPU and back. Wouldn't it be more useful to
write normal SIMD?
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list