1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

117200 Commits

Author SHA1 Message Date
Nuo Mi
1b1ba7d4f2 avcodec/cbs_h266: Fix regression in DVB clip introduced by 93281630a71c06642adfebebb0d4b105a4e02e91
This commit introduced a regression to VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_mosaic.ts.

Root Cause:
The AV_CEIL_RSHIFT(a, b) macro uses bit tricks that work only when -a is a negative value.
However, due to integer promotion rules, this behavior does not extend to the unsigned int type.

See "6.3.1.1 Boolean, characters, and integers" in the "ISO/IEC 9899" for details.

Reported-by: Frank Plowman <post@frankplowman.com>
(cherry picked from commit c49001e338feb9d8537bb00de33b2a5725ea6028)
2024-11-11 12:05:30 -03:00
James Almer
baef55364f avcodec/x86/vvc: add prototypes for OF functions
And wrap the implemtation in preprocessor checks.
Should fix ticket #11282.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9ec042c1aaa64b5f6dff8be263feff4288c1844e)
2024-11-11 09:52:31 -03:00
Anton Khirnov
5120d30890 Document stream specifier syntax change from 46cbe4ab5c
Fixes #11248.

(cherry picked from commit 9e68b26765ca8396050f4b58d4b4fdc53943d35f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-09 02:52:57 +01:00
Leandro Santiago
367b7b546f fftools/ffplay: fix crash when vk renderer is null
When vulkan rendering is requested by the user and fails, ffplay should
exit graciously instead of crash due to a null pointer deref.

Signed-off-by: Leandro Santiago <leandrosansilva@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
(cherry picked from commit fd0cacc4720c68c58f86e41153444252dbd4e5b6)
2024-11-06 16:50:56 +08:00
Marton Balint
15035aaec0 avutil/wchar_filename: re-introduce explicit cast of void* to char*
Fixes compile error on windows with decklink:

In file included from ./libavformat/os_support.h:175,
                 from ./libavformat/internal.h:30,
                 from libavdevice/decklink_common.cpp:25:
./libavutil/wchar_filename.h: In function 'int wchartocp(unsigned int, const wchar_t*, char**)':
./libavutil/wchar_filename.h:59:32: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
   59 |     *filename = av_malloc_array(num_chars, sizeof **filename);
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |
      |                                void*

Regression since e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367.

Fixes ticket #11103.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 9b0128aa766221f8a32e13cf3c1d3e6d75a2d829)
2024-10-27 09:58:17 +01:00
Emily
9fbbd924f2 fate/ffmpeg: add samples dependency to fate-ffmpeg-spec-disposition
This test utilizes an MPEG-TS sample from FATE suite, yet was
marked as not requiring samples.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
(cherry picked from commit 3565903c638fb77d600d2983701b12300e695a5d)
2024-10-21 21:23:49 +03:00
Anton Khirnov
87ccf995cb fftools/ffmpeg_filter: treat apad filter as a source
Ideally lavfi should have a dedicated API for detecting this.

Fixes #11168 and #11061

(cherry picked from commit 9e2a231236428c4682c77858c6aabfd74f459b17)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-15 10:54:25 +02:00
Anton Khirnov
020d9f2b48 lavc/avcodec: fix global/private option precendence
Broken after 7753a9d62725d5bd8313e2d249acbe1c8af79ab1. Apply only the
whitelist early, and the rest with a single call to av_opt_set_dict2()
with AV_OPT_SEARCH_CHILDREN, which should be equivalent to the original
behaviour.

Reported-by: Cameron Gutman <aicommander@gmail.com>
(cherry picked from commit 9ce63e65d65b303813d4ae677228226d7cd232b9)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-15 10:53:50 +02:00
Nicolas Gaullier
32d3e67717 avfilter/framesync: fix forward EOF pts
Note1: when the EOF pts is not accurate enough, the last frame
can be dropped by vf_fps with default rounding.

Note2: vf_scale use framesync since e82a3997cdd6c0894869b33ba42430ac3,
so this is a very commonplace scenario.

For example:
./ffprobe -f lavfi testsrc=d=1,scale,fps -of flat \
  -count_frames -show_entries stream=nb_read_frames

Before:
streams.stream.0.nb_read_frames="24"

After:
streams.stream.0.nb_read_frames="25"

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit de976eaf30df33e86c58c8c9af9905c1d8441934)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-15 10:50:23 +02:00
Ingo Brückl
5c59d97e8a avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1
This adds VAAPIEncodeContext *ctx that has been removed
in aa82340b0ccdde4955fba41b8de5e45348ecd11d.

Signed-off-by: Ingo Brückl <ib@oddnet.de>
(cherry picked from commit 5557c673ea783a48e8b97c2b740b22eeeca6399b)
2024-10-12 09:13:33 +08:00
Martin Storsjö
0b5559378b libavcodec: x86: Remove an explicit include of config.asm
This file is never included explicitly anywhere else, it's only
included implicitly by passing -Pconfig.asm on the command line.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5c4ede6b4ff6fa8818f0ca3f686aa54c1c2092b8)
2024-10-11 14:40:30 +03:00
Martin Storsjö
c0d19c640a checkasm: lls: Use relative tolerances rather than absolute ones
Depending on the magnitude of the output values, the potential
errors can be larger.

This fixes errors in the lls tests on x86_32 for some seeds,
observed with GCC 11 (on Ubuntu 22.04, with the distro compiler,
with -m32).

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6668268e16b6d1a6992840dccb12effece2e7202)
2024-10-10 23:56:10 +03:00
Martin Storsjö
794245fa71 arm: Consistently use proper interworking function returns
Use "bx lr", or "pop {lr}", which do proper mode switching
between thumb and arm modes. A plain "mov pc, lr" does not switch
from thumb mode to arm mode (while in arm mode, it does switch
mode for a thumb caller).

This is normally not an issue, as CONFIG_THUMB only is enabled if
the C compiler defaults to thumb; but stick to patterns that can
do mode switching if needed, for consistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 77e6293735262b20a86b5047b77991a86cf4e9e1)
2024-10-10 23:56:10 +03:00
Gyan Doshi
63f5c007a7 avcodec/libx265: unbreak build for X265_BUILD >= 213
Earlier, x265 made an API change to support alpha and
other multiple layer pictures. We added guards to accommodate
that in 1f801dfdb5

They have now reverted that API change in
https://bitbucket.org/multicoreware/x265_git/commits/78e5b703b1

Updated our wrapper guards to unbreak build again.
2024-10-05 20:18:14 +05:30
Marvin Scholz
9b061291ad fftools: log unconnected filter output label
(cherry picked from commit f25c9cc213c7e3eb585d3339eb775b16921c4d98)
2024-10-04 11:34:59 -03:00
Marvin Scholz
e14a3a4b11 fftools: do not access out of bounds filtergraph
The log message was logged for `filtergraphs[j]` which would cause a
heap buffer overflow in certain circumstances.

Correctly it should be logged for the current filtergraph, so just
use `fg` here.

(cherry picked from commit 5beeb3a1f97d8f6d4076fe83aaf5e2e5871f945e)
2024-10-04 11:34:59 -03:00
Zhao Zhili
4c0ef3bfae avcodec/mediacodecenc: Fix access of uninitialized value
When crop is skipped, av_strlcatf will access `str` which isn't
initialized properly.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
(cherry picked from commit eff9ed7bff45998ea370e3d6f627529ad47e2e74)
2024-10-04 15:45:43 +08:00
Zhao Zhili
8be6e56a53 avformat/img2enc: Fix integer truncation when frame_pts is enabled
Fix #11194

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
(cherry picked from commit f56a54387b9cea884ca139e9cb993ff6989b8def)
2024-10-03 23:25:43 +08:00
Zhao Zhili
ff93c1898d avformat/internal: Add ff_get_frame_filename
It's similar to av_get_frame_filename2 but with int64_t number
support. Make av_get_frame_filename* a wrapper over
ff_get_frame_filename.

Co-authored-by: Filip Mašić <shoutplenty@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
(cherry picked from commit a2d9663241908d6f558b8e6b24bd42f2aaebc144)
2024-10-03 22:47:51 +08:00
James Almer
12682eba2e avformat/mov: don't return the latest stream when an item stream is expected
Otherwise, things like ICC profiles as read from the colr box meant for an item
with no stream (like a grid) may end up being added to the wrong stream.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 04182b55494b44152146e6a6bcd5eb9403f00625)
2024-09-30 17:28:44 -03:00
Michael Niedermayer
b08d7969c5
RELEASE_NOTES: Based on the version from 5.1
Name suggested by 3 people on ML

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n7.1
2024-09-29 18:47:04 +02:00
Michael Niedermayer
69cf68f5a0
Update for 7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-29 18:47:04 +02:00
Michael Niedermayer
0bad953cc5
avcodec/ffv1enc: Fix >8bit context size
Fixes: Ticket5405

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a9c83e43f2fc9128e20851291b0270add1a6b95f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-29 18:47:03 +02:00
Martin Storsjö
09e9d61d0a checkasm/sw_rgb: Revert test additions from e18b46d95fadcbaaf450bda9f1871849f2b0c586
The unaligned width test cases fail on i386; we have an assembly
function of rgb24toyv12 which is enabled only within
"#if ARCH_X86_32 && HAVE_7REGS", which seems to fail these new
test cases for unaligned widths.

As that assembly function has existed for a long time in that form,
the issue probably isn't very recent, thus skip testing these cases
for now.

Once the assembly function has been fixed, these test cases can
be readded.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 157ce21939771a8054b5effc05381fa30b825c1f)
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-09-29 14:23:06 +03:00
Marvin Scholz
ebd0ca9fee avdevice/decklink_dec: fix leaks on error
In case of errors in this function, the allocated context
was not properly freed in several cases.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 8e76c993013d6dd9382774d1716d8fe2421c42bd)
2024-09-29 10:30:49 +02:00
Marvin Scholz
963145483c avdevice/decklink_dec: fix leak on error
In the early return when both draw_bars and signal_loss_action
options are used, the context allocated previously was not
properly freed.

Introduced in 9bcb86b0fa58f1a5a2a8613065349e26abadb329

Fixes CID1619296

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 7554346cb5cf6e8863da12f9d56e300b08d6cc23)
2024-09-29 10:30:32 +02:00
Brad Smith
05ff3eb9f2 ppc: Recognize the PPC VSX and Power8 CPU flags
Signed-off-by: Brad Smith <brad@comstyle.com>
(cherry picked from commit 6ec6b0790021c5871016f57ac33d54bb6cab7a7d)
Signed-off-by: Brad Smith <brad@comstyle.com>
2024-09-30 09:08:11 -04:00
Anton Khirnov
d5c308fcc5 lavu/opt: avoid accidentally propagating spurious errors
An error from read_number() is non-fatal here and should not be
forwarded.

(cherry picked from commit 505fea34e53e0459d1ca6604a3f4737f0b90902c)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-28 17:14:14 +02:00
Anton Khirnov
55d0c353fe lavu/opt: add missing 'else'
(cherry picked from commit 9b764e9b491747aa85c47ecd210551ab001ca977)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-28 17:14:11 +02:00
Lynne
9ada04faa3
vulkan_encode_h265: fix rate control VBV values
The values written were placeholder values.

(cherry picked from commit 81c6e6c9eeb2ced02654631dbe83d342e6b59505)
2024-09-27 09:58:13 +02:00
Lynne
0482410818
vulkan_encode_h264: fix rate control VBV values
The values must be in milliseconds, not bytes.

(cherry picked from commit 934be0ff50fbe58aa44bc8a876f07195846d15ea)
2024-09-27 09:58:13 +02:00
James Almer
c21472ec31 avutil/iamf: fix doxygen
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit d55ab2ba9b16cabf1a069bcd6784e8d4906fc859)
2024-09-26 16:43:30 -03:00
James Almer
cb23275623 tests/fate/mov: fix rules for some tests
This was broken in 2fb2cd5c79fc0a01539e826530a195c3d6b78a17 and
74553f0026941de88286e821c9e0973206bdb1b5, making a simple make fate-mov fail
and most of the test not run with a simple make fate.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 8b4e32f30bd28222c45128a9935ed483ac90f414)
2024-09-24 21:10:40 -03:00
James Almer
f7643454aa avfilter/vf_showinfo: add missing break to ViewID case
Missed in 6940a6de2f047ceae414ddebaab30cd9fe35b020.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit fd6cc18d60cd1b61380324c13050b04285eb1fb4)
2024-09-24 16:09:05 -03:00
James Almer
2db706374e avcodec/hevc/sei: num_ref_displays can be up to 32
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-24 15:13:19 -03:00
James Almer
a6a346e154 avcodec/cbs_h265: num_ref_displays can be up to 32
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-24 15:13:18 -03:00
James Almer
00ce36d037 avcodec/cbs_h265: fix valid range for {left,right}_view_id
view_id_len in VPS is 4 bits, so view_id values can be up to 15 bits long.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-24 15:13:18 -03:00
Anton Khirnov
f459c56b0f tests/fate/hevc: use bitexact scaling flags for fate-hevc-mv-switch
Makes the results consistent across platforms.

(cherry picked from commit 9dc0edd4546bebfa451233b12548a8caa4a399ab)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-24 18:43:33 +02:00
Michael Niedermayer
e1094ac45d
*/version.h: bump minor versions for release/7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:07:30 +02:00
Michael Niedermayer
27c6f5f6d2
Changelog: Mark for 7.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:05:48 +02:00
Michael Niedermayer
10d8b6f17c
doc/APIchanges: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 17:05:28 +02:00
Michael Niedermayer
56bef2fd58
avcodec/xan: Add basic input size check
Fixes: Timeout
Fixes: 71739/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XAN_WC3_fuzzer-6170301405134848

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpe
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:20 +02:00
Michael Niedermayer
03050a0d90
avcodec/vble: Allocate buffer later
Fixes: Timeout
Fixes: 71727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VBLE_fuzzer-6126342574243840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:19 +02:00
Michael Niedermayer
5f471b500c
avcodec/sgirledec: Check input length
Fixes: Timeout
Fixes: 71712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGIRLE_fuzzer-5763700835811328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:19 +02:00
Michael Niedermayer
8367d7e184
avcodec/imm4: Check input size
Fixes: Timeout
Fixes: 71324/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IMM4_fuzzer-5388489435185152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:19 +02:00
Michael Niedermayer
050b5e85cb
avcodec/svq3: Check for minimum size input
Fixes: Timeout
Fixes: 71295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-4999941125111808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:18 +02:00
Michael Niedermayer
6190e82647
tools/target_swr_fuzzer: Limit the number of samples
Fixes: OOM and Timeout
Fixes: 71254/clusterfuzz-testcase-minimized-ffmpeg_SWR_fuzzer-5941896977907712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:18 +02:00
Michael Niedermayer
5ded752241
tools/target_dec_fuzzer: Add threshold for SRGC
Fixes: Timeout
Fixes: 71234/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SRGC_fuzzer-5098445864501248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:18 +02:00
Michael Niedermayer
c3a1cbbf5d
avcodec/eacmv: Check input size for intra frames
Fixes: Timeout
Fixes: 71135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EACMV_fuzzer-6251879028293632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:17 +02:00
Michael Niedermayer
9a823fbcfa
tools/target_dec_fuzzer: Adapt threshold for RASC
Fixes: Timeout
Fixes: 71108/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-4799330484027392

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-24 15:37:17 +02:00