Thanks both. I have implemented the algorithm in this paper https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging
Which basically converts to an L A B (not CIELAB) colorspace, subtracts the average value of the frame from each pixel and converts back. Yes I did put the linearisation /de-linearisation into the filter. Not applying it produces noticeably incorrect results. Is there instead a way to tell the filtergraph that the filter expects and outputs linear data? I can investigate an integer version. On Sun, Aug 15, 2021 at 2:31 PM Paul B Mahol <one...@gmail.com> wrote: > On Sun, Aug 15, 2021 at 3:27 PM Nicolas George <geo...@nsup.org> wrote: > > > Paul Buxton (12021-08-15): > > > I have my filter working nicely but it is a little slow. I have > > > parallelised it where possible, but it is still a bit heavy. I am > > wondering > > > if there are any optimised implementations/approximations of some math > > > functions built in that I should use instead of the standard library > > > implementations. > > > Specifically any of > > > pow() > > > exp() > > > log() > > > > > > I have done a quick grep of the code but can't see any likely > contenders. > > > > I am not aware we have those. The kind of optimization you can do > > depends a lot on your use case. Please give a little details. > > > > If you want to speed your filter up, the best would be to make it work > > with integers. It would also allow to make reliable unit tests. > > > > > If you convert to/from linear light inside filter, that is wrong thing to > do. > > > > > > Regards, > > > > -- > > Nicolas George > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".