summaryrefslogtreecommitdiffstats
path: root/tests/ref/fate/filter-delogo
Commit message (Collapse)AuthorAgeFilesLines
* avformat/framecrc: enable new outputJames Almer2016-04-131-0/+4
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_delogo: round to the closest valueJean Delvare2015-12-091-109/+109
| | | | | | | | | | | | | When the interpolated value is divided by the sum of weights, no rounding is done, which means the value is truncated. This results in a slight bias towards dark green in the interpolated area. Rounding properly removes the bias. I measured this change to reduce the interpolation error by 1 to 2 % on average on a number of sample input and logo area combinations. Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests: update fate-filter-delogo test reference after commit ↵Stefano Sabatini2015-10-081-109/+109
| | | | 8bc708fcee137ead6d0773fad8e24ab471ab2122
* lavfi/delogo: avoid propagation of rounding errors in chroma planesJean Delvare2013-07-031-109/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | When operating on subsampled chroma planes, some rounding is taking place. The left and top borders are rounded down while the width and height are rounded up, so all rounding is done outward to guarantee the logo area is fully covered. The problem is that the width and height are counted from the unrounded left and top borders, respectively. So if the left or top border position has indeed been rounded down, and the width or height needs no rounding (up), the position of the the right or bottom border will be effectively rounded down, i.e. inward. The issue can easily be seen with a yuv240p input and -vf delogo=45:45:60:40:show=1 -vframes 1 delogo-bug.png (or virtually any logo area with odd x and y and even width and height.) The right and bottom chroma borders (in green) are clearly off. In order to fix this, the width and height must be adjusted to include the bits lost in the rounding of the left and top border positions, respectively, prior to being themselves rounded up. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/delogo: use weighted interpolationJean Delvare2013-07-011-109/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-01-181-82/+82
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: avoid pointless copying of ref lists lavr: always reset mix function names and pointers in mix_function_init() lavr: call mix_function_init() in ff_audio_mix_set_matrix() fate: update ref after rv30_loop_filter fix rv30: fix masking in rv30_loop_filter() Conflicts: tests/ref/fate/filter-delogo tests/ref/fate/rv30 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * fate: update ref after rv30_loop_filter fixLuca Barbato2013-01-171-82/+82
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-291-110/+110
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (35 commits) h264_idct_10bit: port x86 assembly to cpuflags. x86inc: clip num_args to 7 on x86-32. x86inc: sync to latest version from x264. fft: rename "z" to "zc" to prevent name collision. wv: return meaningful error codes. wv: return AVERROR_EOF on EOF, not EIO. mp3dec: forward errors for av_get_packet(). mp3dec: remove a pointless local variable. mp3dec: remove commented out cruft. lavfi: bump minor to mark stabilizing the ABI. FATE: add tests for yadif. FATE: add a test for delogo video filter. FATE: add a test for amix audio filter. audiogen: allow specifying random seed as a commandline parameter. vc1dec: Override invalid macroblock quantizer vc1: avoid reading beyond the last line in vc1_draw_sprites() vc1dec: check that coded slice positions and interlacing match. vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value configure: Move parts that should not be user-selectable to CONFIG_EXTRA lavf: remove commented out cruft in avformat_find_stream_info() ... Conflicts: Makefile configure libavcodec/vc1dec.c libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264dsp_mmx.c libavfilter/version.h libavformat/mp3dec.c libavformat/utils.c libavformat/wv.c libavutil/x86/x86inc.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
* FATE: add a test for delogo video filter.Anton Khirnov2012-07-281-0/+110
OpenPOWER on IntegriCloud