Commit Graph

16 Commits

Author SHA1 Message Date
Martin Vignali b94cd55155 avfilter/x86/vf_interlace : add AVX2 version 2018-01-11 21:03:19 +01:00
James Almer 8e0e4384b0 Revert "avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16"
This reverts commits 1a5865b6dc and
8fb1d63d91.

They made fate interlace tests fail when AVX2 was used.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-19 19:04:25 -03:00
Martin Vignali 1a5865b6dc avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16 2017-12-19 20:59:54 +01:00
Martin Vignali 3c6dc27035 avfilter/x86/vf_interlace : avfilter/x86/vf_interlace : fix crash when using unaligned data in low_pass complex
related to ticket 6491
2017-12-15 11:28:29 +01:00
Martin Vignali 49dced9fd0 avfilter/x86/vf_interlace : avoid crash when data are unaligned
ticket 6491
2017-12-15 11:28:25 +01:00
Thomas Mundt 40bfaa190c avfilter/interlace: add support for 10 and 12 bit
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-23 16:19:58 -03:00
Thomas Mundt a7f6bfdc18 avfilter/interlace: prevent over-sharpening with the complex low-pass filter
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>
2017-09-15 22:40:21 +02:00
Thomas Mundt 2da5bf4c2f avfilter/interlace: add complex vertical low-pass filter
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>
2017-05-02 14:09:50 -03:00
Thomas Mundt 207e6debf8 avfilter/interlace: change lowpass_line function prototype
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-22 20:12:15 +02:00
James Almer d9e10af547 x86/vf_interlace: add missing colon to labels
Silences warnings with Nasm

Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-26 02:50:50 -03:00
Michael Niedermayer ca59b5b6ec avfilter/x86/vf_interlace: remove redundant instructions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:37:19 +01:00
Michael Niedermayer 3fe3c8abb1 Merge commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b'
* commit 'ca5c3ff90972a5c97aabda2ace57ba72dcd7d83b':
  vf_interlace: x86: improve asm performance

Conflicts:
	libavfilter/x86/vf_interlace.asm

See: 05e4b25e9b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:31:45 +01:00
Michael Niedermayer ca5c3ff909 vf_interlace: x86: improve asm performance
4775 decicycles -> 3688 decicycles
2014-11-25 02:00:06 +00:00
Michael Niedermayer 05e4b25e9b avfilter/x86/vf_interlace: rewrite asm
4775 decicycles -> 3688 decicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 04:09:03 +01:00
Michael Niedermayer 6f373d75e8 Merge commit '2e1704059ae8625beda2ffde847ad22c5ba416dc'
* commit '2e1704059ae8625beda2ffde847ad22c5ba416dc':
  vf_interlace: Add SIMD for lowpass filter

Conflicts:
	libavfilter/vf_interlace.c
	libavfilter/x86/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 02:39:49 +01:00
Kieran Kunhya 2e1704059a vf_interlace: Add SIMD for lowpass filter
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-11-15 00:35:31 +01:00