Commit Graph

107189 Commits

Author SHA1 Message Date
Andreas Rheinhardt
608319a311 swscale/x86/rgb2rgb: Remove obsolete MMX, 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:35:38 +02:00
Andreas Rheinhardt
67f0db7bc5 avcodec/x86/h264chroma: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:35:25 +02:00
Andreas Rheinhardt
4011a76494 avcodec/x86/h264_qpel: Remove obsolete MMXEXT functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:35:11 +02:00
Andreas Rheinhardt
a51279bbde avcodec/x86/hpeldsp: Remove obsolete MMX/3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:34:58 +02:00
Andreas Rheinhardt
aa8a201992 avcodec/x86/hpeldsp_vp3: Remove obsolete 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:34:45 +02:00
Andreas Rheinhardt
4038b5b209 avcodec/x86/fmtconvert: Remove obsolete SSE functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:34:32 +02:00
Andreas Rheinhardt
9426a2f8ff avcodec/x86/svq1enc: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_ssd_int8_vs_int16_mmx are truely ancient
32bit x86s it is removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:34:19 +02:00
Andreas Rheinhardt
6feea076e9 avcodec/x86/lossless_audiodsp: Remove obsolete MMXEXT function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_scalarproduct_and_madd_int16_mmxext are truely
ancient 32bit x86s it is removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:34:06 +02:00
Andreas Rheinhardt
92b5800277 avcodec/x86/pixblockdsp: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:33:54 +02:00
Andreas Rheinhardt
ee551a21dd avcodec/x86/blockdsp: Remove obsolete MMX functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:33:41 +02:00
Andreas Rheinhardt
bfb28b5ce8 avcodec/x86/idctdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:33:27 +02:00
Andreas Rheinhardt
b2437a45af avcodec/x86/xvididct: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:33:14 +02:00
Andreas Rheinhardt
3d151bab32 avcodec/x86/sbrdsp: Remove obsolete SSE function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from ff_sbr_qmf_deint_bfly_sse are truely ancient 32bit x86s
it is removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:33:01 +02:00
Andreas Rheinhardt
4618f36a24 avcodec/x86/h264dsp_init: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:32:47 +02:00
Andreas Rheinhardt
55d8618a47 avcodec/x86/mpegvideoencdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:32:34 +02:00
Andreas Rheinhardt
542765ce3e avcodec/x86/me_cmp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:32:21 +02:00
Andreas Rheinhardt
c5dd2fdc09 avfilter/x86/vf_noise: Remove obsolete MMX function
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from line_noise_mmx are truely ancient 32bit x86s
it is removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:32:08 +02:00
Andreas Rheinhardt
9bc527126c avcodec/x86/h264_intrapred: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:31:53 +02:00
Andreas Rheinhardt
3221aba879 avcodec/x86/cavsdsp: Remove obsolete MMX(EXT), 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:31:40 +02:00
Andreas Rheinhardt
9abf906800 avcodec/x86/rv40dsp_init: Remove obsolete MMX(EXT), 3dnow functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:31:26 +02:00
Andreas Rheinhardt
338f8fd232 avcodec/x86/hevcdsp_init: Remove obsolete MMXEXT functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:31:12 +02:00
Andreas Rheinhardt
d402ec6be9 avcodec/x86/fdct: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:30:59 +02:00
Andreas Rheinhardt
7284ab789d avcodec/x86/mpegvideoenc: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:30:43 +02:00
Andreas Rheinhardt
d29a9c2aa6 avcodec/x86/diracdsp: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:30:28 +02:00
Andreas Rheinhardt
3d716d38ab avcodec/x86/audiodsp_init: Remove obsolete MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:30:13 +02:00
Andreas Rheinhardt
fd98594a88 avcodec/x86/ac3dsp_init: Remove obsolete 3dnow, MMX(EXT), SSE functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:29:57 +02:00
Andreas Rheinhardt
e02ffed004 avcodec/x86/vc1dsp_init: Remove obsolete 3dnow, MMX(EXT) functions
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-22 13:28:57 +02:00
Michael Goulet
c02dd59cd3 lavc/dovi_rpu: Fix UB for possible left shift of negative values
It is undefined to left-shift a negative value.
2022-06-21 18:23:31 +02:00
Paul B Mahol
aa1babc59a avfilter/vf_estdif: tweak ecost option 2022-06-21 18:10:39 +02:00
Nil Admirari
69364a06c6 libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Nil Admirari
c381f5412f libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()
1. getenv() is replaced with getenv_utf8() across libavformat.
2. New versions of AviSynth+ are now called with UTF-8 filenames.
3. Old versions of AviSynth are still using ANSI strings,
   but MAX_PATH limit on filename is removed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Nil Admirari
13350e81fd fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv()
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Nil Admirari
dfa062ed3c compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Nil Admirari
cc5844da98 libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8(), freeenv_utf8() and getenv_dup()
wchartoutf8() converts strings returned by WinAPI into UTF-8,
which is FFmpeg's preffered encoding.

Some external dependencies, such as AviSynth, are still
not Unicode-enabled. utf8toansi() converts UTF-8 strings
into ANSI in two steps: UTF-8 -> wchar_t -> ANSI.
wchartoansi() is responsible for the second step of the conversion.
Conversion in just one step is not supported by WinAPI.

Since these character converting functions allocate the buffer
of necessary size, they also facilitate the removal of MAX_PATH limit
in places where fixed-size ANSI/WCHAR strings were used
as filename buffers.

On Windows, getenv_utf8() wraps _wgetenv() converting its input from
and its output to UTF-8. Strings returned by getenv_utf8()
must be freed by freeenv_utf8().

On all other platforms getenv_utf8() is a wrapper around getenv(),
and freeenv_utf8() is a no-op.

The value returned by plain getenv() cannot be modified;
av_strdup() is usually used when modifications are required.
However, on Windows, av_strdup() after getenv_utf8() leads to
unnecessary allocation. getenv_dup() is introduced to avoid
such an allocation. Value returned by getenv_dup() must be freed
by av_free().

Because of cleanup complexities, in places that only test the existence
of an environment variable or compare its value with a string
consisting entirely of ASCII characters, the use of plain getenv()
is still preferred. (libavutil/log.c check_color_terminal()
is an example of such a place.)

Plain getenv() is also preffered in UNIX-only code,
such as bktr.c, fbdev_common.c, oss.c in libavdevice
or af_ladspa.c in libavfilter.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-21 13:27:46 +03:00
Marton Balint
c11fb46731 fftools/ffprobe: report avio errors
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 23:51:54 +02:00
Andreas Rheinhardt
fe662516a5 avformat/matroskaenc: Don't check twice whether to write tags
Because not all metadata is written as tags, the Matroska muxer
filters out the tags that are not written as tags.
Therefore the code first checks whether a Tag master element
needs to be opened for a given stream/chapter/attachment/global
metadata. If the answer turns out to be yes, it is checked again
whether a given AVDictionaryEntry is written as a tag.
This commit changes this: The Tag element is opened unconditionally
and in case it turns out that it was unneeded, it is discarded again.
This is possible because the Tag element is written into its own
dynamic buffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-20 23:42:28 +02:00
Andreas Rheinhardt
b468ddc75d avformat/matroskaenc: Don't waste bytes to Write Tag length fields
This is possible by using a dynamic buffer to write them;
said dynamic buffer is (re)used and reset as appropriate.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-20 23:42:28 +02:00
Marton Balint
58df81b027 avformat/mpegts: remove obsolate hacks for detecting streams with bad PMTs
Ffmpeg/ffprobe/ffplay sets scan_all_pmts to 1 when finding the streams, that
should be enough to handle files for which some early PMTs miss some streams.

Fixes ticket #9782.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 23:36:37 +02:00
Marton Balint
5468548d5e doc/decoders: add docs for v210 decoder
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:50 +02:00
Marton Balint
96f2fc3841 avcodec/v210dec: add support for strideless v210 as in BOXX files
Fixes ticket #1838.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:50 +02:00
Marton Balint
a10132b967 avcodec/v210dec: add support for invalid paddings up to 16 bytes
Fixes ticket #1528.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:50 +02:00
Marton Balint
2e895edb5d avcodec/v210dec: do not use accelerated code for the last pixels of a row
ASM code tends to overwrite the buffers by 2-4 bytes and it can cause issues
with slice threads.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:50 +02:00
Marton Balint
5716836963 avcodec/v210dec: disallow negative custom stride
Also make sure a big custom stride does not overflow size check.

Avoids segfaults.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:49 +02:00
Marton Balint
a5c7d3173c avcodec/v210dec: factorize row decoding
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:49 +02:00
Marton Balint
9793760f22 avcodec/v210dec: properly support odd widths
Fixes ticket #5195.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-20 22:56:49 +02:00
Gyan Doshi
56419428a8 avcodec/mfenc: set variable frame size flag.
Default avctx->frame_size is 0 which led to init failure for
audio MediaFoundation encoders since 827d6fe73d.

The MF audio encoders accept variable frame size input buffers.

Fixes #9802
2022-06-20 15:04:26 +05:30
Michael Goulet
b7f6a933fa tests/checkasm/sw_scale: Fix alignment for movdqa
SSE3 instruction movdqa in ff_yuv2yuvX_sse3() expects a 16-byte aligned address for a memory address, or else a segfault is generated.
The src_pixels buffer below was not aligned to 16 bytes on the stack necessarily, so we got segfaults during fate-checkasm-sw_scale.

Therefore 16-byte align all of these local variables, aligning them too much shouldn't hurt.
2022-06-20 11:08:43 +02:00
Michael Goulet
0aa5dd084b lavc/libx264.c: Fix possible UB by NULL pointer LHS
It is UB to attempt to do pointer arithmetic on NULL pointer LHS, even if that pointer arithmetic ends up being "+= 0" (i.e. !!p == 0 if p == NULL).
2022-06-20 11:08:26 +02:00
rcombs
6c3a82f043 lavfi/drawutils: improve colorspace support
- Introduce ff_draw_init2, which takes explicit colorspace and range
  args
- Use lavu/csp and lavfi/colorspace for conversion, rather than the
  lavu/colorspace.h macros
- Use the passed-in colorspace when performing RGB->YUV conversions

The upshot of this is:
- Support for YUV spaces other than BT601
- Better rounding for all conversions
- Particular rounding improvements in >8-bit formats, which previously
  used simple left-shifts
- Support for limited-range RGB
- Support for full-range YUV in non-J pixfmts

Due to the rounding improvements, this results in a large number of
minor changes to FATE tests.

Signed-off-by: rcombs <rcombs@rcombs.me>
2022-06-19 19:18:34 -05:00
rcombs
a5b3b65dc0 lavfi/colorspace: add ff_matrix_mul_3x3_vec
Signed-off-by: rcombs <rcombs@rcombs.me>
2022-06-19 19:18:34 -05:00