Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
The complex vertical low-pass filter slightly over-sharpens the picture. This becomes visible when several transcodings are cascaded and the error potentises, e.g. some generations of HD->SD SD->HD.
To prevent this behaviour the destination pixel must not exceed the source pixel when the average of the pixels above and below is less than the source pixel. And the other way around.
Tested and approved in a visual transcoding cascade test by video professionals.
SSIM/PSNR test with the first generation of an HD->SD file as a reference against the 6th generation(3 x SD->HD HD->SD):
Results without the patch:
SSIM Y:0.956508 (13.615881) U:0.991601 (20.757750) V:0.993004 (21.551382) All:0.974405 (15.918463)
PSNR y:31.838009 u:48.424280 v:48.962711 average:34.759466 min:31.699297 max:40.857847
Results with the patch:
SSIM Y:0.970051 (15.236232) U:0.991883 (20.905857) V:0.993174 (21.658049) All:0.981290 (17.279202)
PSNR y:34.412108 u:48.504454 v:48.969496 average:37.264644 min:34.310637 max:42.373392
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This complex (-1 2 6 2 -1) filter slightly less reduces interlace 'twitter' but better retain detail and subjective sharpness impression compared to the linear (1 2 1) filter.
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Libav, for some reason, merged this as a public API function. This will
aid in future merges.
A define is left for backwards compat, just in case some person
used it, since it is in a public header.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '4438c256387a5845e5cdc5c14c43f4047b68301b':
vf_interlace: remove the warning tag in the message
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '696141e898193311c994b399a8dc60713709092f':
vf_interlace: use image width rather than linesize
Conflicts:
libavfilter/vf_interlace.c
See: f043965cd5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76':
vf_interlace: do not process an already interlaced frame
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
vf_interlace: better handling of odd video size
Conflicts:
libavfilter/vf_interlace.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This should fix several issues with odd dimensions inputs.
lut, vflip, pad and crop video filters also need to be checked for such
issues. It's possible sws is also affected.
* qatar/master:
FATE: add a test for the interlace filter
lavfi: new interlace filter
Conflicts:
Changelog
configure
doc/filters.texi
libavfilter/Makefile
libavfilter/allfilters.c
tests/fate/filter.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>