• Stephen Seo's avatar
    Add lensfun filter · 0ea20124
    Stephen Seo authored
    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
    
    v3 of this patch fixes code style and dependency to gplv3 (thanks to
    Paul B Mahol for pointing out the mentioned issues).
    
    v4 of this patch fixes more code style issues that were missed in
    v3.
    
    v5 of this patch adds line breaks to some of the documentation in
    doc/filters.texi (thanks to Gyan Doshi for pointing out the issue).
    
    v6 of this patch fixes more problems (thanks to Moritz Barsnick for
    pointing them out).
    
    v7 of this patch fixes use of sqrt() (changed to sqrtf(); thanks to
    Moritz Barsnick for pointing this out). Also should be rebased off of
    latest master branch commits at this point.
    Signed-off-by: 's avatarStephen Seo <seo.disparate@gmail.com>
    0ea20124
Name
Last commit
Last update
..
doxy Loading commit data...
examples Loading commit data...
.gitignore Loading commit data...
APIchanges Loading commit data...
Doxyfile Loading commit data...
Makefile Loading commit data...
authors.texi Loading commit data...
bitstream_filters.texi Loading commit data...
bootstrap.min.css Loading commit data...
build_system.txt Loading commit data...
codecs.texi Loading commit data...
decoders.texi Loading commit data...
default.css Loading commit data...
demuxers.texi Loading commit data...
developer.texi Loading commit data...
devices.texi Loading commit data...
doxy-wrapper.sh Loading commit data...
encoders.texi Loading commit data...
errno.txt Loading commit data...
faq.texi Loading commit data...
fate.texi Loading commit data...
fate_config.sh.template Loading commit data...
ffmpeg-bitstream-filters.texi Loading commit data...
ffmpeg-codecs.texi Loading commit data...
ffmpeg-devices.texi Loading commit data...
ffmpeg-filters.texi Loading commit data...
ffmpeg-formats.texi Loading commit data...
ffmpeg-protocols.texi Loading commit data...
ffmpeg-resampler.texi Loading commit data...
ffmpeg-scaler.texi Loading commit data...
ffmpeg-utils.texi Loading commit data...
ffmpeg.texi Loading commit data...
ffmpeg.txt Loading commit data...
ffplay.texi Loading commit data...
ffprobe.texi Loading commit data...
ffprobe.xsd Loading commit data...
fftools-common-opts.texi Loading commit data...
filter_design.txt Loading commit data...
filters.texi Loading commit data...
formats.texi Loading commit data...
general.texi Loading commit data...
git-howto.texi Loading commit data...
indevs.texi Loading commit data...
issue_tracker.txt Loading commit data...
lexicon Loading commit data...
libav-merge.txt Loading commit data...
libavcodec.texi Loading commit data...
libavdevice.texi Loading commit data...
libavfilter.texi Loading commit data...
libavformat.texi Loading commit data...
libavutil.texi Loading commit data...
libswresample.texi Loading commit data...
libswscale.texi Loading commit data...
mailing-list-faq.texi Loading commit data...
metadata.texi Loading commit data...
mips.txt Loading commit data...
multithreading.txt Loading commit data...
muxers.texi Loading commit data...
nut.texi Loading commit data...
optimization.txt Loading commit data...
outdevs.texi Loading commit data...
patchwork Loading commit data...
platform.texi Loading commit data...
print_options.c Loading commit data...
protocols.texi Loading commit data...
rate_distortion.txt Loading commit data...
resampler.texi Loading commit data...
scaler.texi Loading commit data...
snow.txt Loading commit data...
style.min.css Loading commit data...
swresample.txt Loading commit data...
swscale.txt Loading commit data...
t2h.init Loading commit data...
t2h.pm Loading commit data...
tablegen.txt Loading commit data...
texi2pod.pl Loading commit data...
texidep.pl Loading commit data...
undefined.txt Loading commit data...
utils.texi Loading commit data...
writing_filters.txt Loading commit data...