summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* 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
|
* doc/APIchanges: add missing marker for release 5.0Gyan Doshi2022-06-16
|
* avcodec/exif: Move tag_list out of headerAndreas Rheinhardt2022-06-15
| | | | | | | | | It is only used by exif.c (and e.g. EXIF_TAG_NAME_LENGTH is an implementation detail anyway). Also remove the sentinel, as it is used in conjunction with FF_ARRAY_ELEMS. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/noise_shaping_data: Remove unused tablesAndreas Rheinhardt2022-06-15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-15
| | | | | | | | | | | | | | | | | | 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>
* avformat/ape: more bits in size for less overflowsMichael Niedermayer2022-06-14
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 3 cannot be represented in type 'int' Fixes: 46184/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-4678059519770624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/binkaudio: Clear state on EAGAINMichael Niedermayer2022-06-14
| | | | | | | | | | | Its not supported to maintain a frame as receive_frame() argument over multiple calls Fixes: store to null pointer of type 'FFTSample' (aka 'float') Fixes: 46231/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_DCT_fuzzer-6276566037954560 Fixes: ACDC.smo Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Non overflowing ambisonic order checkMichael Niedermayer2022-06-14
| | | | | | | | Fixes: signed integer overflow: 536870913 * 536870913 cannot be represented in type 'int' Fixes: 45862/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4730373768085504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/APIchanges: add missing uuid and csp entriesZane van Iperen2022-06-13
| | | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: bump version after UUID changesZane van Iperen2022-06-13
| | | | | | | Forgot to bump after 76e95daa08f4c8874dbb570b6293716e2175213a. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: James Almer <jamrial@gmail.com>
* swresample/resample: Remove unnecessary emms_cAndreas Rheinhardt2022-06-14
| | | | | | The last MMX code in swresample has just been removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/x86/resample: Remove obsolete MMXEXT functionsAndreas Rheinhardt2022-06-14
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT, SSE and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2). So given that the only systems which benefit from the MMXEXT resamplers (which are overridden by SSE2) are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/x86/rematrix: Remove obsolete MMX functionsAndreas Rheinhardt2022-06-14
| | | | | | | | | | | 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>
* swresample/x86/audio_convert: Remove obsolete MMX functionsAndreas Rheinhardt2022-06-14
| | | | | | | | | | | 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>