On 7/12/18, Stephen Seo <seo.dispar...@gmail.com> wrote:
> Lensfun is a library that applies lens correction to an image using a
> database of cameras/lenses (you provide the camera and lens models, and
> it uses the corresponding database entry's parameters to apply lens
> correction). It is licensed under LGPL3.
> The lensfun filter utilizes the lensfun library to apply lens correction
> to videos as well as images.
> This filter was created out of necessity since I wanted to apply lens
> correction to a video and the lenscorrection filter did not work for me.
> While this filter requires little info from the user to apply lens
> correction, the flaw is that lensfun is intended to be used on indvidual
> images. When used on a video, the parameters such as focal length is
> constant, so lens correction may fail on videos where the camera's focal
> length changes (zooming in or out via zoom lens). To use this filter
> correctly on videos where such parameters change, timeline editing may
> be used since this filter supports it.
> Note that valgrind shows a small memory leak which is not from this
> filter but from the lensfun library (memory is allocated when loading
> the lensfun database but it somehow isn't deallocated even during
> cleanup; it is briefly created in the init function of the filter, and
> destroyed before the init function returns). This may have been fixed by
> the latest commit in the lensfun repository; the current latest release
> of lensfun is almost 3 years ago.
> Bi-Linear interpolation is used by default as lanczos interpolation
> shows more artifacts in the corrected image in my tests.
> The lanczos interpolation is derived from lenstool's implementation of
> lanczos interpolation. Lenstool is an app within the lensfun repository
> which is licensed under GPL3.
> v2 of this patch fixes license notice in libavfilter/vf_lensfun.c
> Signed-off-by: Stephen Seo <seo.dispar...@gmail.com>
> configure | 5 +
> doc/filters.texi | 103 +++++++
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_lensfun.c | 605 +++++++++++++++++++++++++++++++++++++++
> 5 files changed, 715 insertions(+)
> create mode 100644 libavfilter/vf_lensfun.c
Missing dependency on GPL3 and code style does not follow other
ffmpeg-devel mailing list