summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/matroskaenc: Fix outdated commentAndreas Rheinhardt2022-06-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Improve handling of AV1 extradataAndreas Rheinhardt2022-06-24
| | | | | | | | | | | | Up until now, only the first four bytes (the ones preceding the OBU) were written because not enough space has been reserved for the complete CodecPrivate. This commit changes this by increasing the space reserved for the CodecPrivate (it is big enough for every sane sequence header plus something extra); the code falls back to writing four bytes in case the increased space turns out to be insufficient. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/av1: Add upper bound for the size of a sane sequence headerAndreas Rheinhardt2022-06-24
| | | | | | | | It will be used by the Matroska muxer to reserve a certain number of bytes for the CodecPrivate in case no extradata is initially available (as it is for the libaom-av1 encoder). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Split updating CodecPrivate from writing itAndreas Rheinhardt2022-06-24
| | | | | | | | | | | | | | | | | | | | | | Up until now, updating extradata was very ad-hoc: The amount of space reserved for extradata was not recorded when writing the header; instead the AAC code simply presumed that it was enough. This commit changes this by recording how much space is available. This brings with it that the code for writing of and reserving space for the CodecPrivate and for updating it diverges. They are therefore split; this allows to put other common tasks like seeking to right offset as well as writing padding (in case the new extradata did not fill the whole reserved space) to this common function. The code for filling up the reserved space is smarter than the code it replaces; therefore it is no longer necessary to reserve more than necessary just to be sure that one can add an EBML Void element (whose minimum size is two) lateron. This is the reason for the change to the aac-autobsf-adtstoasc test. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Avoid swapping codecpar->extradata temporarilyAndreas Rheinhardt2022-06-24
| | | | | | | | | | Instead pass extradata and extradata_size explicitly. (It is not perfect, as ff_put_(wav|bmp)_header() still uses the extradata embedded in codecpar, but this is not an issue as long as their CodecPrivate isn't updated.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Split assembling CodecPrivate from writing itAndreas Rheinhardt2022-06-24
| | | | | | | This is in preparation for splitting writing and updating extradata more thoroughly later. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_sei: Fix check for SEI endAndreas Rheinhardt2022-06-24
| | | | | | | | | | | | | | The intention behind the current check seems to be to check for the rbsp_trailing_bits() syntax structure which is always 0x80 for valid SEI messages. Yet this is wrong: These trailing bits are not part of the GetBitContext -- they have already been stripped in ff_h2645_packet_split(). And it is harmful, as 0x80 is a legal SEI message payload type (namely for Structure of pictures information SEI messages). We ignore this type of SEI, but because of this bug we also ignored every SEI message in the same NALU following it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Only trim RBSP trailing padding if it existsAndreas Rheinhardt2022-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It does not exist for NALUs for which the SODB is empty; it also does not exist for NALUs for which not even the complete header is present. The former category contains end of sequence and end of bitstream units. The latter category consists of one-byte HEVC units (the ordinary H.264 header is only one byte long). This commit therefore stops stripping RBSP trailing padding from the former type of unit and discards the latter type of unit altogether. This also fixes an assertion failure: Before this commit, a one-byte HEVC NALU from an ISOBMFF packet could pass all the checks in hevc_parse_nal_header() (because the first byte of the size field of the next unit is mistaken as containing the temporal_id); yet because the trailing padding bits were stripped, its actually had a size of less than eight bits; because h2645_parse.c uses the checked bitstream reader, the get_bits_count() of the GetBitContext is not 16 in this case; it is not even a multiple of eight and this can trigger an assert in ff_hevc_decode_nal_sei(). Fixes: Assertion failure Fixes: 46662/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4947860854013952 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_ps: Don't use show_bits_long() unnecessarilyAndreas Rheinhardt2022-06-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hcadec: Move transient GetBitContext to stackAndreas Rheinhardt2022-06-24
| | | | | | | This avoids keeping pointers to no longer valid data in the context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hcadec: Don't use GetBit-API for byte-aligned readsAndreas Rheinhardt2022-06-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresdec2: fix description of known fourccZhao Zhili2022-06-24
| | | | | | 'acpo' should be 'apco', and add missing 'ap4x'. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/libuavs3d: fix potential index out of rangeZhao Zhili2022-06-24
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/libdavs2: use frame rate code tableZhao Zhili2022-06-24
| | | | | | It's more natural than the floating to fraction conversion. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* configure: select avs2 parser for libdavs2 decoderZhao Zhili2022-06-24
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/avs2_parser: parse more infoZhao Zhili2022-06-24
| | | | | | Including video resolution, framerate and picture type, etc. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/avs2_parser: split data into framesZhao Zhili2022-06-24
| | | | | | Before the patch, the parser split data into units, not frames. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/avs2: add AVS2 related definitionsZhao Zhili2022-06-24
| | | | | | Replace magic numbers by enum values. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/movenc: enable compressorname for mp4 modeZhao Zhili2022-06-24
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avcodec/audiotoolboxenc: return external error if encode failedSteven Liu2022-06-24
| | | | | | | | | | | | because the AudioConverterFillComplexBuffer can return 0 or 1 if success. so set the ret to 0 it AudioConverterFillComplexBuffer success and return ret value for success or return AVERROR_EXTERNAL when AudioConverterFillComplexBuffer failed. BTW change the error message log level from warning to error. Reviewed-by: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavc/vaapi_hevc: fill rext luma/chroma offset in the right wayXu Guangxin2022-06-24
| | | | | | | | | For range extension, the luma/chroma offset is larger than 8 bits, we need fill the 16 bits version. Signed-off-by: Xu Guangxin <guangxin.xu@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* avcodec/jpeglsdec: fix end check for xfrmMichael Niedermayer2022-06-23
| | | | | | | | Fixes: out of array access Fixes: 47871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-5646305956855808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cdgraphics: limit scrolling to the lineMichael Niedermayer2022-06-23
| | | | | | | | Fixes: out of array access Fixes: 47877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5690504626438144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: Limit start_seq_no to one bit lessMichael Niedermayer2022-06-23
| | | | | | | | | | | This avoids overflow checks on additions with 32bit numbers Fixes: signed integer overflow: 9223372036854775806 + 2 cannot be represented in type 'long' Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-4747770734444544 Fixes: 48065/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5372410355908608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libaomenc: Get number of operating pointsWan-Teh Chang2022-06-23
| | | | | | | | | Use the new codec control AV1E_GET_NUM_OPERATING_POINTS to get the number of operating points. This is the size of the output arrays of AV1E_GET_SEQ_LEVEL_IDX and AV1E_GET_TARGET_SEQ_LEVEL_IDX. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: James Zern <jzern@google.com>
* avfilter/vf_gblur: properly round outputPaul B Mahol2022-06-23
|
* avcodec/x86/lossless_videodsp: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/lossless_videoencdsp: Remove obsolete MMX functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/huffyuvencdsp: Remove obsolete MMX functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/dirac_dwt: Remove obsolete MMX functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/huffyuvdsp: Remove obsolete MMX functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/vp8dsp: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/dcadsp: Remove obsolete SSE functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/rv34dsp: Remove obsolete MMX functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/synth_filter: Remove obsolete SSE functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/dct32: Remove obsolete SSE functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/mpegaudiodsp: Remove obsolete SSE functionAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/vp6dsp: Remove obsolete MMX ff_vp6_filter_diag4_mmxAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/vp3dsp: Remove obsolete MMX functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avfilter/x86/vf_bwdif: Remove obsolete MMXEXT functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avfilter/x86/vf_idet: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avfilter/x86/vf_yadif: Remove obsolete MMXEXT functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | 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>
* avcodec/x86/videodsp: Remove obsolete MMX, 3dnow, SSE functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | 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 these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/x86/float_dsp: Remove obsolete 3dnowext functionAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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 ff_vector_fmul_window_3dnowext are truely ancient 32bit AMD x86s it is removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/vorbisdsp: Remove obsolete 3dnow functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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 3dnow implementations are truely ancient 32bit AMD x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/fft: Remove obsolete 3dnow functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | 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 3dnow implementations are truely ancient 32bit AMD x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/x86/pixelutils: 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, 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 8x8 MMX (overridden by MMXEXT) or the 16x16 MMXEXT (overridden by SSE2) are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/x86/vf_eq_init: Remove obsolete MMXEXT functionAndreas 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 process_mmxext are truely ancient 32bit x86s it is removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/x86/swscale: Simplify macroAndreas Rheinhardt2022-06-22
| | | | | | This is possible now that it is no longer used by MMX. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/x86/swscale: Remove obsolete and harmful MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 that benefit from these functions are truely ancient 32bit x86s they are removed. Moreover, some of the removed code was buggy/not bitexact and lead to failures involving the f32le and f32be versions of gray, gbrp and gbrap on x86-32 when SSE2 was not disabled. See e.g. https://fate.ffmpeg.org/report.cgi?time=20220609221253&slot=x86_32-debian-kfreebsd-gcc-4.4-cpuflags-mmx Notice that yuv2yuvX_mmx is not removed, because it is used by SSE3 and AVX2 as fallback in case of unaligned data and also for tail processing. I don't know why yuv2yuvX_mmxext isn't being used for this; an earlier version [1] of 554c2bc7086f49ef5a6a989ad6bc4bc11807eb6f used it, but the version that was eventually applied does not. [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-November/272124.html Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>