1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
FFmpeg/tests
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
..
fate fate: Add Canopus Lossless YUY2 test 2013-06-25 11:26:23 +02:00
filtergraphs fate/filter: test gradfun timeline. 2013-05-12 13:07:47 +02:00
ref lavfi/delogo: use weighted interpolation 2013-07-01 09:33:33 +02:00
audiogen.c
base64.c
copycooker.sh
fate-run.sh Merge commit 'bd392785a75d7d51414a9788d50396a8d9f29d77' 2013-05-08 14:21:39 +02:00
fate-update.sh
fate-valgrind.supp
fate.sh Merge remote-tracking branch 'qatar/master' 2013-05-29 11:19:25 +02:00
ffserver-regression.sh
ffserver.conf
ffserver.regression.ref
lavf-regression.sh tests/lavf-regression: fix gbrp10 dpx test on big endian 2013-05-13 10:09:03 +00:00
lena.pnm
Makefile Merge commit '2d2d6a4883479403798f4ed46941d5b365823570' 2013-05-29 10:40:42 +02:00
md5.sh
regression-funcs.sh
rotozoom.c
test.ffmeta
tiny_psnr.c
tiny_ssim.c tests/tiny_ssim: include the 2 macros instead of a header 2013-03-27 01:38:18 +01:00
utils.c
videogen.c