On 2/22/19, Clement Poulain <c...@dupevfx.com> wrote: > Hey guys, > > I am working with an exr image sequence (colorspace: linear) > I have a lut file to go from AlexaV3LogC to rec709.
Could use lut1d filter, if you have .cube 1D LUT file. > Obviously to do the encoding i need to change the colorspace first. > I can't use apply_trc flag as AlexaV3LogC is different from ffmpeg logC > colorspace. > > To counter that in Nuke i used a Expression node with this value in every > channels (channel r example): > *r>0.0106232?(log10((r + 0.00937677) / 0.18)*0.2471896) + > 0.385537:(((r+0.00937677) / 0.18) + 0.04378604) * 0.9661776* > > Which is the same than using a OCIOColorSpace node with in=linear and > out=AlexaV3LogC > > As i want to do that with ffmpeg, i updated those expressions with ffmpeg > convention: > *"lutrgb=r='if(gt(val, 0.0106232), log((val + 0.00937677) / > 0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) + > 0.04378604) * 0.9661776)':g='if(gt(val, 0.0106232), log((val + 0.00937677) > / 0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) + > 0.04378604) * 0.9661776)':b='if(gt(val, 0.0106232), log((val + 0.00937677) > / 0.18)/log(10)*0.2471896 + 0.385537, (((val + 0.00937677) / 0.18) + > 0.04378604) * 0.9661776)'"* > > Theoretically, and double checked in a python shell: > for a val=0.2 val will be 0.40.. > for a val=0.01 val will be 0.14.. > > But it seems that I can't use the log(x) function in lutrgb. > I get black frames with no data: every pixel [0,0,0] > > By removing all log(x) functions, obviously the values are wrong, but I can > see my images.. > And I don't have any error message. > > Did someone already use log(x) function in lutrgb? > Is there a clever way to do it? Pixel values are in range 0-255 not 0-1. At least only integer pixels are supported by lutrgb filter. > Any help is welcome. > > Thank you. > Clement > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".