Martin Vignali
3a230ce5fa
avfilter/x86/vf_blend : avfilter/x86/vf_blend : add AVX2 version for each func except divide
...
and optimize average, grainextract, multiply, screen, grain merge
7 years ago
Marton Balint
4d95c6d5d7
avfilter/vf_framerate: add SIMD functions for frame blending
...
Blend function speedups on x86_64 Core i5 4460:
ffmpeg -f lavfi -i allyuv -vf framerate=60:threads=1 -f null none
C: 447548411 decicycles in Blend, 2048 runs, 0 skips
SSSE3: 130020087 decicycles in Blend, 2048 runs, 0 skips
AVX2: 128508221 decicycles in Blend, 2048 runs, 0 skips
ffmpeg -f lavfi -i allyuv -vf format=yuv420p12,framerate=60:threads=1 -f null none
C: 228932745 decicycles in Blend, 2048 runs, 0 skips
SSE4: 123357781 decicycles in Blend, 2048 runs, 0 skips
AVX2: 121215353 decicycles in Blend, 2048 runs, 0 skips
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago
Martin Vignali
b94cd55155
avfilter/x86/vf_interlace : add AVX2 version
7 years ago
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>
7 years ago
Martin Vignali
3df6e61dad
avfilter/x86/vf_hflip : indent
...
based on patch by Paul B Mahol
7 years ago
Martin Vignali
f181648176
avfilter/x86/vf_hflip : add avx2 version for hflip_byte and hflip_short
7 years ago
Martin Vignali
a4a4179e83
avfilter/x86/vf_hflip : merge hflip byte and hflip short to one macro
7 years ago
Martin Vignali
8fb1d63d91
avfilter/vf_tinterlace : add AVX2 func for lowpass_line 8 and 16
7 years ago
Martin Vignali
1a5865b6dc
avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16
7 years ago
Martin Vignali
d31770d9a6
avfilter/vf_interlace : move func init in ff_interlace_init and add depth arg for ff_interlace_init_x86
7 years ago
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
7 years ago
Martin Vignali
49dced9fd0
avfilter/x86/vf_interlace : avoid crash when data are unaligned
...
ticket 6491
7 years ago
Martin Vignali
869efbf971
avfilter/x86/vf_threshold : add threshold16 SIMD (SSE4 and AVX2)
7 years ago
James Almer
f2aa0ce5a0
x86/vf_hflip: use xor to zero initialize registers
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Almer
dc33fe1d00
x86/vf_hflip: don't load the width argument twice
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Almer
cc2ba526d4
x86/vf_threshold: make threshold8 functions work on x86_32
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Paul B Mahol
5ff0d2acae
avfilter/x86/vf_hflip.asm: fix building on x32
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
86fda8be3f
avfilter: add hflip x86 SIMD
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
James Almer
b73304f79e
x86vf_threshold/: use the PBLENDVB macro
...
Fixes building with yasm
Tested-by: stevenliu
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Martin Vignali
6e3e696591
avfilter/x86/vf_threshold : cosmetic indent
7 years ago
Martin Vignali
9719d57b34
avfilter/x86/vf_threshold : add avx2 version for threshold 8
7 years ago
Martin Vignali
51345cb1d5
avfilter/x86/vf_threshold : make macro for threshold8 in order to add avx2 version
7 years ago
Paul B Mahol
bbfcb1b7c8
avfilter/vf_threshold: add x86 SIMD
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
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>
7 years ago
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>
7 years ago
Paul B Mahol
f8d0689d3f
avfilter/vf_blend: rename addition128 and difference128 to grainmerge and grainextract
7 years ago
James Almer
5688fd77b5
x86/vf_limiter: make limiter functions work on x86_32
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Paul B Mahol
01e545d046
avfilter: add limiter filter
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
James Almer
d2ef9e6e7f
x86/vf_blend: use ABS2 macro
8 years ago
James Almer
0daa1cf073
x86/vf_blend: optimize difference and negation functions
...
Process more pixels per loop.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
James Almer
fa50d9360b
x86/vf_blend: add sse and ssse3 extremity functions
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Ronald S. Bultje
97f7f83169
vf_spp: only assign function pointers if permutation matches expectations.
8 years ago
Diego Biurrun
fd502f4f5f
build: Generalize yasm/nasm-related variable names
...
None of them are specific to the YASM assembler.
(Cherry-picked from libav commit 39e208f4d4
)
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Paul B Mahol
49bbfb9d13
avfilter: add arbitrary audio FIR filter
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
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>
8 years ago
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>
8 years ago
Diego Biurrun
39e208f4d4
build: Generalize yasm/nasm-related variable names
...
None of them are specific to the YASM assembler.
8 years ago
Paul B Mahol
c6c888e996
avfilter/vf_w3fdif: add >8 but <16 bit support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Diego Biurrun
6be7944ee2
x86: Add missing colons after assembly labels
...
This fixes many warnings of the sort
warning: label alone on a line without a colon might be in error
8 years ago
James Almer
a8e3833a61
x86/avf_showcqt: use the FMULADD_PS x86util macro
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Matthieu Bouron
9eb3da2f99
asm: FF_-prefix internal macros used in inline assembly
...
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
9 years ago
James Almer
172af20852
x86/showcqt: use three operand format for some instructions
...
Fixes failures with yasm 1.1.0 and older
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
James Almer
7d7fdd6532
x86/showcqt: add missing preprocessor checks
...
Old yasm/nasm versions don't support some of these
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
James Almer
99b899483e
avutil/x86util: move haddps sse emulation from showcqt
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Muhammad Faiz
1e69ac9246
avfilter/avf_showcqt: cqt_calc optimization on x86
...
on x86_64:
time PSNR
plain 3.303 inf
SSE 1.649 107.087535
SSE3 1.632 107.087535
AVX 1.409 106.986771
FMA3 1.265 107.108437
on x86_32 (PSNR compared to x86_64 plain):
time PSNR
plain 7.225 103.951979
SSE 1.827 105.859282
SSE3 1.819 105.859282
AVX 1.533 105.997661
FMA3 1.384 105.885377
FMA4 test is not available
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
9 years ago
Diego Biurrun
dc40a70c57
Drop unnecessary libavutil/x86/asm.h #includes
9 years ago
Paul B Mahol
5b8faaad6c
avfilter/vf_blend: fix incorrect Y variable when threading is used
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Ronald S. Bultje
f4075767b2
vf_colorspace: use enums for bpp/subsampling array indices.
...
Also add some documentation for each function to colorspacedsp.h.
9 years ago
Ronald S. Bultje
9b26a8077f
vf_colorspace: add const to yuv_stride[] argument in DSP functions.
9 years ago
Ronald S. Bultje
5ce703a6bf
vf_colorspace: x86-64 SIMD (SSE2) optimizations.
9 years ago