aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: deprecate sonicJ. Dekker2024-11-252-0/+7
| | | | | | | | | | | | | This is an experimental and research codec of which ffmpeg is the only encoder and decoder, development has stalled since 2013 and these files don't exist in the wild. Deprecate the encoders to be removed next major bump, decoders to be removed one bump afterwards. We also disable the the encoders by default in configure, the decoders should be disabled by default next bump. Signed-off-by: J. Dekker <jdek@itanimul.li> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat/mov: add missing stts array syncing in mov_build_indexJames Almer2024-11-253-5/+42
| | | | | | | | | Also fix checks for sc->stts_count that assume it may not be in sync with sample count. Missed in 865c73c86f9d9d167be7e41ad6cef71eba92dadd. Fixes parsing durations in some cases. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ac3dec: fix downmix logic for eac3James Almer2024-11-251-1/+1
| | | | | | | | | Ensure downmixed is only set once during init, as it used to be. Fixes a regression since acbb2777e28c. Fixes ticket #11321 Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/h264idct: fix compilation for RV32IMARémi Denis-Courmont2024-11-251-0/+2
|
* lavc/vp8dsp: fix compilation for RV32IMARémi Denis-Courmont2024-11-252-2/+2
|
* lavc/pixblockdsp: fix compilation for RV32IMARémi Denis-Courmont2024-11-252-1/+4
|
* lavu/float_dsp: fix compilation with RISC-V ILP32 ABIRémi Denis-Courmont2024-11-251-0/+16
|
* riscv: remove unnecessary #include'sRémi Denis-Courmont2024-11-257-7/+0
|
* doc: add styles for good/bad code examplesMarvin Scholz2024-11-251-1/+1
| | | | | | Makes it easier to immediately see if the code examples given in the style documentation are good or bad examples, making it harder to accidentally confuse a bad example for a good one.
* doc/developer: add examples to clarify code styleMarvin Scholz2024-11-251-1/+100
| | | | | | Given the frequency that new developers, myself included, get the code style wrong, it is useful to add some examples to clarify how things should be done.
* MAINTAINERS: Add myself as Darwin maintainerMarvin Scholz2024-11-251-0/+1
| | | | | | | | | | I do some development and usage of FFmpeg regularly on macOS and sent some patches to fix issues specific to Darwin in the past so I think it makes sense to add myself as maintainer so people know they can ping me if required, for Darwin specific issues/testing. I have both Intel and Apple Silicon (aarch64) machines as well as older Macs for testing on older macOS versions if necessary.
* swscale/internal: fix typo in loongarch specific codeMarvin Scholz2024-11-251-1/+1
| | | | Regression from 2d077f9acda4946b3455ded5778fb3fc7e85bba2
* avfilter/vf_scale: fix off-by-one in loop boundsNiklas Haas2024-11-251-2/+2
| | | | | | | | Results in over-read of the array. Fortunately, the excess element was never actually used, but it still triggers ASAN (and could in theory trigger a segfault). Fixes: 04ce01df0bb2d66e143bcfcea439afc2a1b8d96e
* MAINTAINERS: list csp.c and csp.h maintainersLeo Izen2024-11-251-0/+1
| | | | | | | | | Ronald S. Bultje wrote most of the code before there was a refactor and condense (which I mostly wrote). As such, listing both him and myself as maintainers of csp.h and csp.h, which previously had no maintainer listed at all (after conferring on IRC). Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avfilter/vf_scale: switch to new swscale APINiklas Haas2024-11-251-274/+77
| | | | | | | | | Most logic from this filter has been co-opted into swscale itself, allowing the resulting filter to be substantially simpler as it no longer has to worry about context initialization, interlacing, etc. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* tests/swscale: add a benchmarking modeNiklas Haas2024-11-251-25/+68
| | | | | | | | With the ability to set the thread count as well. This benchmark includes the constant overhead of context initialization. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* tests/swscale: rewrite on top of new APINiklas Haas2024-11-251-381/+284
| | | | | | | | | | | | | This rewrite cleans up the code to use AVFrames and the new swscale API. The log format has also been simplified and expanded to account for the new options. (Not yet implemented) The self testing code path has also been expanded to test the new swscale implementation against the old one, to serve as an unchanging reference. This does not accomplish much yet, but serves as a framework for future work. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale: introduce new, dynamic scaling APINiklas Haas2024-11-257-30/+276
| | | | | | | | | | | | | | | | | | | | | | | As part of a larger, ongoing effort to modernize and partially rewrite libswscale, it was decided and generally agreed upon to introduce a new public API for libswscale. This API is designed to be less stateful, more explicitly defined, and considerably easier to use than the existing one. Most of the API work has been already accomplished in the previous commits, this commit merely introduces the ability to use sws_scale_frame() dynamically, without prior sws_init_context() calls. Instead, the new API takes frame properties from the frames themselves, and the implementation is based on the new SwsGraph API, which we simply reinitialize as needed. This high-level wrapper also recreates the logic that used to live inside vf_scale for scaling interlaced frames, enabling it to be reused more easily by end users. Finally, this function is designed to simply copy refs directly when nothing needs to be done, substantially improving throughput of the noop fast path. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale/graph: add new high-level scaler dispatch mechanismNiklas Haas2024-11-253-0/+770
| | | | | | | | | | | | | | | | | | | | | | | This interface has been designed from the ground up to serve as a new framework for dispatching various scaling operations at a high level. This will eventually replace the old ad-hoc system of using cascaded contexts, as well as allowing us to plug in more dynamic scaling passes requiring intermediate steps, such as colorspace conversions, etc. The starter implementation merely piggybacks off the existing sws_init() and sws_scale(), functions, though it does bring the immediate improvement of splitting up cascaded functions and pre/post conversion functions into separate filter passes, which allows them to e.g. be executed in parallel even when the main scaler is required to be single threaded. Additionally, a dedicated (multi-threaded) noop memcpy pass substantially improves throughput of that fast path. Follow-up commits will eventually expand this to move all of the scaling decision logic into the graph init function, and also eliminate some of the current special cases. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale/internal: expose sws_init_single_context() internallyNiklas Haas2024-11-252-4/+7
| | | | | | | Used by the graph API swscale wrapper, for now. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale: organize and better document flagsNiklas Haas2024-11-253-51/+70
| | | | | | | | | | | | Group them into an enum rather than random #defines, and document their behavior a bit more obviously. Of particular note, I discovered that SWS_DIRECT_BGR is not referenced anywhere else in the code base. As such, I have moved it to the deprecated section, alongside SWS_ERROR_DIFFUSION. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale: eliminate redundant SwsInternal accessesNiklas Haas2024-11-257-208/+203
| | | | | | | | This is a purely cosmetic commit aimed at replacing accesses to SwsInternal.opts by direct access to SwsContext wherever convenient. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale: expose SwsContext publiclyNiklas Haas2024-11-255-119/+149
| | | | | | | | | | Following in the footsteps of the work in the previous commit, it's now relatively straightforward to expose the options struct publicly as SwsContext. This is a step towards making this more user friendly, as well as following API conventions established elsewhere. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* avformat/mm: add fallthrough commentPeter Ross2024-11-251-0/+1
| | | | Fixes CID 1634888
* fftools/ffmpeg_sched: signal the main thread when a task failsAnton Khirnov2024-11-251-9/+11
| | | | | | Avoids a useless -stats_period wait before exiting. Reported-by: names_are_hard
* fftools/ffmpeg_sched: rename mux_done_{lock,cond} into finish_*Anton Khirnov2024-11-251-12/+12
| | | | | Their semantics will be changed in the following commit to not be limited to muxing.
* MAINTAINERS: Remove Guillaume Poirier and Romain DolbeauMichael Niedermayer2024-11-251-1/+1
| | | | | | | | | Guillaume no longer has a PPC Romain has no time CC: Guillaume POIRIER <poirierg@gmail.com> CC: Romain Dolbeau <romain@dolbeau.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Disallow progressive bayer imagesMichael Niedermayer2024-11-251-0/+4
| | | | | | | Fixes: Null pointer dereference Fixes: sample1.dng Found-by: South East <8billion.people@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/icodec: fix integer overflow with nb_palMichael Niedermayer2024-11-251-1/+1
| | | | | | | | | | Fixes: runtime error: signed integer overflow Fixes: 42536949/clusterfuzz-testcase-minimized-fuzzer_loadfile-6199846684393472 Found-by: ossfuzz Reported-by: Kacper Michajlow Tested-by: Kacper Michajlow Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/codec_desc: remove Intra Only prop for AACJames Almer2024-11-242-3/+3
| | | | | | | | | | | xHE-AAC is a profile where some frames depend on other key frames, named IPF. By setting the codec as Intra Only, all frames output by decoders and all packets output by encoders/demuxers will be unconditionally flaged as keyframes, which is incorrect. Should fix ticket #11272. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mediacodecdec: set set keyframe flag in output framesJames Almer2024-11-241-0/+1
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libfdk-aacenc: set keyframe in output packetsJames Almer2024-11-241-0/+1
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libfdk-aacdec: set keyframe flag and profile in output framesJames Almer2024-11-241-2/+5
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/audiotoolboxnec: set set keyframe flag in output packetsJames Almer2024-11-241-0/+1
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/audiotoolboxdec: set set keyframe flag in output framesJames Almer2024-11-241-0/+2
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aacenc: set keyframe flag in output packetsJames Almer2024-11-241-0/+2
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aac/aacdec: set keyframe flag in output framesJames Almer2024-11-241-0/+2
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aac_parser: set key_frame and profileJames Almer2024-11-241-1/+8
| | | | | | This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: don't unconditionally set all audio packets in fragments as ↵James Almer2024-11-241-4/+1
| | | | | | | | key frames Some audio codecs, like TrueHD, have non key frames. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: set all frames in a keyframe simple box as keyframesJames Almer2024-11-241-1/+1
| | | | | | | And not just the first, as it was being done for lacing. The spec states that the flag applies to everything inside the simple box. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/test/movenc: set audio packets as key framesJames Almer2024-11-241-0/+1
| | | | | | | Don't depend on the generic code setting this. This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: write stss boxes for xHE-AACJames Almer2024-11-241-0/+1
| | | | | | This is in preparation for a following change. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/spdifdec: parse headers for audio codecsJames Almer2024-11-243-1179/+1181
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: fix unused variable warningMarvin Scholz2024-11-241-2/+1
| | | | | | The ctxi_dst variable is unused outside of the av_assert1, causing an unused variable warning. The simplest solution for this is to avoid the intermediate variable here.
* avformat/movenc: don't disable edit lists when writing CMAF outputJames Almer2024-11-221-8/+0
| | | | | | | | | They are needed for audio tracks with priming samples, where negative CTS offsets can't be used. Fixes ticket #11031. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: Populate packet duration using stts atom instead of guessingDarren Mo2024-11-2211-30/+182
| | | | | | Fixes tickets #7855 and #11312. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: rename MOVCtts.duration to offsetJames Almer2024-11-223-19/+20
| | | | | | The value is a timestamp offset, not a duration. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: add DVB descriptor_tag values already in useScott Theisen2024-11-221-0/+11
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/libfdk-aacenc: export CPB propertiesJames Almer2024-11-221-0/+9
| | | | | | | | Needed to signal the muxer that the stream is VBR. Finishes fixing ticket #11303. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: don't write a calculated avgBitrate when the provided one ↵James Almer2024-11-221-0/+3
| | | | | | | | | | | is unset avgBitrate == 0 is used to signal a VBR track, so if that value is propagated by an encoder, don't overwrite it with a calculated value based on track size. Part of a fix for ticket #11303. Signed-off-by: James Almer <jamrial@gmail.com>