Page 1 of 1

.cube lut problem

Posted: Fri Apr 19, 2019 12:34 pm
by aganzerli
hi!
I'm using ffmpeg to convert dpx/exr files to mp4 files.
It seems there's a problem with how ffmpeg compute transformed color values when using .cube lut files, when MAX_DOMAIN is not equal to 1 in the lut file.
In the .cube file specs, MIN_DOMAIN and MAX_DOMAIN refer to input bounds, but it seems that ffmpeg treats them as output bounds.
For example when MAX_DOMAIN = 4, ffmpeg should remap input value in the range [0, 4] to [0, 1] and then perform its lookup, but for now it seems that input value are left unchanged, and output values are remapped to [0, 4], resulting in a super-bright image.
Can anyone help ?
thanks!

Re: .cube lut problem

Posted: Sat Apr 20, 2019 8:59 am
by richardpl
Could you upload your .cube file somewhere?

Re: .cube lut problem

Posted: Mon Apr 22, 2019 5:22 am
by aganzerli
hi!
the file is available here:
https://ufile.io/6zqwtvsq

thanks!

Re: .cube lut problem

Posted: Sun Apr 28, 2019 9:13 am
by richardpl
Should be fixed.

Re: .cube lut problem

Posted: Mon Apr 29, 2019 10:41 am
by aganzerli
Hello again and thanks for your quick response !
I've tried with the latest nightly, input is now scaled correctly, but seems clamped at some point..
I've uploaded an ACES exr file, a lut, a reference (what it should look like), and ffmpeg current output so that you can see and test yourself.

You can find everything here : https://ufile.io/z4ju36hp

thanks!

Re: .cube lut problem

Posted: Mon Apr 29, 2019 6:21 pm
by richardpl
This is both EXR decoder (which does not decode to float) and lut3d filter (which does not work with floats) problem, and is caused by whites/blacks being out of [0 - 1] range.

Re: .cube lut problem

Posted: Thu May 02, 2019 10:31 am
by aganzerli
oh ok I understand, so is there a way to pass a "scale" value to the decoder (let's say 0.25) so that exr/dpx/etc files in the range [0, 4] would be scaled to [0, 1] at decode time ?