summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* tools: Add target_sws_fuzzer.cMichael Niedermayer2024-02-21
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale: Check srcSliceH for bayerMichael Niedermayer2024-02-21
| | | | | Fixes: Assertion srcSliceH > 1 failed at libswscale/swscale_unscaled.c:1359 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Allocate more dithererrorMichael Niedermayer2024-02-21
| | | | | Fixes: out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Avoid OOM for invalid STCO / CO64 constructions.Dale Curtis2024-02-21
| | | | | | | | | | | The `entries` value is read directly from the stream and used to allocate memory. This change clamps `entries` to however many are possible in the remaining atom or file size (whichever is smallest). Fixes https://crbug.com/1429357 Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: cosmetics, vertically align structsAnton Khirnov2024-02-21
|
* fftools/ffmpeg: move subtitle helpers to ffmpeg_dec, their only userAnton Khirnov2024-02-21
|
* fftools/ffmpeg_filter: pass framerate through InputFilterOptionsAnton Khirnov2024-02-21
| | | | | | | Rather than read it directly from InputStream. This is a step towards avoiding the assumption that filtergraph inputs are always fed by demuxers.
* fftools/ffmpeg_filter: pass autorotate/reinit flags through InputFilterOptionsAnton Khirnov2024-02-21
| | | | | | | Rather than read them directly from InputStream. This is a step towards avoiding the assumption that filtergraph inputs are always fed by demuxers.
* fftools/ffmpeg_filter: pass sub2video canvas size through InputFilterOptionsAnton Khirnov2024-02-21
| | | | | | | Rather than read them directly from InputStream. This is a step towards avoiding the assumption that filtergraph inputs are always fed by demuxers.
* fftools/ffmpeg_filter: accept a name from its upstream inputAnton Khirnov2024-02-21
| | | | | | | Do not construct the name manually from input file/stream indices. This is a step towards avoiding the assumption that filtergraph inputs are always fed by demuxers.
* fftools/ffmpeg_filter: compute input trim start/end in demuxerAnton Khirnov2024-02-21
| | | | | | The computation is based on demuxer properties, so that is the more appropriate place for it. Filter code just receives the desired start time/duration.
* fftools/ffmpeg_filter: stop taking display matrix from global side dataAnton Khirnov2024-02-21
| | | | | It should never be necessary now that decoders propagate global side data to frames.
* avutil/version: Remove outdated checksAndreas Rheinhardt2024-02-21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove superfluous ';' outside of functionsAndreas Rheinhardt2024-02-21
| | | | | | | | | Inside a function an extra ';' is a null statement; but outside of it it simply must not happen. So remove them. Reviewed-by: Nuo Mi <nuomi2021@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vvc/vvcdsp: Remove pointless wrappersAndreas Rheinhardt2024-02-21
| | | | | Reviewed-by: Nuo Mi <nuomi2021@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vvc/vvc_ps: Use union for luts to avoid unaligned accessesAndreas Rheinhardt2024-02-21
| | | | | | | | | | These arrays are currently accessed via uint16_t* pointers although nothing guarantees their alignment. Furthermore, this is problematic wrt the effective-type rules. Fix this by using a union of arrays of uint8_t and uint16_t. Reviewed-by: Nuo Mi <nuomi2021@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vvc/vvc_ps: Check before accessAndreas Rheinhardt2024-02-21
| | | | | | | | | | | | | max_bin_idx can be at most LMCS_MAX_BIN_SIZE - 1 here, so pivot[LCMS_MAX_BIN_SIZE + 1] may be accessed, but pivot has only LCMS_MAX_BIN_SIZE + 1 elements (unless the values of pivot were so that it is always assured that pivot[LCMS_MAX_BIN_SIZE] is always < sample (which it is iff it is always < 2^bit_depth - 1)). So reorder the checks. Reviewed-by: Nuo Mi <nuomi2021@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Deprecate AV_INPUT_BUFFER_MIN_SIZEAndreas Rheinhardt2024-02-21
| | | | | | | | | | | It used to be used with preallocated packet buffers with the old encode API, but said API is no more and therefore there is no reason for this to be public any more. So deprecate it and use an internal replacement for the encoders using it as an upper bound for the size of their headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/common: Move includes to the beginning of the fileAndreas Rheinhardt2024-02-21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/pixelutils: Remove dead codeAndreas Rheinhardt2024-02-21
| | | | | | Forgotten in e6b125e3be19fb341fd9a759ad0af3b39ba35e0c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/av1dec: fix matrix coefficients exposed by codec contextJan Ekström2024-02-20
| | | | | | `colorspace` in avcodec terms means `matrix coefficients`. Reviewed-by: James Almer <jamrial@gmail.com>
* avutil/hwcontext_vaapi: Allocate pub and priv frames hwctx togetherAndreas Rheinhardt2024-02-20
| | | | | | | | | This is possible because the lifetime of both coincide. Besides reducing the number of allocations this also simplifies access to VAAPIFramesContext as one no longer has to go through AVHWFramesInternal. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/hwcontext_vaapi: Allocate public and priv device hwctx togetherAndreas Rheinhardt2024-02-20
| | | | | | | | | This is possible because the lifetime of both coincide. Besides reducing the number of allocations this also simplifies access to VAAPIDeviceContext as one no longer has to go through AVHWDeviceInternal. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Make check actually check what is intendedAndreas Rheinhardt2024-02-20
| | | | | | | | | Also fixes a Clang warning: "overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]" Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_pan: Uninitialize channel layoutAndreas Rheinhardt2024-02-20
| | | | | | Fixes a leak in the mov-mp4-pcm-float FATE test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* flvdec: Honor the "flv_metadata" option for the "datastream" metadata fieldMartin Storsjö2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the option "flv_metadata" (internally using the field name "trust_metadata") is set to 0, meaning that we don't allocate streams based on information in the metadata, only based on actual streams we encounter. However the "datastream" metadata field still would allocate a subtitle stream. When muxing, the "datastream" field is added if either a data stream or subtitle stream is present - but the same metadata field is used to preemtively create a subtitle stream only. Thus, if the field was added due to a data stream, not a subtitle stream, the demuxer would create a stream which won't get any actual packets. If there was such an extra, empty subtitle stream, running avformat_find_stream_info still used to terminate within reasonable time before 3749eede66c3774799766b1f246afae8a6ffc9bb. After that commit, it no longer would terminate until it reaches the max analyze duration, which is 90 seconds for flv streams (see e6a084641aada7a2e4672172f2ee26642800a361, 24fdf7334d2bb9aab0abdbc878b8ae51eb57c86b and f58e011a1f30332ba824c155078ca701e29aef63). Before that commit (which removed the deprecated AVStream.codec), the "st->codecpar->codec_id = AV_CODEC_ID_TEXT", set within the demuxer, would get propagated into st->codec->codec_id by numerous avcodec_parameters_to_context(st->codec, st->codecpar), then further into st->internal->avctx->codec_id by update_stream_avctx within read_frame_internal in libavformat/utils.c (demux.c these days). Signed-off-by: Martin Storsjö <martin@martin.st>
* fate: add IAMF in mp4 testsJames Almer2024-02-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: add support for Immersive Audio Model and Formats in ISOBMFFJames Almer2024-02-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: add support for Immersive Audio Model and Formats in ISOBMFFJames Almer2024-02-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: make MOVStreamContext refcountedJames Almer2024-02-20
| | | | | | This will be useful in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: factorize out setting the output packet propertiesJames Almer2024-02-20
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: allow demuxers to output more than one packet per ↵James Almer2024-02-20
| | | | | | read_packet() call Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/lead: support format 0x0Peter Ross2024-02-20
| | | | Fixes ticket #10660.
* avcodec/lead: support unaligned blocksPeter Ross2024-02-20
| | | | Fixed ticket #10656.
* avformat/iamfdec: set disposition flags to output streamsJames Almer2024-02-19
| | | | | | | if there's an audio layer with a single stream that can be rendered alone, mark it as default. Otherwise, mark every stream as dependent. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamfenc: further split into shareable modulesJames Almer2024-02-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamfdec: further split into shareable modulesJames Almer2024-02-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* configure, libavutil/version: Remove unused HAVE_MMX2Andreas Rheinhardt2024-02-20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/intreadwrite: Remove obsolete warningAndreas Rheinhardt2024-02-20
| | | | | | | Obsolete since 7ec2354c38978b918dc079b611393becb6c80bf7. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move ff_exp2fi() to aacsbr.cAndreas Rheinhardt2024-02-20
| | | | | | Only used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/jpeg2000: Simplify exp2fi for numbers used hereAndreas Rheinhardt2024-02-20
| | | | | | | | | | | | | The call to ff_exp2fi() here always uses arguments in the normal range, so that the branches in ff_exp2fi() are unnecessary. This is so because JPEG2000 itself only supports up to 128 bits per component per pixel (we only support far less); furthermore, expn is always 0..31 for the decoder and also sane for the encoder, so that the difference between these two values is always in the normal range of -126..128. Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/jpeg2000dec: Avoid using GetByteContext.buffer directlyAndreas Rheinhardt2024-02-20
| | | | | Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/jpeg2000dec, j2kenc: Constify where appropriateAndreas Rheinhardt2024-02-20
| | | | | Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/h264_qpel: Remove put_h264_qpel[48]_mmxextAndreas Rheinhardt2024-02-20
| | | | | | These functions are not faster than the C versions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264qpel_template: Mark pointers as non-aliasingAndreas Rheinhardt2024-02-20
| | | | | | | It allows the compiler to combine two reads and writes of adjacent 32bit memory locations into 64bit read-writes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hpeldsp_init: Avoid using ff_avg_pixels16_mmxAndreas Rheinhardt2024-02-20
| | | | | | | | | Use ff_avg_pixels16_mmxext or ff_avg_pixels16_sse2 (for users with SSE2_FAST) instead. This also allows to remove ff_avg_pixels16_mmx, as this was its last remaining user. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/fpel: Remove declarations of inexistent functionsAndreas Rheinhardt2024-02-20
| | | | | | | Forgotten in 50a8cbb23e9a982292bf7737004c97eba776c00e and a51279bbdea0d6db920d71980262bccd0ce78226. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfdec: do not use AnyType when resolving Descriptors and ↵Marton Balint2024-02-20
| | | | | | | | | | | | | | | | | | MultipleDescriptors By using AnyType for resolving a strong reference we searched among all types, not just the ones which can be the target of the reference, which in some cases caused to find the wrong type, if the metadata set UUIDs were not unique. UUIDs do not have to be unique if their type sets them apart, SMPTE 377M says: > StrongRef: 'One to One’ relationship between sets and implemented in MXF > with UUIDs. Strong References are typed which means that the definition > identifies the kind of set which is the target of the reference. Fixes ticket #10865. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: move resolving Descriptors to the multi descriptor resolve ↵Marton Balint2024-02-20
| | | | | | | | function Also remove unused descriptor member from MXFPackage. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/iamf_writer: Fix leaks on errorAndreas Rheinhardt2024-02-19
| | | | | | | Fixes Coverity issues #1559544 and #1559547. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>