Ramiro Polla
6aafe61285
avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t
2024-09-01 13:42:30 +02:00
Ramiro Polla
7e4784e40c
avcodec/mpegvideoencdsp: speed up draw_edges_8_c by inlining it for all used edge widths
...
This commit also restricts w to 4, 8, or 16.
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz:
before after
draw_edges_8_1724_4_c: 46796.5 7141.7 ( 6.55x)
draw_edges_8_1724_8_c: 43584.5 7216.5 ( 6.04x)
draw_edges_8_1724_16_c: 47007.2 10080.5 ( 4.66x)
draw_edges_128_407_4_c: 11199.0 4185.0 ( 2.68x)
draw_edges_128_407_8_c: 10660.2 4418.0 ( 2.41x)
draw_edges_128_407_16_c: 11800.2 4634.5 ( 2.55x)
draw_edges_1080_31_4_c: 1356.5 634.7 ( 2.14x)
draw_edges_1080_31_8_c: 1972.0 1430.2 ( 1.38x)
draw_edges_1080_31_16_c: 4621.0 4009.7 ( 1.15x)
draw_edges_1920_4_4_c: 834.5 795.2 ( 1.05x)
draw_edges_1920_4_4_negstride_c: 821.7 802.0 ( 1.02x)
draw_edges_1920_4_8_c: 2782.2 2650.7 ( 1.05x)
draw_edges_1920_4_8_negstride_c: 2724.7 2670.0 ( 1.02x)
draw_edges_1920_4_16_c: 6437.5 6327.7 ( 1.02x)
draw_edges_1920_4_16_negstride_c: 6395.2 6349.5 ( 1.01x)
A55:
before after
draw_edges_8_1724_4_c: 52540.4 19739.2 ( 2.66x)
draw_edges_8_1724_8_c: 45386.9 19847.4 ( 2.29x)
draw_edges_8_1724_16_c: 51995.4 23284.7 ( 2.23x)
draw_edges_128_407_4_c: 13401.1 6988.2 ( 1.92x)
draw_edges_128_407_8_c: 12218.4 7527.9 ( 1.62x)
draw_edges_128_407_16_c: 13695.9 8207.2 ( 1.67x)
draw_edges_1080_31_4_c: 3702.9 3110.4 ( 1.19x)
draw_edges_1080_31_8_c: 6015.6 5643.2 ( 1.07x)
draw_edges_1080_31_16_c: 12281.9 11901.4 ( 1.03x)
draw_edges_1920_4_4_c: 3957.9 3970.2 ( 1.00x)
draw_edges_1920_4_4_negstride_c: 3964.1 3825.2 ( 1.04x)
draw_edges_1920_4_8_c: 7757.9 7676.4 ( 1.01x)
draw_edges_1920_4_8_negstride_c: 7923.6 7812.4 ( 1.01x)
draw_edges_1920_4_16_c: 14791.6 15143.9 ( 0.98x)
draw_edges_1920_4_16_negstride_c: 14788.6 15163.4 ( 0.98x)
A76:
before after
draw_edges_8_1724_4_c: 39786.0 4968.5 ( 8.01x)
draw_edges_8_1724_8_c: 32971.5 5069.5 ( 6.50x)
draw_edges_8_1724_16_c: 40056.0 6017.2 ( 6.66x)
draw_edges_128_407_4_c: 9517.2 1210.5 ( 7.86x)
draw_edges_128_407_8_c: 8035.7 1346.2 ( 5.97x)
draw_edges_128_407_16_c: 9946.5 1648.2 ( 6.03x)
draw_edges_1080_31_4_c: 1308.0 660.7 ( 1.98x)
draw_edges_1080_31_8_c: 1785.5 1270.7 ( 1.41x)
draw_edges_1080_31_16_c: 3266.7 2591.5 ( 1.26x)
draw_edges_1920_4_4_c: 1151.0 1090.7 ( 1.06x)
draw_edges_1920_4_4_negstride_c: 1153.7 1096.5 ( 1.05x)
draw_edges_1920_4_8_c: 2220.7 2186.5 ( 1.02x)
draw_edges_1920_4_8_negstride_c: 2218.5 2193.5 ( 1.01x)
draw_edges_1920_4_16_c: 4324.2 4230.0 ( 1.02x)
draw_edges_1920_4_16_negstride_c: 4310.7 4233.0 ( 1.02x)
2024-08-26 12:50:26 +02:00
Ramiro Polla
9f68a3712e
avcodec/aarch64/mpegvideoencdsp: add neon implementations for pix_sum and pix_norm1
...
A55 A76
pix_norm1_c: 478.2 234.2
pix_norm1_neon: 188.2 ( 2.54x) 41.2 ( 5.68x)
pix_sum_c: 304.2 244.0
pix_sum_neon: 77.2 ( 3.94x) 21.5 (11.35x)
2024-08-26 12:48:31 +02:00
Rémi Denis-Courmont
63d016aea5
lavc/mpegvideoencdsp: R-V V pix_sum
...
T-Head C908:
pix_sum_c: 332.2
pix_sum_rvv_i64: 91.2
SpacemiT X60:
pix_sum_c: 321.2
pix_sum_rvv_i64: 60.9
2024-08-19 22:41:13 +03:00
Andreas Rheinhardt
966fc1230a
avcodec/mpegvideoencdsp: Allow pointers to const where possible
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:32:40 +02:00
Andreas Rheinhardt
40e6575aa3
all: Replace if (ARCH_FOO) checks by #if ARCH_FOO
...
This is more spec-compliant because it does not rely
on dead-code elimination by the compiler. Especially
MSVC has problems with this, as can be seen in
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html
or
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html
This commit does not eliminate every instance where we rely
on dead code elimination: It only tackles branching to
the initialization of arch-specific dsp code, not e.g. all
uses of CONFIG_ and HAVE_ checks. But maybe it is already
enough to compile FFmpeg with MSVC with whole-programm-optimizations
enabled (if one does not disable too many components).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:56:37 +02:00
Muhammad Faiz
caa4bd7a9f
avcodec/me_cmp: remove ff_me_cmp_init_static()
...
Precalculate and constify ff_square_tab.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-05 22:42:59 +07:00
Clément Bœsch
adef752f1b
Merge commit ' 0e285c2f90'
...
* commit '0e285c2f90 ':
mpegvideo: Kill some disabled code
Merged-by: Clément Bœsch <u@pkh.me>
2017-03-19 16:07:30 +01:00
Diego Biurrun
0e285c2f90
mpegvideo: Kill some disabled code
2016-08-17 12:16:42 +02:00
Derek Buitenhuis
fa48cd8814
Merge commit ' 892f037c55'
...
* commit '892f037c55 ':
imgconvert: Move the shrink functions only where needed
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 19:58:35 +00:00
Vittorio Giovara
892f037c55
imgconvert: Move the shrink functions only where needed
2016-01-21 15:33:19 -05:00
Shivraj Patil
2f3f98af2b
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions
...
This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions in new file mpegvideoencdsp_msa.c
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 18:25:01 +02:00
Michael Niedermayer
3a2d1465c8
Merge commit ' 2d60444331'
...
* commit '2d60444331 ':
dsputil: Split motion estimation compare bits off into their own context
Conflicts:
configure
libavcodec/Makefile
libavcodec/arm/Makefile
libavcodec/dvenc.c
libavcodec/error_resilience.c
libavcodec/h264.h
libavcodec/h264_slice.c
libavcodec/me_cmp.c
libavcodec/me_cmp.h
libavcodec/motion_est.c
libavcodec/motion_est_template.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/Makefile
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 23:27:40 +02:00
Diego Biurrun
2d60444331
dsputil: Split motion estimation compare bits off into their own context
2014-07-17 09:07:10 -07:00
Michael Niedermayer
3790801f9c
Merge commit ' 3c650efb81'
...
* commit '3c650efb81 ':
dsputil: Move draw_edges() to mpegvideoencdsp
Conflicts:
libavcodec/mpegvideo_enc.c
libavcodec/x86/Makefile
libavcodec/x86/dsputil_init.c
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/dsputil_x86.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 16:17:27 +02:00
Michael Niedermayer
020865f557
Merge commit ' c166148409'
...
* commit 'c166148409 ':
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
Conflicts:
libavcodec/dsputil.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/dsputilenc.asm
libavcodec/x86/dsputilenc_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 15:36:58 +02:00
Michael Niedermayer
462c6cdb8e
Merge commit ' 8d686ca59d'
...
* commit '8d686ca59d ':
dsputil: Split off *_8x8basis to a separate context
Conflicts:
libavcodec/dsputil.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/dsputilenc_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 15:08:55 +02:00
Diego Biurrun
3c650efb81
dsputil: Move draw_edges() to mpegvideoencdsp
2014-07-06 14:48:50 -07:00
Diego Biurrun
c166148409
dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc
2014-07-06 14:26:53 -07:00
Diego Biurrun
8d686ca59d
dsputil: Split off *_8x8basis to a separate context
2014-07-06 13:09:24 -07:00