[FFmpeg-devel] rectification filter

Daniel Oberhoff danieloberhoff at gmail.com
Tue Jul 29 00:31:48 CEST 2014


In the last days I effectively rewrote the rectification filter found in the frei0r suite as a libavfilter video filter and would like to submit this to ffmpeg. It probably needs some cleanup, which I will do by checking your commit guidelines, but I would like to get a first opinion also if this would actually be accepted.

The basis as to how to structure it as a vfilter was taken from the vf_rotate filter, especially also the slice parallelization.

The use case, as with the original from frei0r, is to correct for lens distortion with a fast algorithm. 

it can use various levels of vector intrinsics and in this patch is configured to use the 128bit sse vectors, but can be easily configured to use scalars instead. Using sse makes it significantly faster, though it may be that this is mainly due to loop unrolling. Of course in the end I would make the choice of intrinsics based on the ffmpeg configure script.

Another functional aspect I need to review is which formats work or could be made to work. I want to restrict formats to planar 8bit format, as this makes the fitler simpler and faster.

Obviously by now this filter is made with speed in mind, as in my use case it will be only one of many components going on in real time.

Looking forward to feedback.


the patch is based on ffmpeg master as I write, base hash: 63c0b41904bc6e603b61b7f11520db85a3e44113

More information about the ffmpeg-devel mailing list