1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2026-04-24 04:44:54 +02:00

124090 Commits

Author SHA1 Message Date
Ramiro Polla 08f56d4898 avcodec/webp: remove write-only lossless field from WebPContext 2026-04-23 16:46:42 +00:00
Ramiro Polla 9e8e82308b avcodec/webp: use av_fourcc2str() to print fourccs 2026-04-23 16:46:42 +00:00
Ramiro Polla 0cd2bbe4f4 avformat/apngdec: fix playback of piped apng files
The check for avio_size() made apng_read_header() return an error
instead of just disabling looping.
2026-04-23 16:46:21 +00:00
Ramiro Polla 2e92764b86 avformat/apngdec: remove unused function argument 2026-04-23 16:46:21 +00:00
Lynne 162ad61486 vulkan/ffv1: fix second-line linecache initialization for Golomb
This was a difficult problem to find.

Sponsored-by: Sovereign Tech Fund
2026-04-22 23:24:04 +02:00
Marvin Scholz 0c6b4ad5fc doc: add narrow variable scope in loops to style examples 2026-04-22 13:29:18 +00:00
jade 5242bdae82 avformat/id3v2: add image/jxl for JPEG XL image attachments
This allows JPEG XL images to be recognized as valid attachments.
Since JPEG is already widely used for cover art, JXL's support for
lossless JPEG transcodes can decrease the total size of music collections.
This fixes JXL cover art rendering in applications like mpv which rely
on FFmpeg for demuxing.

Signed-off-by: jade <heartstopp1ng@proton.me>
2026-04-22 13:28:17 +00:00
Marvin Scholz fc8d975b0b .forgejo/CODEOWNERS: fix incorrect username
The username does not exist, instead replaced it with the user
who authored the commit that added it.
2026-04-22 12:55:43 +00:00
Marvin Scholz d4cf7cf1cf lavfi: vf_drawtext: properly propagate errors
Do not ignore errors from draw_text().
2026-04-22 12:33:26 +00:00
Marvin Scholz 69072fe8d8 lavfi: vf_drawtext: check memory allocation
Switch to av_calloc and check the allocation.

Fix #22867
2026-04-22 12:33:26 +00:00
Lynne 117807510a vf_overlay_vulkan: port to compile-time SPIR-V generation 2026-04-22 12:45:45 +02:00
Lynne c7d3d3ac55 vf_blend_vulkan: port to compile-time SPIR-V generation 2026-04-22 12:45:45 +02:00
Lynne 4d6cd9f983 vf_scdet_vulkan: port to compile-time SPIR-V generation 2026-04-22 12:45:40 +02:00
Ashrit Shetty 9acd820732 avcodec/mfenc: populate video input type with size, rate, interlace
mf_encv_input_adjust() currently only validates the pixel format and
otherwise leaves the input IMFMediaType unchanged. The Microsoft
H.264, H.265 and AV1 encoder MFTs tolerate this and internally infer
the missing attributes from the previously-set output type. Other
MediaFoundation encoder MFTs that follow the specification more
strictly reject the input type with MF_E_INVALIDMEDIATYPE (due to
MF_E_ATTRIBUTENOTFOUND on MF_MT_FRAME_SIZE / MF_MT_FRAME_RATE) when
those attributes are absent, which causes IMFTransform::SetInputType
to fail and aborts encoding.

Set MF_MT_FRAME_SIZE, MF_MT_FRAME_RATE and MF_MT_INTERLACE_MODE on
the input media type, mirroring what mf_encv_output_adjust() already
writes to the output type. Behaviour on the Microsoft MFTs is
unchanged (they were already using these values) and encoding now
works with stricter third-party MFTs.

The MF_MT_FRAME_SIZE assignment has been present but commented out
since the original MediaFoundation wrapper was added in 050b72ab5e.

Signed-off-by: Ashrit Shetty <ashritshetty@microsoft.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-22 10:48:24 +03:00
Dmitrii Gershenkop d1d873c003 avfilter/vf_frc_amf: Add AMF Frame Rate Converter filter 2026-04-21 16:47:05 +00:00
Diego de Souza 0bba4603e2 avcodec/cuviddec: fix monochrome formats misclassified as YUV444
Monochrome formats (gray, gray10le) have log2_chroma_w == 0 and
log2_chroma_h == 0 because they have no chroma planes — the same
values as YUV444. This caused them to be misclassified as YUV444 by
the is_yuv444 detection introduced in bcea693f75.

After fed6612415 changed cuvid_test_capabilities to use is_yuv444
instead of hardcoding cudaVideoChromaFormat_420, monochrome AV1
streams were rejected with "Codec av1_cuvid is not supported with
this chroma format".

Add an nb_components > 1 guard to exclude single-component formats
from the YUV444 path.

Patch by: Aniket Dhok <adhok@nvidia.com>
Signed-off-by: Diego de Souza <ddesouza@nvidia.com>
2026-04-21 16:51:54 +02:00
Diego de Souza afc8556a6a avcodec/cuviddec: handle 4-byte AV1CodecConfigurationRecord
AV1CodecConfigurationRecord may contain only the 4-byte header and no
configOBUs. Still skip the header in that case so only configOBUs are
passed to cuvidParseVideoData().

Otherwise the av1C header itself is treated as sequence header data
and AV1 decoding can fail with an unknown error.

Suggested-by: Aniket Dhok <adhok@nvidia.com>
Signed-off-by: Diego de Souza <ddesouza@nvidia.com>
2026-04-21 14:03:58 +00:00
Paul Adenot 99d8d3891f avcodec: Allow enabling DTX in libopusenc 2026-04-21 13:38:44 +00:00
Víctor Manuel Jáquez Leal f4ac7dee87 avcodec/vulkan_encode_h265: fix capabilities flags
Replace the H264 ones.
2026-04-21 13:08:59 +00:00
Jun Zhao 75838b9c89 lavc/hevc: add aarch64 NEON for reference sample filtering
3-tap [1,2,1]>>2: shared implementation body across size-specialized
entry points (8x8/16x16/32x32) to reduce code size. Fold the 3-tap
kernel into uhadd + urhadd: uhadd gives floor((prev+next)/2), then
urhadd rounds with curr to produce (prev + 2*curr + next + 2) >> 2
on 16 bytes in-place (no widen/narrow needed). Overlap-last technique
for tail avoids partial stores. Caller pads input arrays by 16 bytes
to guarantee safe over-read.

Strong smoothing (32x32): preloaded weight tables, interleaved
umull/umlal pairs (two 16-byte blocks at a time) to hide
rshrn-to-store latency, with paired st1 for 32-byte writes.

checkasm --bench --runs=15 (Apple M4, average of 3 trials):
  ref_filter_3tap_8x8_8_neon:    4.1x
  ref_filter_3tap_16x16_8_neon:  3.3x
  ref_filter_3tap_32x32_8_neon:  2.5x
  ref_filter_strong_8_neon:      1.9x

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-04-21 07:50:49 +00:00
Jun Zhao 188757d43d tests/checkasm: add hevc_pred ref_filter_3tap and ref_filter_strong tests
Test 3-tap for 8x8/16x16/32x32 (both filtered_left and
filtered_top outputs). Test strong smoothing for filtered_top
and in-place left modification.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-04-21 07:50:49 +00:00
Jun Zhao a3d8e417c0 lavc/hevc: extract reference sample filter into function pointers
Extract 3-tap [1,2,1]>>2 and strong intra smoothing from
intra_pred() into HEVCPredContext function pointers, preparing
for arch-specific overrides.

ref_filter_3tap[3] indexed by log2_size - 3 (sizes 8/16/32).
ref_filter_strong for 32x32 luma only.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-04-21 07:50:49 +00:00
Lynne d3e915d6d1 vf_xfade_vulkan: remove unused includes 2026-04-21 09:39:54 +02:00
Lynne 6f811ad751 hwcontext_vulkan: implement internal queue synchronization 2026-04-21 08:34:47 +02:00
Lynne 8483de2858 chromaber_vulkan: switch to compile-time SPIR-V generation 2026-04-21 08:28:50 +02:00
Lynne 8001b19dc8 vf_gblur_vulkan: port to compile-time SPIR-V generation 2026-04-21 08:28:50 +02:00
Lynne ada9716172 vsrc_testsrc_vulkan: convert to compile-time SPIR-V generation 2026-04-21 08:28:50 +02:00
Lynne 4061e3351f vf_transpose_vulkan: convert to compile-time SPIR-V generation 2026-04-21 08:28:50 +02:00
Lynne d0ee5d0556 vf_flip_vulkan: convert to compile-time SPIR-V generation 2026-04-21 08:28:50 +02:00
Lynne 2f7d3290c0 vf_xfade_vulkan: convert to compile-time SPIR-V generation 2026-04-21 08:28:49 +02:00
Lynne f8f485fb3c vf_interlace_vulkan: convert to compile-time SPIR-V generation 2026-04-21 08:28:49 +02:00
Lynne d381151ae3 vulkan_filter: add an argument for setting the Z workgroup count 2026-04-21 08:28:45 +02:00
Zuxy Meng dc23adde9b avcodec/x86/h264_intrapred: Replace pred8x8_dc_8_mmxext with SSE2
Deprecating MMX w/o performance regression; nearly identical performance
numbers on my Zen 4 (1.99x vs c)

Signed-off-by: Zuxy Meng <zuxy.meng@gmail.com>
2026-04-20 19:38:56 -07:00
nyanmisaka c92304f8c7 avfilter: add transpose_cuda video filter
This patch adds the transpose_cuda video filter.
It's similar to the existing transpose filter but accelerated by CUDA.

It supports the same pixel formats as the scale_cuda filter.
This also supersedes the deprecated transpose_npp filter.

Example usage:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i <INPUT> -vf "transpose_cuda=dir=clock" <OUTPUT>

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2026-04-20 21:08:21 +02:00
Arien Shibani c67a4554d1 CONTRIBUTING.md: add blank line after top heading
Insert spacing after the first heading (MD022-style).
2026-04-20 12:32:50 +00:00
Arien Shibani 849e8307ce doc/transforms.md: add document title and fix heading structure
Add a top-level title and demote former section headings (MD041-style hierarchy).

Add blank lines around headings and fenced code blocks where appropriate (MD022 and MD031-style). Some Markdown parsers, including kramdown, only recognize headings that are preceded by a blank line.
2026-04-20 12:32:50 +00:00
Arien Shibani 6e3366e9bc INSTALL.md: add title heading and normalize section levels
Use a top-level heading on the first line (MD041-style) and adjust section levels for clearer document structure. Improves navigation for assistive technologies that rely on heading outlines.
2026-04-20 12:32:50 +00:00
Arien Shibani 519c80b626 README.md: use consistent ATX heading style
Align heading markers with markdownlint MD003 suggestions.
2026-04-20 12:32:50 +00:00
Andreas Rheinhardt 5e69e6d49c avformat/pdvenc: Don't silently truncate value
This muxer seems to intend to support output that does
not begin at zero (instead of e.g. just hardcoding
nb_frames_pos to 16). But then it is possible
that avio_seek() returns values > INT_MAX even
though the part of the file written by us can not
exceed this value. So the return value of avio_seek()
needs to be checked as 64bit integer and not silently
truncated to int.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:54:31 +02:00
Andreas Rheinhardt 2b8438a495 avformat/pdvenc: Remove always-false checks
The number of streams is always one (namely one video stream
with codec id AV_CODEC_ID_PDV) due to the MAX_ONE_OF_EACH,
ONLY_DEFAULT_CODECS flags. Also, the generic code (init_muxer()
in mux.c) checks that video streams have proper dimensions set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:54:31 +02:00
Andreas Rheinhardt 6135ccbf80 avcodec/pdvenc: Return directly upon error
This encoder has the FF_CODEC_CAP_INIT_CLEANUP cap set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:54:31 +02:00
Andreas Rheinhardt 87a6be19f8 avcodec/pdvenc: Remove always false check
av_image_check_size() already checks that width*height
fits into an int.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:54:31 +02:00
Andreas Rheinhardt c94cb9c04f avcodec/pdvenc: Remove always-false pixel format check
Already checked via CODEC_PIXFMTS.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:54:31 +02:00
Andreas Rheinhardt e908c92f5a avcodec/cavs: Don't allocate block separately
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-20 12:21:41 +02:00
Jeongkeun Kim de18feb0f0 avutil/aarch64: add pixelutils 32x32 SAD NEON implementation
This adds a NEON-optimized function for computing 32x32 Sum of Absolute
Differences (SAD) on AArch64, addressing a gap where x86 had SSE2/AVX2
implementations but AArch64 lacked equivalent coverage.

The implementation mirrors the existing sad8 and sad16 NEON functions,
employing a 4-row unrolled loop with UABAL and UABAL2 instructions for
efficient load-compute interleaving, and four 8x16-bit accumulators to
handle the wider 32-byte rows.

Benchmarks on AWS Graviton3 (Neoverse V1, c7g.xlarge) using checkasm:
  sad_32x32_0: C 146.4 cycles -> NEON  98.1 cycles (1.49x speedup)
  sad_32x32_1: C 141.4 cycles -> NEON  98.9 cycles (1.43x speedup)
  sad_32x32_2: C 140.7 cycles -> NEON  95.0 cycles (1.48x speedup)

Signed-off-by: Jeongkeun Kim <variety0724@gmail.com>
2026-04-19 19:27:55 +00:00
llyyr 4af27ba4ca doc/APIchanges: fix date and version in latest entry
This incorrectly lists the libavcodec major version as 60 instead of
62. Also fix the date and commit hash while at it

Fixes: 7faa6ee2aa ("libavformat/matroska: Support smpte 2094-50 metadata")

Signed-off-by: llyyr <llyyr.public@gmail.com>
2026-04-19 15:37:33 +00:00
Romain Beauxis 82d7e375f1 libavdevice/alsa.c: fix NULL pointer dereference 2026-04-19 15:00:08 +00:00
Andreas Rheinhardt 415b466d41 avcodec/x86/vp3dsp: Port ff_vp3_idct_dc_add_mmxext to SSE2
This change should improve performance on Skylake and later
Intel CPUs (which have only half the ports for saturated adds/subs
for mmx register compared to xmm register): llvm-mca predicts
a 25% performance improvement on Skylake.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-19 08:21:17 +02:00
Andreas Rheinhardt e7a613b274 avcodec/x86/vp3dsp: Avoid loads and stores
Instead reuse values in registers.

Old benchmarks:
idct_add_c:                                             74.2 ( 1.00x)
idct_add_sse2:                                          60.4 ( 1.23x)
idct_put_c:                                            100.8 ( 1.00x)
idct_put_sse2:                                          58.7 ( 1.72x)

New benchmarks:
idct_add_c:                                             74.2 ( 1.00x)
idct_add_sse2:                                          55.2 ( 1.34x)
idct_put_c:                                            107.5 ( 1.00x)
idct_put_sse2:                                          54.1 ( 1.99x)

Hint: For x64, all the intermediate stores could be avoided.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-19 08:21:17 +02:00
Andreas Rheinhardt ed59fc77e8 avcodec/x86/vp3dsp: Use named args in idct functions
Also avoid REX prefixes while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-04-19 08:21:17 +02:00