summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avutil/internal: Move libm inclusion to the beginningAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/arm/mpegvideo_arm: Use static_assert to check offsetsAndreas Rheinhardt2024-03-31
| | | | | | | Also move AV_CHECK_OFFSET to its only user, namely lavc/arm/mpegvideo_arm.c and rename it to CHECK_OFFSET. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-31
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version: Use static_assert for static assertsAndreas Rheinhardt2024-03-31
| | | | | | | Also update the checks that guard against inserting a new enum entry in the middle of a range. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/swscale_internal: Don't export internal functionAndreas Rheinhardt2024-03-31
| | | | | | | sws_alloc_set_opts() can actually be made internal to utils.c. This commit does so. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/swscale_internal: Hoist branch out of loopAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msmpeg4: Don't include x86-specific header unconditionallyAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec, avfilter: Don't use "" for system headersAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/ppc/swscale_altivec: Simplify macroAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/ppc/swscale_altivec: Fix build with -O0Andreas Rheinhardt2024-03-31
| | | | | | | | In this case GCC does not treat a const variable initialized to the compile-time constant "3" as a compile-time constant and errors out because the argument is not a literal value. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pcm-bluray/dvd: Use correct pointer types on BEAndreas Rheinhardt2024-03-31
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mips/ac3dsp_mips: Add missing includesAndreas Rheinhardt2024-03-31
| | | | | | Likely broken in d7a75d21635eab4f4a1efea22945933059c2e36f. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/buffersrc: fix overriding unknown channel layouts with negotiated oneMarton Balint2024-03-30
| | | | | | | | | | | | | | | | | | Fixes ffplay playback of unknown layouts, when SDL directly supports the audio format, such as: ffplay -f lavfi anullsrc=cl=2C,aformat=s16 Without the patch, "Channel layout change is not supported" errors are generated because buffersrc (unknown 2 channel) and buffersink (stereo) negotiated a stereo layout, but the stereo layout was never stored in the BufferSourceContext. This fixes a regression of 7251f909721a570726775acf61b2b9c28a950c76, but this is more of a regression of the avfilter channel layout conversion (1f96db959c1235bb7079d354e09914a0a2608f62). Signed-off-by: Marton Balint <cus@passwd.hu>
* fate/image: Fix EXR tests on big endianAndreas Rheinhardt2024-03-30
| | | | | | | | These tests need a scale filter to convert to the prescribed pixel format (the native format is endian-dependent). Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Revert "avformat/mov: ignore item boxes for animated heif"James Almer2024-03-30
| | | | | | | | This reverts commit f6b7b473d456a6aa1c063c4261b17277e2c70ac0. The image in the item boxes and the animation in the trak box are not necessarely the same, so both should be exported. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: use the same data information as the source entry when cloning ↵James Almer2024-03-30
| | | | | | | | side data src->{data,size} does not need to match src->buf->{data,size}. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/opt: Avoid av_uninitAndreas Rheinhardt2024-03-30
| | | | | | | GCC 9-13 do not emit warnings for this at all optimization levels even when -Wmaybe-uninitialized is not disabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ratecontrol: Use forward declaration for AVExprAndreas Rheinhardt2024-03-30
| | | | | | | Avoids including eval.h everywhere where mpegvideo.h is included. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_refs: Use smaller scope, don't use av_uninitAndreas Rheinhardt2024-03-30
| | | | | | | | | In particular, declare iterators with loop scope. Also remove av_uninit while at it, because they are now unnecessary due to the changes of the preceding commit. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_refs: Rewrite code to make control flow clearerAndreas Rheinhardt2024-03-30
| | | | | | | | | | | | | | While this change IMO makes the control flow clearer for the human reader, it is especially important for GCC: It erroneously believes that it is possible to enter the SHORT2(UNUSED|LONG) cases without having entered the preceding block that initializes pic, frame_num, structure and j; it would emit -Wmaybe-uninitialized warnings for these variables if they were not pseudo- initialized with av_uninit(). This patch allows to remove the latter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/swscale_internal: Only include altivec header iff HAVE_ALTIVECAndreas Rheinhardt2024-03-30
| | | | | Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* postproc/postprocess: Don't generally include arch-specific headersAndreas Rheinhardt2024-03-30
| | | | | Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: fix sub2video_{basic, time_limited} on big-endian targetsSean McGovern2024-03-30
| | | | | | The reference file uses BGRA pixel format, so request it here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointerTimo Rothenpieler2024-03-30
|
* avcodec/hevc_ps: don't use a fixed sized buffer for parameter set raw dataJames Almer2024-03-29
| | | | | | Allocate it instead, and use it to compare sets instead of the parsed struct. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_ps: fix the problem of memcmp losing effectivenessTong Wu2024-03-29
| | | | | | | | | | | HEVCHdrParams* receives a pointer which points to a dynamically allocated memory block. It causes the memcmp always returning 1. Add a function to do the comparision. A condition is also added to avoid malloc(0). Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Tong Wu <tong1.wu@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/setpts: unset frame durationsAnton Khirnov2024-03-29
| | | | | | | Actual frame durations are, in general, not computable without buffering a frame. FIxes #10886
* lavf/vf_setpts: unset output framerateAnton Khirnov2024-03-29
| | | | | | This filter produces VFR output in general. Avoids dropping frames in the setpts test.
* lavc/packet: schedule AV_PKT_DATA_QUALITY_FACTOR for removalAnton Khirnov2024-03-29
| | | | | It is unused internally and has been marked as deprecated a long time ago.
* lavc: rename avpacket.c to packet.cAnton Khirnov2024-03-29
| | | | For consistency with its API header packet.h.
* fftools/ffmpeg_sched: make sure to always run task cleanupAnton Khirnov2024-03-29
| | | | | | | Even in cases where sch_start() failed. This ensures all links are properly closed and no tasks are left hanging. Fixes #10916.
* fftools/ffmpeg_sched: move sch_stop() to the bottom of the fileAnton Khirnov2024-03-29
| | | | Will allow avoiding forward declarations in following commits.
* avcodec/libvpxenc: Remove obsolete av_unusedAndreas Rheinhardt2024-03-29
| | | | | | | Forgotten in 753074721bd414874d18c372c491bdc6323fa3bf. Reviewed-by: James Zern <jzern@google.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libvpxenc: Only search for side data when intending to use itAndreas Rheinhardt2024-03-29
| | | | | | | | | | | Also rewrite the code so that a variable that is only used depending upon CONFIG_LIBVPX_VP9_ENCODER is not declared outside of the #if block. (The variable was declared with av_uninit, but it should have been av_unused, as the former does not work for all compilers.) Reviewed-by: James Zern <jzern@google.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Remove redundant dependencies on hevc_data.oAndreas Rheinhardt2024-03-29
| | | | | | | | | | | hevc_data.c only provides ff_hevc_diag_scan tables and neither the QSV HEVC encoder nor the HEVC parser use these directly and the indirect dependency is already accounted for in the dependencies of the hevcparse subsystem since b0c61209cd30f9ddf3356d5ded6df488f25d1bd5, so remove these spurious dependencies. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flac_picture: print a warning when mimetype is unknownJames Almer2024-03-28
| | | | | | | It's not an error since bba6df9ac7bd8386d92e1a7f5c737ca4e575fcc. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_signature: Dont crash on no framesMichael Niedermayer2024-03-28
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Don't throw an error when attached picture isn't recognized.Dale Curtis2024-03-28
| | | | | | | | The MIME type field is required per the FLAC standard, but it's not an error just because ffmpeg doesn't recognize it. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* examples/decode_filter_video: Add loop for draining the filtergraphTobias Rapp2024-03-28
| | | | | | | | | Depending on the filters used, the filtergraph may produce trailing data after feeding it the last input frame. Update the example to include the necessary loop for draining the filtergraph. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* examples/decode_filter_audio: Add loop for draining the filtergraphTobias Rapp2024-03-28
| | | | | | | | | Depending on the filters used, the filtergraph may produce trailing data after feeding it the last input frame. Update the example to include the necessary loop for draining the filtergraph. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* tests/audiogen: Fix total RIFF chunk sizeTobias Rapp2024-03-28
| | | | | The "RIFF" identifier and chunk size fields should not be included within the size value.
* all: Don't use ATOMIC_VAR_INITAndreas Rheinhardt2024-03-28
| | | | | | | | | | | | | | | | | | | | C11 required to use ATOMIC_VAR_INIT to statically initialize atomic objects with static storage duration. Yet this macro was unsuitable for initializing structures [1] and was actually unneeded for all known implementations (this includes our compatibility fallback implementations which simply wrap the value in parentheses: #define ATOMIC_VAR_INIT(value) (value)). Therefore C17 deprecated the macro and C23 actually removed it [2]. Since commit 5ff0eb34d2b1089d3dd9f27fdb51520001709138 we default to C17 if the compiler supports it; Clang warns about ATOMIC_VAR_INIT in this mode. Given that no implementation ever needed this macro, this commit stops using it to avoid this warning. [1]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_485 [2]: https://en.cppreference.com/w/c/atomic/ATOMIC_VAR_INIT Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_demux: make InputStream.autorotate privateAnton Khirnov2024-03-28
| | | | It is no longer accessed outside of ffmpeg_demux.
* fftools/ffmpeg_enc: stop copying demuxer side data to the muxerAnton Khirnov2024-03-28
| | | | All side data should be propagated through the trancoding pipeline.
* lavc/encode: map AVCodecContext.decoded_side_data to coded_side_dataAnton Khirnov2024-03-28
| | | | | This way it can be automagically propagated through the encoder to muxing.
* lavc/decode: move sd_global_map to avcodecAnton Khirnov2024-03-28
| | | | It will be shared with encoding code.
* lavc/frame_thread_encoder: avoid assigning a whole AVCodecContextAnton Khirnov2024-03-28
| | | | | | | | | It is highly unsafe, as AVCodecContext contains many allocated fields. Almost everything needed by worker threads should be covered by routing through AVCodecParameters and av_opt_copy(), except for a few fields that are copied manually. avcodec_free_context() can now be used for per-thread contexts.
* lavc: avoid leaking AVCodecContext.chroma_intra_matrixAnton Khirnov2024-03-28
|
* fftools/ffmpeg_filter: remove display matrix if we have applied itAnton Khirnov2024-03-28
|
* fftools/ffmpeg_dec: apply cropping manuallyAnton Khirnov2024-03-28
| | | | | | | | | lavfi does not require aligned buffers, so we can safely apply top/left cropping by any amount, without passing any special flags to lavc. Longer term, an even better solution would probably be auto-inserting the crop filter (or its hwaccel versions) as needed. Multiple FATE tests no longer need -flags unaligned.