1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

2578 Commits

Author SHA1 Message Date
Andreas Rheinhardt
e84348a8ab avcodec/svq1enc: Add SVQ1EncDSPContext, make codec context private
Currently, SVQ1EncContext is defined in a header that is also
included by the arch-specific code that initializes the one
and only dsp function that this encoder uses directly.

But the arch-specific functions to set this dsp function
do not need anything from SVQ1EncContext. This commit therefore
adds a small SVQ1EncDSPContext whose only member is said
function pointer and renames svq1enc.h to svq1encdsp.h
to avoid exposing unnecessary internals to these init
functions (and the whole mpegvideo with it).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-14 16:14:24 +02:00
Carl Eugen Hoyos
60e87faf7f lavc/x86/simple_idct: Fix linking shared libavcodec with MS link.exe
link.exe hangs on empty simple_idct.o

Fixes ticket #9909.
2022-10-10 02:42:44 +02:00
Andreas Rheinhardt
1741adb1c7 avcodec/huffyuvencdsp: Pass pix_fmt directly when initing dsp
It is the only thing that is actually used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-09 09:15:39 +02:00
Andreas Rheinhardt
76d8f0dd14 avcodec/ac3dsp: Remove unused parameter
Forgotten in fd98594a88.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-29 23:37:13 +02:00
Andreas Rheinhardt
4393331250 avcodec/dirac_dwt: Avoid conversions between function pointers and void*
Pointers to void can be converted to any pointer to incomplete or
object type and back; but they are nevertheless not completely generic
pointers: There is no provision in the C standard that guarantees their
convertibility with function pointers. C90 lacks a generic function
pointer, C99 made every function pointer a generic function pointer and
still disallows the convertibility with void *. Both GCC as well as
Clang warn about this when using -pedantic.

Therefore use unions to avoid these conversions.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-28 23:37:12 +02:00
James Almer
0922c6b01b x86/lpc: use fused negative multiply-add instructions where useful
Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-22 18:17:26 -03:00
James Almer
0627e6d74c avcodec/lpc: zero the middle odd sample in the output
Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-22 18:17:26 -03:00
James Almer
c8c4a162fc avcodec/lpc: use ptrdiff_t for length parameters
Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-22 18:17:26 -03:00
James Almer
48615f0a78 x86/aacpsdsp: add ps_hybrid_analysis_fma3
This replace the sse3 version, which was not really faster than the sse one.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-22 13:27:43 -03:00
James Almer
2bcf86d53d x86/aacpsdsp: precompute constant factors
Inspired by the optimization done to the C version by Rémi Denis-Courmont.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-09-22 13:27:43 -03:00
Martin Storsjö
c9aa6164d4 x86/lpc: Fix parameter sign extension, unbreaking checkasm-lpc on x86_64 windows
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-09-22 11:13:33 +03:00
Lynne
b67776e12f
x86/lpc: fix even scalar loop overreads/writes
Passes checkasm with valgrind, tested to sizes of more than 4000 samples.
2022-09-22 04:27:19 +02:00
Lynne
dea944b838
x86/lpc: fix odd scalar loop overreads/writes 2022-09-22 03:07:41 +02:00
Andreas Rheinhardt
9beba05311 avcodec/fmtconvert: Remove unused AVCodecContext parameter
Unused since d74a8cb7e4.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-21 20:26:40 +02:00
Andreas Rheinhardt
fd72d8aea3 avcodec/blockdsp: Remove unused AVCodecContext parameter
Possible since be95df12bb.

Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-21 20:24:40 +02:00
Andreas Rheinhardt
57f3ca20dc avcodec/cavsdsp: Remove unused function parameter
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-21 20:24:22 +02:00
Lynne
3ade6a8644
x86/lpc: implement a new Welch windowing function
Old one was written with the assumption only even inputs would be given.
This very messy replacement supports even and odd inputs, and supports
AVX2 for extra speed. The buffers given are usually quite big (4k samples),
so the speedup is worth it.
The new SSE version is still faster than the old inline asm version by 33%.

Also checkasm is provided to make sure this monstrosity works.

This fixes some FATE tests.
2022-09-21 07:12:39 +02:00
Rémi Denis-Courmont
b52034270a lavc/vorbisdsp: use ptrdiff_t rather than intptr_t
... for a difference between pointers.
2022-09-19 13:51:00 -03:00
Paul B Mahol
37a503ac87 avcodec/x86/audiodsp: add scalarproduct avx2 2022-09-13 17:43:16 +02:00
Andreas Rheinhardt
a54e53a1c4 avcodec/vp8dsp: Constify src in vp8_mc_func
Reviewed-by: Peter Ross <pross@xvid.org>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-11 20:57:51 +02:00
Andreas Rheinhardt
ad12e31b03 avcodec/x86/flacdsp_init: Remove double ';'
Inside a function, the second ';' in ";;" is just a null statement,
but it is actually illegal outside of functions. Compilers
nevertheless accept it without warning, except when in -pedantic
mode when e.g. Clang emits a -Wextra-semi warning. Therefore
remove the unnecessary ';'.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-05 20:54:57 +02:00
Paul B Mahol
1e202d89c9 avcodec/x86/flacdsp: fix bug in decorrelation
Fixes #9297
2022-09-05 12:27:49 +02:00
Andreas Rheinhardt
0bb0c26799 avutil/mem_internal: Fix headers
Including avassert.h is unnecessary since commit
786be70e28.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-24 03:43:52 +02:00
Martin Storsjö
dc55e63578 x86: Don't hardcode the height to 8 in sad8_xy2_mmx
The height is hardcoded in some of the me_cmp functions, but not
in all of them. But in the case of all other functions, it's hardcoded
in the same place in SIMD functions as in the C reference functions,
while this one function differs from the behaviour of the C code.

(Before 542765ce3e, there were a
couple other sad8_*_mmx functions with similar hardcoded height.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-08-17 00:00:50 +03:00
Andreas Rheinhardt
6c4595190e avcodec/flacdsp: Split encoder-only parts into a ctx of its own
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 03:28:45 +02:00
Andreas Rheinhardt
3a869cd5cd avcodec/flacdsp: Remove unused function parameter
Forgotten in e609cfd697.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 03:28:45 +02:00
Andreas Rheinhardt
333b32af8e avcodec/h264chroma: Constify src in h264_chroma_mc_func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 03:02:13 +02:00
Andreas Rheinhardt
b3bbbb14d0 avcodec/hevcdsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-05 02:54:04 +02:00
Andreas Rheinhardt
209a11053f avcodec/mpegvideodsp: Constify src pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:44:16 +02: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
abb85429f3 avcodec/me_cmp: Constify me_cmp_func buffer parameters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:31:53 +02:00
Andreas Rheinhardt
e7cb7c762a avcodec/cfhdencdsp: Constify input pointers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:18:19 +02:00
Andreas Rheinhardt
dc3e25e4d3 avcodec/lossless_videoencdsp: Constify src sub_left_predict
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:16:35 +02:00
Andreas Rheinhardt
af43da3e4d avcodec/videodsp: Constify buf in VideoDSPContext.prefetch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-31 03:14:34 +02:00
Andreas Rheinhardt
7ab9b30800 avcodec/vp56: Move VP5-9 range coder functions to a header of their own
Also use a vpx prefix for them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-28 03:49:54 +02:00
Andreas Rheinhardt
cddb25c848 avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
It is overridden by ff_add_bytes_l2_sse2() on any non-ancient CPU.

Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-25 16:00:57 +02:00
Andreas Rheinhardt
9dfec90253 avcodec/x86/h264_qpel: Remove unused functions
Forgotten in 4011a76494.
The reason for this is that these functtions are marked
as av_always_inline and GCC does not emit warnings
if such functions are unused, so this went unnoticed.
Yet Clang does, so this commit removes them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-26 07:09:16 +02:00
Andreas Rheinhardt
fed07efcde avcodec/x86/lossless_videodsp: Remove obsolete MMX(EXT) functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:41:02 +02:00
Andreas Rheinhardt
230ea38de1 avcodec/x86/lossless_videoencdsp: Remove obsolete MMX function
The only systems which benefit from ff_diff_bytes_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:40:49 +02:00
Andreas Rheinhardt
839fbe0e98 avcodec/x86/huffyuvencdsp: Remove obsolete MMX function
The only systems which benefit from ff_diff_int16_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:40:36 +02:00
Andreas Rheinhardt
5e332fe35c avcodec/x86/dirac_dwt: Remove obsolete MMX functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:40:23 +02:00
Andreas Rheinhardt
4b6ffc2880 avcodec/x86/huffyuvdsp: Remove obsolete MMX functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:40:10 +02:00
Andreas Rheinhardt
6a551f1405 avcodec/x86/vp8dsp: Remove obsolete MMX(EXT) functions
The only systems which benefit from these are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:39:57 +02:00
Andreas Rheinhardt
61e3cccd36 avcodec/x86/dcadsp: Remove obsolete SSE function
The only systems which benefit from ff_lfe_fir0_float_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:39:44 +02:00
Andreas Rheinhardt
8360354ae8 avcodec/x86/rv34dsp: Remove obsolete MMX function
The only systems which benefit from ff_rv34_idct_dc_add_mmx are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:39:31 +02:00
Andreas Rheinhardt
eb33fd384e avcodec/x86/synth_filter: Remove obsolete SSE function
The only systems which benefit from synth_filter_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:39:18 +02:00
Andreas Rheinhardt
54784ffac5 avcodec/x86/dct32: Remove obsolete SSE function
The only systems which benefit from ff_dct32_float_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:39:06 +02:00
Andreas Rheinhardt
25e39f8c72 avcodec/x86/mpegaudiodsp: Remove obsolete SSE function
The only systems which benefit from imdct36_blocks_sse are truely
ancient 32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:38:52 +02:00
Andreas Rheinhardt
6cb3ee80b3 avcodec/x86/vp6dsp: Remove obsolete MMX ff_vp6_filter_diag4_mmx
The only systems which benefit from it are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:38:40 +02:00
Andreas Rheinhardt
eefec06634 avcodec/x86/vp3dsp: Remove obsolete MMX functions
The only system which benefit from these are truely ancient
32bit x86s as all other systems use at least the SSE2 versions
(this includes all x64 cpus (which is why this code is restricted
to x86-32)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:38:27 +02:00