aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/nvenc: add support for writing mastering metadata SEI messagesJames Almer2025-02-044-1/+91
| | | | | | | Including Mastering Display and Content Light Level. Requires SDK 13.0, and only supports HEVC and AV1. Signed-off-by: James Almer <jamrial@gmail.com>
* doc/ffmpeg: update example command line for IAMF muxingJames Almer2025-02-041-2/+2
| | | | | | Missed in 8f6a1a06a692f39abde24e09fecc3de26935657d. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVCJames Almer2025-02-042-0/+7
| | | | | | | Fixes compilation when using API headers older than 12.0 Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: log unsupported subtitle codec nameZhao Zhili2025-02-041-1/+2
| | | | | | | It's more user friendly than codec ID. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Marth64 <marth64@proxyid.net>
* avcodec/amfenc: redesign to use hwcontext_amf.Dmitrii Ovchinnikov2025-02-045-632/+306
| | | | | Co-authored-by: Evgeny Pavlov <lucenticus@gmail.com> v3: cleanup code
* doc/filters: Add documentation for AMF filtersEvgeny Pavlov2025-02-041-0/+236
| | | | Signed-off-by: Evgeny Pavlov <lucenticus@gmail.com>
* avfilter/scale_amf: Add AMF VPP & super resolution filtersEvgeny Pavlov2025-02-047-0/+1038
| | | | | | | | This commit adds two AMF filters: vpp_amf & sr_amf. Both filters are using AMF hardware acceleration. vpp_amf supports simple scaling algorithms & color conversion. sr_amf supports advanced scaling algorithms such as FSR & can be used for upscaling only.
* avcodec: add amfdec.Evgeny Pavlov2025-02-045-2/+790
| | | | | | | Added AMF based h264, hevc, av1 decoders. Co-authored-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com> v2: added encoder reinitialisation v3: use AMF_SURFACE_UNKNOWN to int decoder(ctx->output_format before)
* avutil: add hwcontext_amf.Dmitrii Ovchinnikov2025-02-049-0/+718
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds hwcontext_amf, enabling a shared AMF context for encoders, decoders, and AMF-based filters, without copy to the host memory. Code also was tested in HandBrake. Benefits: - Optimizations for direct video memory access from CPU - Significant performance boost in full AMF pipelines with filters - Integration of GPU filters like VPP, Super Resolution, and Compression Artefact Removal(in future plans) - VCN power management control for decoders. - Ability to specify which VCN instance to use for decoding (like for encoder) - AMD will soon introduce full AMF API for multimedia accelerator MA35D - With AMF API, integration will be much easier: GPU and the accelerator will have the same API - including encoder, decoder, scaler, color converter, Windows and Linux. Learn more: https://www.amd.com/en/products/accelerators/alveo/ma35d.html Changes by versions: v2: Header file cleanup. v3: Removed an unnecessary class. v4: code cleanup and improved error handling v5: Fixes related to HandBrake integration. v6: Sequential filters error and memory leak have been fixed.
* avformat/seek: Remove always true conditionZhao Zhili2025-02-041-12/+10
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/seek: Remove dead codeZhao Zhili2025-02-041-4/+0
| | | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Marth64 <marth64@proxyid.net>
* avcodec/nvenc: Enable recovery point SEI for intra refresh modeZhao Zhili2025-02-041-0/+2
| | | | | | | | Otherwise all frames can be dropped after seek without the output_corrupt/showall flags. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/speexdec: fix frame_size for mode == 2James Almer2025-02-031-3/+3
| | | | | | Should match the non-extradata path now, and fix ticket #11078. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_scale: remove global side data when it no longer applies after ↵James Almer2025-02-031-0/+10
| | | | | | scaling Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: remove accidental loop index variable resetJames Almer2025-02-031-2/+2
| | | | | | Fixes ticket #11442. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/x86/rgb2rgb: add AVX512ICL versions of shuffle_bytesShreesh Adiga2025-02-032-31/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | On a AMD 7950x Zen 4 shuffle_bytes_0321_c: 56.5 ( 1.00x) shuffle_bytes_0321_ssse3: 15.2 ( 3.70x) shuffle_bytes_0321_avx2: 10.2 ( 5.51x) shuffle_bytes_0321_avx512icl: 9.2 ( 6.11x) shuffle_bytes_1230_c: 84.5 ( 1.00x) shuffle_bytes_1230_ssse3: 14.2 ( 5.93x) shuffle_bytes_1230_avx2: 15.2 ( 5.54x) shuffle_bytes_1230_avx512icl: 11.2 ( 7.51x) shuffle_bytes_2103_c: 48.5 ( 1.00x) shuffle_bytes_2103_ssse3: 21.2 ( 2.28x) shuffle_bytes_2103_avx2: 13.8 ( 3.53x) shuffle_bytes_2103_avx512icl: 9.2 ( 5.24x) shuffle_bytes_3012_c: 84.5 ( 1.00x) shuffle_bytes_3012_ssse3: 14.2 ( 5.93x) shuffle_bytes_3012_avx2: 16.2 ( 5.20x) shuffle_bytes_3012_avx512icl: 10.2 ( 8.24x) shuffle_bytes_3210_c: 89.2 ( 1.00x) shuffle_bytes_3210_ssse3: 24.2 ( 3.68x) shuffle_bytes_3210_avx2: 16.2 ( 5.49x) shuffle_bytes_3210_avx512icl: 9.2 ( 9.65x) Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com>
* avcodec/h264dec: make slice header parse errors fatal under AV_EF_EXPLODEDale Curtis2025-02-021-1/+3
| | | | | | | | This fixes timeout issues and seems like it was intended since the line emits an error log. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Marth64 <marth64@proxyid.net>
* avcodec/mpeg12dec: rename 0x0502 CC formatScott Theisen2025-02-021-14/+14
| | | | | | | | | The format is used by at least Dish Network, but is not defined in any DVB standard, so remove references to DVB. This is a simple rename, no functional change. Signed-off-by: Marth64 <marth64@proxyid.net>
* avcodec/nvenc: finalize SDK 13.0 supportTimo Rothenpieler2025-02-022-3/+5
|
* avcodec/nvenc: use encoder level options for qmin/qmaxTimo Rothenpieler2025-02-025-19/+44
| | | | | | | | AV1 uses a vastly different range than what the global options permit, and also for the other codecs the range of the global options is at least misaligned. Fixes #11365
* avcodec/nvenc: add Temporal Filtering for AV1 and H.264 in NVENCDiego de Souza2025-02-024-1/+52
| | | | | | | | | This commit extends the support for Temporal Filtering in NVENC for AV1 and H.264 codecs. For natural videos with noise, NVENC temporal filtering improves video coding efficiency by 4-5%. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add UHQ to AV1 for NVENCDiego de Souza2025-02-022-1/+5
| | | | | | | | This commit adds support for Ultra High Quality mode for AV1 on NVIDIA GPUs. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add 4:2:2 encoding and H.264 10-bit supportDiego de Souza2025-02-023-6/+83
| | | | | | | | | This commit adds support for 4:2:2 encoding for HEVC and H.264 on NVIDIA Blackwell GPUs. Additionally, it supports 10-bit encoding for H.264 on Blackwell GPUs. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/cuviddec: add HEVC/H.264 4:2:2 and H.264 10-bit supportDiego de Souza2025-02-021-11/+72
| | | | | | | | | This commit adds support for 4:2:2 decoding for HEVC and H.264 on NVIDIA Blackwell GPUs for cuviddec. Moreover, it supports 10-bit decoding for H.264 on Blackwell GPUs. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvdec: add 4:2:2 decoding and 10-bit supportDiego de Souza2025-02-025-9/+51
| | | | | | | | | This commit adds support for 4:2:2 decoding for HEVC and H.264 on NVIDIA Blackwell GPUs. Additionally, it supports 10-bit decoding for H.264 on Blackwell GPUs. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avutil/hwcontext_cuda: add 4:2:2 pixel format supportDiego de Souza2025-02-021-0/+2
| | | | | | | | This commit adds support for 4:2:2 pixel formats, namely NV16 and P216 for NVIDIA GPUs. Signed-off-by: Diego de Souza <ddesouza@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* fftools/ffmpeg_opt: Remove audio_drift_thresholdAndreas Rheinhardt2025-02-021-1/+0
| | | | | | | Forgotten in 5a04aae82193d75b8f8814dc7e35f4cc84b1beba. Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/cpu: Disable ff_getauxval() on x86Andreas Rheinhardt2025-02-021-0/+2
| | | | | | Not used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/x86/swscale: Make M24 variables staticAndreas Rheinhardt2025-02-022-12/+12
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/x86/swscale: Move some constants to rgb2rgb.cAndreas Rheinhardt2025-02-022-15/+10
| | | | | | | | | ff_w1111 and ff_bgr2(Y|UV)Offset are only used there (and only on x86-32 since caaec2ea957290941eecfe5d87baf5c0a500b450). Also make them static. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavformat/hls: Be more restrictive on mpegts extensionsMichael Niedermayer2025-02-021-2/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: .ts is always ok even if its a mov/mp4Michael Niedermayer2025-02-021-0/+4
| | | | | | Maybe fixes: 11435 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libxvid: add check for invalid intra/inter matrix valuesMarton Balint2025-02-011-0/+4
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/alsa_dec: add a ch_layout optionJames Almer2025-02-013-5/+24
| | | | | | | | | | Missed in ffc4fd3cc2ccb2cadb71f19849842b18ca1281c6, which after e78173557da898f18a78241cc3525b76694164b5 broke setting channel count. Should fix ticket #11434. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h263dec: Check against previous dimensions instead of codedMichael Niedermayer2025-01-311-4/+9
| | | | | | | | | Fixes: out of array access Fixes: crash-a41ef3db699013f669b076f02f36942925f5a98c Found-by: Kacper Michajlow <kasper93@gmail.com> Reviewed-by: Kacper Michajlow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: Print input format in error messageMichael Niedermayer2025-01-311-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/filters: fix typo in format filterGyan Doshi2025-01-311-1/+1
| | | | | | The inline example for option color_ranges used 'color_spaces' Fixes #11441
* avcodec/jpegxl_parse{,r}: fix integer overflow for some malformed filesLeo Izen2025-01-302-10/+11
| | | | | | | | | | | | | | If there's a very large ISOBMFF box that needs to be skipped, it can cause an overflow for ctx->skip. There's already a safeguard to return quickly if ctx->skip > bufsize, so changing ctx->skip to int64_t will allow this to happen even if ctx->skip would overflow a signed int. Several other members are also changed to int64_t to avoid this problem in other possible scenarios. Signed-off-by: Leo Izen <leo.izen@gmail.com> Reported-by: Kacper Michajlow <kasper93@gmail.com> Fixes: clusterfuzz-testcase-minimized-fuzzer_loadfile-6085331937460224
* avcodec/hevc/hevcdec: Don't add to null pointerVitaly Buka2025-01-301-2/+3
| | | | | | | | | | | | | `POS(1,` and `POS(2,` may trigger UBSAN report: "runtime error: applying non-zero offset 304 to null pointer" Looks like values are not used without `chroma_format_idc`, so maybe there is no other issues than the UB. Can't reproduce with "fate". Signed-off-by: Vitaly Buka <vitalybuka@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: fix overflow in drift timestamp calculationJames Almer2025-01-301-1/+1
| | | | | | | Fixes: signed integer overflow: 7803923888585309955 - -3407677434275325337 cannot be represented in type 'int64_t' (aka 'long') Fixes: 377736723/clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5052449500889088 Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg_demux: don't print input error for AVERROR_EXITGyan Doshi2025-01-301-2/+3
| | | | | This error code is for expected exits, like after listing options for a device.
* avformat/vqf: fix memory leak in add_metadata()Kacper Michajłow2025-01-291-4/+4
| | | | Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* lavc/vvcdec: ensure slices contain nonzero CTUsNuo Mi2025-01-291-2/+9
| | | | | | fixes https://github.com/ffvvc/tests/tree/main/fuzz/passed/000323.bit Co-authored-by: Frank Plowman <post@frankplowman.com>
* lavc/vvcdec: remove unneeded VVCContext->pix_fmtNuo Mi2025-01-292-13/+6
| | | | | | AVCodecContext->sw_pix_fmt is used to hold the software pixel format. Co-authored-by: Frank Plowman <post@frankplowman.com>
* lavc/vvcdec: remove unneeded set_output_formatNuo Mi2025-01-291-21/+2
| | | | | | Downstream can determine the format from the output frame format Co-authored-by: Frank Plowman <post@frankplowman.com>
* avutil/frame: check return value for cropping offsetsLeo Izen2025-01-281-2/+7
| | | | | | | | This function can return AVERROR_BUG in theory if something went wrong, but so can the caller, so we should propagate that error message upward in that case. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avformat/id3v2: add image/webp for WebP attached picturesJan Ekström2025-01-281-0/+1
| | | | | | Found out to have been utilized via a user reporting an attached image not being available in a player utilizing avformat's demuxing capabilities.
* avutil/downmix_info: check for side data allocation success before zeroing itJames Almer2025-01-281-1/+2
| | | | | | | Fixes coverity #1641638. Marvin Scholz <epirat07@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* tests/checkasm/sw_rgb: increase plane array buffersJames Almer2025-01-281-9/+9
| | | | | | | Fixes stack-buffer-overflow errors running under asan. Reviewed-by: Marvin Scholz <epirat07@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* rtmpproto: Avoid rare crashes in the fail: codepath in rtmp_openMartin Storsjö2025-01-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running the cleanup in rtmp_close on failures in rtmp_open, we can in rare cases end up using rt->playpath, assuming that it is still set. The crash could happen if we hit the fail codepath in rtmp_open while publishing (rt->is_input == 0) with rt->state set to a value > STATE_FCPUBLISH. This would normally not happen while publishing; either we have an error (and rt->state <= STATE_FCPUBLISH) or we reach rt->state = STATE_PUBLISHING, and then we also return successfully from rtmp_open. The unexpected combination of states could happen if the server responds with e.g. "NetStream.Play.Stop" while expecting "NetStream.Publish.Start"; this sets rt->state to STATE_STOPPED, which also fulfills the condition "> STATE_FCPUBLISH". We don't need to free the rt->playpath/tcurl/flashver strings here; they're handled via AVOption, and thus are freed automatically when the protocol instance is freed (that's why they aren't freed manually within the rtmp_close function either). We also don't need to free the AVDictionary with options; it's owned by the caller. A smaller fix would be to just call rtmp_close before freeing the strings and dictionary, but as we don't need to free them at all, let's remove that redundant code. Signed-off-by: Martin Storsjö <martin@martin.st>