Wanted to post/begin a thread sharing my progress on building a cuda based ffmpeg filter designed to enable tonemaping of HDR content to an HDR colour space. It’s part of a personal project to build a distributed compute cluster for handling load balancing and serving of multimedia to different clients, all in as efficient a package as possible.
the procedure for testing this is at the bottom, but essentially I’ve modified the ffmpeg vf_overlay_cuda.cu kernel.
it’s very much a bodge and proof of concept, but should work. As of now it’s performing reinhard tonemapping (pixel = pxiel* (pixel/(pixel+1)))
This should be adjustable to suit any global curve algorithm extremely easily (hable, clip etc.)
I havent gotten my nano in (waiting to see if I can get a TX2 edu discount since it should be more powerful per dollar and student budget…)
for those interested in the overall project, the repo is here: https://github.com/Camofelix/Jetson_ffmpeg_trancode_cluster
syntax will be: ffmpeg -i INPUT -i INPUT -filter_complex 'hwupload_cuda,overlay_cuda' OUTPUT This is a bodge for now, since it's only modifying the output of the cuda kernel itself to use it, replace ffmpeg/libavfilter/vf_overlay_cuda.cu with this file: https://github.com/Camofelix/Jetson_ffmpeg_trancode_cluster/blob/master/cuda_filter/vf_overlay_cuda.cu It compiles fine, but can't test without a nano for actual usage. will require to self build: git init git fetch https://github.com/FFmpeg/FFmpeg.git cd ffmpeg && make clean ./configure --enable-nonfree --enable-cuda mv ~/path/to/this_version_of/vf_overlay_cuda.cu ~/path/to/ffmpeg/libavfilter/vf_overlay_cuda.cu make -j //get coffee ffmpeg -i INPUT -i INPUT -filter_complex 'hwupload_cuda,overlay_cuda' OUTPUT ffplay output is output different? test file: https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/