FFmpeg/libavcodec/x86
Stone Chen 0e52a4e434 libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC
Implements AVX2 DMVR (decoder-side motion vector refinement) SAD functions. DMVR SAD is only calculated if w >= 8, h >= 8, and w * h > 128. To reduce complexity, SAD is only calculated on even rows. This is calculated for all video bitdepths, but the values passed to the function are always 16bit (even if the original video bitdepth is 8). The AVX2 implementation uses min/max/sub.

Additionally this changes parameters dx and dy from int to intptr_t. This allows dx & dy to be used as pointer offsets without needing to use movsxd.

Benchmarks ( AMD 7940HS )
Before:
BQTerrace_1920x1080_60_10_420_22_RA.vvc | 106.0 |
Chimera_8bit_1080P_1000_frames.vvc | 204.3 |
NovosobornayaSquare_1920x1080.bin | 197.3 |
RitualDance_1920x1080_60_10_420_37_RA.266 | 174.0 |

After:
BQTerrace_1920x1080_60_10_420_22_RA.vvc | 109.3 |
Chimera_8bit_1080P_1000_frames.vvc | 216.0 |
NovosobornayaSquare_1920x1080.bin | 204.0|
RitualDance_1920x1080_60_10_420_37_RA.266 | 181.7 |

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-22 20:36:21 -03:00
..
h26x avcodec: Remove superfluous ';' outside of functions 2024-02-21 01:06:29 +01:00
vvc libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC 2024-05-22 20:36:21 -03:00
aacencdsp.asm x86/aacencdsp: clear the high bits for size in ff_abs_pow34_sse 2023-12-12 15:24:08 -03:00
aacencdsp_init.c avcodec/aacenc: Move initializing DSP out of aacenc.c 2024-03-02 02:54:11 +01:00
aacpsdsp.asm
aacpsdsp_init.c
ac3dsp.asm x86/ac3dsp: clear the upper 32 bits for input arguments where needed 2024-04-08 13:45:58 -03:00
ac3dsp_downmix.asm
ac3dsp_init.c x86/ac3dsp: add ff_float_to_fixed24_avx() 2023-11-25 21:50:56 -03:00
alacdsp.asm
alacdsp_init.c
audiodsp.asm
audiodsp_init.c
blockdsp.asm x86/blockdsp: add sse2 and avx2 versions of fill_block_tab 2024-05-08 21:13:23 -03:00
blockdsp_init.c x86/blockdsp: add sse2 and avx2 versions of fill_block_tab 2024-05-08 21:13:23 -03:00
bswapdsp.asm
bswapdsp_init.c
cabac.h
cavsdsp.c
cavsidct.asm
celt_pvq_init.c
celt_pvq_search.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
cfhddsp.asm
cfhddsp_init.c
cfhdencdsp.asm
cfhdencdsp_init.c
constants.c
constants.h
dcadsp.asm
dcadsp_init.c
dct32.asm
dirac_dwt.asm
dirac_dwt_init.c
diracdsp.asm
diracdsp_init.c
dnxhdenc.asm
dnxhdenc_init.c
exrdsp.asm
exrdsp_init.c
fdct.c
fdct.h
fdctdsp_init.c
flac_dsp_gpl.asm
flacdsp.asm x86/flacdsp: remove unused parameters to pmacsdql macro 2024-05-13 12:18:38 -03:00
flacdsp_init.c x86/flacdsp: add an SSE4 version of wasted33 2024-05-13 12:18:10 -03:00
flacencdsp_init.c
fmtconvert.asm
fmtconvert_init.c
fpel.asm avcodec/x86/fpel: Remove remnants of MMX 2024-03-03 19:48:41 +01:00
fpel.h avcodec/x86/h264_qpel: Remove put_h264_qpel[48]_mmxext 2024-02-20 00:09:05 +01:00
g722dsp.asm
g722dsp_init.c
h263_loopfilter.asm
h263dsp_init.c
h264_cabac.c
h264_chromamc.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
h264_chromamc_10bit.asm
h264_deblock.asm
h264_deblock_10bit.asm
h264_idct.asm avcodec/x86/h264_idct: Fix incorrect xmm spilling on win64 2024-03-25 21:17:47 +01:00
h264_idct_10bit.asm
h264_intrapred.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
h264_intrapred_10bit.asm
h264_intrapred_init.c x86/h264_pred: Convert ff_pred8x8_vertical_8_mmx to ff_pred8x8_vertical_8_sse2 2024-02-13 21:17:06 +00:00
h264_qpel.c avcodec/x86/h264_qpel: Remove put_h264_qpel[48]_mmxext 2024-02-20 00:09:05 +01:00
h264_qpel_8bit.asm
h264_qpel_10bit.asm
h264_weight.asm
h264_weight_10bit.asm
h264chroma_init.c
h264dsp_init.c
hevc_add_res.asm
hevc_deblock.asm avcodec/x86/hevc: fix luma 12b overflow 2024-02-26 12:29:58 +01:00
hevc_idct.asm
hevc_mc.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
hevc_sao.asm
hevc_sao_10bit.asm
hevcdsp.h
hevcdsp_init.c avcodec: Remove superfluous ';' outside of functions 2024-02-21 01:06:29 +01:00
hpeldsp.asm avcodec/x86/hpeldsp_vp3: Merge into hpeldsp 2023-09-07 00:24:39 +02:00
hpeldsp.h avcodec/x86/hpeldsp_vp3: Merge into hpeldsp 2023-09-07 00:24:39 +02:00
hpeldsp_init.c avcodec/x86/hpeldsp_init: Avoid using ff_avg_pixels16_mmx 2024-02-20 00:09:05 +01:00
hpeldsp_rnd_template.c
huffyuvdsp.asm
huffyuvdsp_init.c
huffyuvdsp_template.asm
huffyuvencdsp.asm
huffyuvencdsp_init.c
idctdsp.asm
idctdsp.h
idctdsp_init.c avcodec/x86/mpegvideoenc_template: Disable dead code 2023-09-15 13:08:55 +02:00
imdct36.asm
inline_asm.h
jpeg2000dsp.asm
jpeg2000dsp_init.c
lossless_audiodsp.asm x86/: clear the high bits for order in scalarproduct_and_madd functions 2023-11-22 14:18:42 -03:00
lossless_audiodsp_init.c
lossless_videodsp.asm
lossless_videodsp_init.c
lossless_videoencdsp.asm
lossless_videoencdsp_init.c
lpc.asm
lpc_init.c
Makefile Remove remnants of prores_lgpl decoder 2024-05-07 23:53:26 +02:00
mathops.h
me_cmp.asm
me_cmp_init.c
mlpdsp.asm
mlpdsp_init.c
mpeg4videodsp.c
mpegaudiodsp.c avcodec/mpegaudiodsp: Init dct32 directly 2023-10-01 01:53:32 +02:00
mpegvideo.c
mpegvideoenc.c
mpegvideoenc_qns_template.c
mpegvideoenc_template.c avcodec/x86/mpegvideoenc_template: Disable dead code 2023-09-15 13:08:55 +02:00
mpegvideoencdsp.asm
mpegvideoencdsp_init.c
opusdsp.asm opusdsp: add ability to modify deemphasis constant 2024-04-27 11:12:07 +02:00
opusdsp_init.c opusdsp: add ability to modify deemphasis constant 2024-04-27 11:12:07 +02:00
pixblockdsp.asm
pixblockdsp_init.c
pngdsp.asm
pngdsp_init.c
proresdsp.asm
proresdsp_init.c avcodec/proresdsp: Pass necessary parameter directly 2023-09-11 00:26:34 +02:00
qpel.asm
qpeldsp.asm
qpeldsp_init.c
rnd_template.c
rv34dsp.asm x86: Avoid using 'd' as an argument name 2024-03-24 14:53:57 +01:00
rv34dsp_init.c
rv40dsp.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
rv40dsp_init.c
sbcdsp.asm
sbcdsp_init.c
sbrdsp.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
sbrdsp_init.c
simple_idct.asm avcodec/x86/rv40dsp, simple_idct: Remove remnants of MMX 2024-03-02 02:54:12 +01:00
simple_idct.h
simple_idct10.asm
simple_idct10_template.asm
snowdsp.c avcodec/snow: Move dsp helper functions to snow_dwt.h 2023-10-02 12:23:16 +02:00
svq1enc.asm
svq1enc_init.c
synth_filter.asm
synth_filter_init.c
takdsp.asm x86/takdsp: add missing wrappers to AVX2 functions 2023-12-25 22:31:15 -03:00
takdsp_init.c x86/takdsp: add avx2 versions of all functions 2023-12-23 08:39:22 -03:00
ttadsp.asm
ttadsp_init.c
ttaencdsp.asm
ttaencdsp_init.c
utvideodsp.asm
utvideodsp_init.c
v210-init.c
v210.asm
v210enc.asm
v210enc_init.c
vc1dsp.h
vc1dsp_init.c
vc1dsp_loopfilter.asm
vc1dsp_mc.asm
vc1dsp_mmx.c
videodsp.asm
videodsp_init.c
vorbisdsp.asm
vorbisdsp_init.c
vp3dsp.asm
vp3dsp_init.c avcodec/x86/vp3dsp_init: Set correct function pointer, fix crash 2024-05-02 23:38:15 +02:00
vp6dsp.asm vp6dsp: Remove MMX code 2024-02-13 20:47:16 +00:00
vp6dsp_init.c
vp8dsp.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
vp8dsp_init.c
vp8dsp_loopfilter.asm
vp9dsp_init.c
vp9dsp_init.h
vp9dsp_init_10bpp.c
vp9dsp_init_12bpp.c
vp9dsp_init_16bpp.c
vp9dsp_init_16bpp_template.c
vp9intrapred.asm
vp9intrapred_16bpp.asm
vp9itxfm.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
vp9itxfm_16bpp.asm x86: Update x86inc.asm 2024-03-24 14:53:57 +01:00
vp9itxfm_template.asm
vp9lpf.asm
vp9lpf_16bpp.asm
vp9mc.asm
vp9mc_16bpp.asm
vpx_arith.h
w64xmmtest.c
xvididct.asm
xvididct.h
xvididct_init.c