summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avcodec/x86/audiodsp_init: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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>
* avcodec/x86/ac3dsp_init: Remove obsolete 3dnow, MMX(EXT), SSE functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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>
* avcodec/x86/vc1dsp_init: Remove obsolete 3dnow, MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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>
* lavc/dovi_rpu: Fix UB for possible left shift of negative valuesMichael Goulet2022-06-21
| | | | It is undefined to left-shift a negative value.
* avfilter/vf_estdif: tweak ecost optionPaul B Mahol2022-06-21
|
* libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()Nil Admirari2022-06-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()Nil Admirari2022-06-21
| | | | | | | | | 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>
* fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and ↵Nil Admirari2022-06-21
| | | | | | getenv() Signed-off-by: Martin Storsjö <martin@martin.st>
* compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with ↵Nil Admirari2022-06-21
| | | | | | LoadLibraryExW Signed-off-by: Martin Storsjö <martin@martin.st>
* libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8(), ↵Nil Admirari2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fftools/ffprobe: report avio errorsMarton Balint2022-06-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskaenc: Don't check twice whether to write tagsAndreas Rheinhardt2022-06-20
| | | | | | | | | | | | | | | 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>
* avformat/matroskaenc: Don't waste bytes to Write Tag length fieldsAndreas Rheinhardt2022-06-20
| | | | | | | 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>
* avformat/mpegts: remove obsolate hacks for detecting streams with bad PMTsMarton Balint2022-06-20
| | | | | | | | | 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>
* doc/decoders: add docs for v210 decoderMarton Balint2022-06-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: add support for strideless v210 as in BOXX filesMarton Balint2022-06-20
| | | | | | Fixes ticket #1838. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: add support for invalid paddings up to 16 bytesMarton Balint2022-06-20
| | | | | | Fixes ticket #1528. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: do not use accelerated code for the last pixels of a rowMarton Balint2022-06-20
| | | | | | | 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>
* avcodec/v210dec: disallow negative custom strideMarton Balint2022-06-20
| | | | | | | | Also make sure a big custom stride does not overflow size check. Avoids segfaults. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: factorize row decodingMarton Balint2022-06-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: properly support odd widthsMarton Balint2022-06-20
| | | | | | Fixes ticket #5195. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/mfenc: set variable frame size flag.Gyan Doshi2022-06-20
| | | | | | | | | 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
* tests/checkasm/sw_scale: Fix alignment for movdqaMichael Goulet2022-06-20
| | | | | | | 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.
* lavc/libx264.c: Fix possible UB by NULL pointer LHSMichael Goulet2022-06-20
| | | | 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).
* lavfi/drawutils: improve colorspace supportrcombs2022-06-19
| | | | | | | | | | | | | | | | | | | | | - 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>
* lavfi/colorspace: add ff_matrix_mul_3x3_vecrcombs2022-06-19
| | | | Signed-off-by: rcombs <rcombs@rcombs.me>
* avdevice/oss_dec: account for sample size when computing timestampMatt Jacobson2022-06-19
| | | | | | | | | Don't assume each sample is one byte in size. Doing so results in wrong and occasionally non-monotonically-increasing timestamps. Fix nearby cosmetic typo. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/fopen_utf8: support long paths on Windows for fftoolssoftworkz2022-06-19
| | | | | Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/x86/lpc, vp8dsp_init: Remove redundant checksAndreas Rheinhardt2022-06-18
| | | | | | EXTERNAL_SSE2_SLOW is now more encompassing than EXTERNAL_SSE2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/cpu_internal: Fix check for SSE2SLOWAndreas Rheinhardt2022-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For SSE2 and SSE3, there are four states that the two flags involved (AV_CPU_FLAG_SSE[23] and AV_CPU_FLAG_SSE[23]SLOW) can convey. When ordered from worst to best they are: 1. both flags unset (SSE[23] unavailable) 2. the slow flag set, the ordinary flag unset (this is designed for cases where SSE2 is available, but so slow that MMX(EXT)/SSE code is usually faster) 3. both flags set (SSE2 is available, but there might be scenarios where MMX(EXT)/SSE code is faster) 4. the ordinary flag set, the slow flag unset (this is the normal case) The ordinary macros for checking cpuflags return true in the latter two cases; the fast macros only return true for the latter case. Yet the macros to check for slow currently only return true in case three. This seems unintended. In fact, the only uses of the slow macros are all of the form if (EXTERNAL_SSE2(cpu_flags) || EXTERNAL_SSE2_SLOW(cpu_flags)) where the check for EXTERNAL_SSE2_SLOW is completely redundant. Even more importantly, it is not what was intended. Before 6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0, the checks passed in cases 2 to 4. Said commit changed this to something that only passes for the third case. Commits 7fb758cd8ed08e4a37f10e25003953d13c68b8cd and c1913064e38cb338039f29c280a0dacc3fd1e451 restored the old behaviour, yet merging 4efab89332ea39a77145e8b15562b981d9dbde68 (in commit ac774cfa571734c49c26e2d3387adccff8957ff8) broke this again by changing it to what it is now.* This commit changes the macros to make the slow macros check whether a specific instruction is supported, even if slow. This restores the intended meaning to all uses of the SLOW macros and is generally more natural. *: Libav only checks for EXTERNAL_SSE2_SLOW, i.e. for the third case only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/librist: bump required version to 0.2.7Marton Balint2022-06-18
| | | | | | This is the first version for which fifo size setting actually works. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt2022-06-17
| | | | | | | | | | | | | | | | | | In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec/qsvenc: add ROI support to qsv encoderWenbin Chen2022-06-17
| | | | | | | | | Use The mfxEncoderCtrl parameter to enable ROI. Get side data "AVRegionOfInterest" and use it to configure "mfxExtEncoderROI" which is the MediaSDK's ROI configuration. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avformat/aiffdec: avoid integer overflow in get_meta()Michael Niedermayer2022-06-17
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aaxdec: Check for overlaping segmentsMichael Niedermayer2022-06-17
| | | | | | | | Fixes: Timeout Fixes: 45875/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-6121689903136768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/demux: Count EAGAIN as 100 bytes in relation to read limit in ↵Michael Niedermayer2022-06-17
| | | | | | | | | | | avformat_find_stream_info() Fixes: Timeout Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Fixes: 45738/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6142535657979904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) on stuck ↵Michael Niedermayer2022-06-17
| | | | | | | | | | empty input parser Fixes: read_frame_internal() which does not return even though both demuxer and parser do return Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/pulse_audio_dec: deprecate frame_size optionMarton Balint2022-06-16
| | | | | | It does not do anything. Frame sizes can be controlled by using fragment_size. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/pulse_audio_dec: reduce default fragment sizeMarton Balint2022-06-16
| | | | | | | | | | | | | Reduces default fragment size from the pulse audio default of 2 sec to 50 ms. This also has an effect on the size of the returned frames, which will be around 50 ms as well, making timestamps more accurate. This should fix the regression in ticket #9776. Pulseaudio timestamps for monitor sources are still pretty inaccurate for me, but I don't see how else should we query latencies from the library. Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "avdevice/pulse_audio_dec: only set adjust latency flag if ↵Marton Balint2022-06-16
| | | | | | | | | | fragment_size is not set" This reverts commit 7f059a250bb7bcbf7bba537c1a059a5934413035. Apparently adjusting latency makes a difference even if fragment size is specifed. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskaenc: Convert chapter metadataAndreas Rheinhardt2022-06-16
| | | | | | | | | | | | It is no longer converted since mkv_write_chapters() is called before mkv_write_tags() which happens since commit 4ebfc13c338423cf48f1a1266c890422367f7775. Given the fact that chapters can also be written late, mkv_write_chapters() has to convert the metadata itself. Fixes ticket #9812. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Reset cur_master_element when discarding masterAndreas Rheinhardt2022-06-16
| | | | | | | | | | | | | | Before this patch the muxer writes an invalid file (namely one in which the Projection master is a child of the Colour element) if the following conditions are met: a) The stream contains AVMasteringDisplayMetadata without primaries and luminance (i.e. useless AVMasteringDisplayMetadata). b) The stream contains AV_PKT_DATA_SPHERICAL side data. c) All the colour elements of the stream are equal to default (i.e. unknown). Fortunately these conditions are very unlikely to be met. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfdec: Offload allocating string to av_dict_set()Andreas Rheinhardt2022-06-16
| | | | | Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfdec: Use ff_data_to_hex() for data->hex conversionAndreas Rheinhardt2022-06-16
| | | | | | | | | | In this case it also stops pretending that the length of the output string is somehow checked (which is currently being done by using snprintf that is called with the amount of space needed instead of the amount of space actually available). Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfdec: Don't duplicate av_uuid_unparseAndreas Rheinhardt2022-06-16
| | | | | | | | Also don't allocate the string ourselves, let av_dict_set() do it. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxf: Use AVUUID for uidsAndreas Rheinhardt2022-06-16
| | | | | | | This is in preparation for using av_uuid functions directly. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc: describe QOI image formatPeter Ross2022-06-16
|
* avfilter/vf_zscale: dissallow too small slicesPaul B Mahol2022-06-16
| | | | Also change rounding type when calculating slices size.
* avcodec/mace: fix some style issuesPaul B Mahol2022-06-16
|
* avfilter: add virtualbass filterPaul B Mahol2022-06-16
|