No description
Find a file
Jean Delvare 16fd75ceec lavfi/delogo: use weighted interpolation
The original delogo algorithm interpolates both horizontally and
vertically and uses the average to compute the resulting sample. This
works reasonably well when the logo area is almost square. However
when the logo area is significantly larger than high or higher than
large, the result is largely suboptimal.

The issue can be clearly seen by testing the delogo filter with a fake
logo area that is 200 pixels large and 2 pixels high. Vertical
interpolation gives a very good result in that case, horizontal
interpolation gives a very bad result, and the overall result is poor,
because both are given the same weight.

Even when the logo is roughly square, the current algorithm gives poor
results on the borders of the logo area, because it always gives
horizontal and vertical interpolations an equal weight, and this is
suboptimal on borders. For example, in the middle of the left hand
side border of the logo, you want to trust the left known point much
more than the right known point (which the current algorithm already
does) but also much more than the top and bottom known points (which
the current algorithm doesn't do.)

By properly weighting each known point when computing the value of
each interpolated pixel, the visual result is much better, especially
on borders and/or for high or large logo areas.

The algorithm I implemented guarantees that the weight of each of the
4 known points directly depends on its distance to the interpolated
point. It is largely inspired from the original algorithm, the key
difference being that it computes the relative weights globally
instead of separating the vertical and horizontal interpolations and
combining them afterward.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-07-01 09:33:33 +02:00
compat os2threads: move from lavc to compat/ 2013-05-28 12:49:20 +02:00
doc update all trac links to use the trac subdomain 2013-06-29 19:27:49 +02:00
libavcodec Avoid a null pointer dereference in avcodec_decode_audio4(). 2013-07-01 03:07:44 +02:00
libavdevice avdevice/x11grab: allocate just one Cursor 2013-06-21 12:00:11 +02:00
libavfilter lavfi/delogo: use weighted interpolation 2013-07-01 09:33:33 +02:00
libavformat Merge remote-tracking branch 'cehoyos/master' 2013-06-30 21:18:17 +02:00
libavresample Merge commit '006ec64877' 2013-05-18 11:25:58 +02:00
libavutil Revert "avutil/x86: disable ff_evaluate_lls_sse2() for 32bit" 2013-07-01 02:27:47 +02:00
libpostproc postprocess_template: put rsp on the clobber list to prevent gcc from using it in "q" 2013-06-16 18:21:39 +02:00
libswresample cosmetics: Fix "dont" "wont" "doesnt" typos 2013-06-29 02:31:16 +02:00
libswscale swscale: Fix PAL8 input with alpha 2013-06-26 15:14:00 +02:00
presets presets: specify the codecs. 2012-05-04 18:40:36 +02:00
tests lavfi/delogo: use weighted interpolation 2013-07-01 09:33:33 +02:00
tools tools/qt-faststart: Fix unintended sign extension of current_offset 2013-06-02 23:10:44 +02:00
.gitignore Rename ffadler to ffhash and expand it using the generic hash API 2013-05-16 17:58:56 +02:00
arch.mak Merge commit 'b326755989' 2012-12-08 14:24:16 +01:00
Changelog lavfi: add spp filter. 2013-06-14 01:27:22 +02:00
cmdutils.c cmdutils: dont change the log level for -report 2013-06-24 02:59:05 +02:00
cmdutils.h Merge commit 'e19e8aeeaa' 2013-04-12 15:56:20 +02:00
cmdutils_common_opts.h cmdutils_common_opts: fix indention of #if 2013-04-11 16:07:46 +02:00
common.mak Merge commit '472391b9a7' 2013-03-28 12:12:38 +01:00
configure Support compilation on aix with gcc. 2013-06-30 13:47:45 +02:00
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1 cosmetics: Delete empty lines at end of file. 2012-02-09 12:26:45 +01:00
COPYING.LGPLv3
CREDITS CREDITS: redirect to Git log, remove current outdated content 2013-01-31 18:02:52 +01:00
ffmpeg.c ffmpeg: Don't include colorspace.h 2013-06-29 16:44:12 -04:00
ffmpeg.h ffmpeg: add -apad option which injects a apad filter only in the presence of video streams 2013-05-08 23:55:06 +02:00
ffmpeg_filter.c Merge commit '72fbc9685c' 2013-05-10 22:51:04 +02:00
ffmpeg_opt.c ffmpeg: add -apad option which injects a apad filter only in the presence of video streams 2013-05-08 23:55:06 +02:00
ffplay.c ffplay: always send zero packets to flush audio decoders 2013-07-01 00:24:03 +02:00
ffprobe.c ffprobe: always exit 1 in case of errors 2013-06-27 00:20:36 +02:00
ffserver.c ffserver: fix null pointer dereference 2013-06-04 13:19:27 +02:00
INSTALL
library.mak Merge commit '472391b9a7' 2013-03-28 12:12:38 +01:00
LICENSE lavfi: add spp filter. 2013-06-14 01:27:22 +02:00
MAINTAINERS Add maintainer for WebVTT demuxer and muxer 2013-06-18 18:02:30 +02:00
Makefile Merge commit '90f9a5830b' 2013-05-24 13:01:41 +02:00
README README: be a tiny bit more verbose 2012-04-06 10:23:26 +02:00
RELEASE RELEASE: 1.1.git for master 2013-01-06 21:42:35 +01:00
version.sh

FFmpeg README
-------------

1) Documentation
----------------

* Read the documentation in the doc/ directory in git.
  You can also view it online at http://ffmpeg.org/documentation.html

2) Licensing
------------

* See the LICENSE file.

3) Build and Install
--------------------

* See the INSTALL file.