1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

119741 Commits

Author SHA1 Message Date
fc520ccb07 avcodec/pcm-dvdenc: Mark unreachable default cases as unreachable
Fixes a Clang warning when asserts are disabled:
"variable 'quant' is used uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]"

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 12:01:30 +02:00
7a27357636 avcodec/mpeg4videodec: Mark impossible switch case as unreachable
Alternative to 8fc649b931.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 11:36:09 +02:00
b5824a6dab avcodec/proresenc_anatoliy: Mark impossible case as unreachable
Alternative fix for fix Coverity issue 1440385 (instead of
6106177ad6).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 11:35:31 +02:00
fc9e2a92c1 avcodec/amrwbdec: Mark default switch as unreachable
Alternative fix for Coverity issue #1473499
instead of a3bb269db9.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 11:16:25 +02:00
004cc60f0e avutil/avassert: Add av_unreachable() and av_assume() macros
Useful to let the compiler and static analyzers know that
something is unreachable without adding an av_assert
(which would be either dead for the compiler or add runtime
overhead) for this.
The implementation used here enforces the use of a message
to provide a reason why a particular code is supposed to be
unreachable.

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 10:45:23 +02:00
b6f84cd72a avcodec/svq3: Improve returning last picture
Use av_frame_move_ref() instead of av_frame_ref().
This allows to remove the separate variable for whether
we have already returned the delayed last pic. It also
makes stream looping work when looping multiple times;
previously the delayed pic was only output the first time,
because last_frame_output was never reset.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
b98128898a tests/fate/qt: Use passthrough fps_mode for svq3-watermark
The file has buggy timestamps (it uses B-frames, yet pts==dts)
and therefore the last frame is currently discarded by FFmpeg cli.
Using -fps_mode passthrough avoids this and provides coverage
of the SVQ3 draining logic.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
f362a19096 avcodec/svq3: Allocate picture buffers during init
Also allocate them jointly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
b8ec4f7b20 avcodec/svq3: Allocate motion_val jointly
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
eacde6ee7b avcodec/svq3: Deduplicate allocating dummy frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
cb54eca41a avcodec/svq3: Improve returned error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
0468b866ca avcodec/svq3: Factor out decoding extradata
Reduces indentation and avoids an extra variable for whether
a sequence header has been found.
It also fixes potential undefined behaviour:
NULL + 0 is undefined and happens when no extradata is available.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:52 +02:00
0b3dae6c63 avcodec/mpeg12enc: Combine put_bits()
This is a 16bit field in the spec, so using a single
put_bits() to write it is more natural.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:22 +02:00
f5f890fee4 avcodec/mpeg12dec: Remove nonsense comment
Everything in mpeg12dec.c is about decoding.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:10:05 +02:00
562192e283 avcodec/mpeg12dec: Remove redundant save_width/height
These have been added in 29644cb504
in 2007 at a time when the MPEG-1/2 parser just set
the AVCodecContext's dimensions when encountering a sequence header,
so that the checks for the coded dimensions didn't trigger.
Yet this is no more and so we can simply remove these redundant checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:09:55 +02:00
56497671dd avcodec/mpeg12dec: Set save_chroma_format also for VCR2
Otherwise the MpegEncContext would be unnecessarily reinitialized
once (this does not affect the output for an intra-only variant
like VCR2) in mpeg_decode_postinit().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 03:09:45 +02:00
a1e4be5740 avcodec/mpegvideo_dec: Move ff_mpv_report_decode_progress() to h263dec.c
It is its only user. Also make it static and call it
before ff_mpeg_draw_horiz_band().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:54:22 +02:00
e12cbf6095 avcodec/tests/avcodec: Check only frame-mt decoders set update_thread_ctx
Possible since 554b52b1b3.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:44:15 +02:00
a6f7b32085 avcodec/ratecontrol: Fix wrong sizeof expression
Fixes Coverity issue #1644200.
Introduced in 89a8033fc9.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:44:06 +02:00
36af32f9e5 avcodec/tests/.gitignore: Add apv test tool
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:43:22 +02:00
bd63c374d2 avformat/avformat: Remove outdated io_close2 documentation
The io_close callback has been removed in
d6799ee0e4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:43:08 +02:00
66f5323652 avcodec/rv60dec: Avoid branch when decoding cbp16
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-21 02:41:55 +02:00
d5a9f7bdd4 avcodec/cuviddec: only flush cuvid when output queue is empty 2025-05-21 01:16:19 +02:00
431e2cae87 avcodec/cuviddec: print error when queueing frames fails 2025-05-21 01:15:29 +02:00
842fa198e9 hwcontext_vulkan: fix build with old Vulkan header versions 2025-05-21 03:11:07 +09:00
f414038779 configure: identify loong64 for loongarch
dpkg-architecture set DEB_HOST_ARCH_CPU as loong64 on loongarch.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-05-20 21:19:53 +08:00
1249776641 Makefile: Remove postproc from ALLFFLIBS
Fix
ld: warning: search path 'libpostproc' not found

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-05-20 21:17:43 +08:00
4f7bc62c66 avformat/allformats: Move avisynth and dvdvideo under external libraries group
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2025-05-20 21:17:28 +08:00
eabb62813e hwcontext_vulkan: only try exporting DMABUF memory on !WIN32 and only for DMABUF tiling 2025-05-20 19:53:02 +09:00
7c3c5c8052 hwcontext_vulkan: correct image transfer usage flags
By pure coincidence, BUFFER and IMAGE flags were equal for those
two usage types.
2025-05-20 19:53:02 +09:00
435db9bb49 vulkan: enable VK_KHR_shader_subgroup_rotate
Yet another thing that should've been always present.
2025-05-20 19:53:02 +09:00
7b45d9c5fd vulkan_ffv1: pipe through slice decoding status 2025-05-20 19:53:02 +09:00
cb8f4b675d vulkan/ffv1: unify encode and decode get/put primitives
This simply makes a get_rac/put_rac_internal variant that can be
reused.
2025-05-20 19:53:02 +09:00
7576410af7 ffv1enc_vulkan: implement RCT search for level >= 4 2025-05-20 19:53:01 +09:00
0156680f09 ffv1enc_vulkan: implement the cached EC writer from the decoder
This gives a 35% speedup on AMD and 50% on Nvidia.
2025-05-20 19:53:01 +09:00
a24ea37228 vulkan_ffv1: fix PCM + cached symbol reader
writeout_rgb requires that all subgroups are active.
2025-05-20 19:53:01 +09:00
f69db914ce ffv1enc_vulkan: use ff_get_encode_buffer
We used to create our own buffer, but still used the DR1 flag,
which is not how it's supposed to work.

Instead, use ff_get_encode_buffer, and either host-map the buffer
before copying each slice via GPU transfers, or just copy each
slice manually if that fails or is unavailable.
2025-05-20 19:53:01 +09:00
8a2d921627 ffv1_common: minor RGB optimization 2025-05-20 19:53:01 +09:00
bd41838b60 ffv1enc_vulkan: switch to 2-line cache, unify prediction code 2025-05-20 19:53:01 +09:00
52595025c5 ffv1enc_vulkan: minor EC optimizations 2025-05-20 19:53:01 +09:00
7c0a8c07ce ffv1enc_vulkan: unify EC code between setup and encode 2025-05-20 19:53:00 +09:00
69f83bafd1 ffv1enc_vulkan: get rid of temporary data for the setup shader 2025-05-20 19:53:00 +09:00
a4078abd73 vulkan/ffv1: synchronize get_pred implementations between encoder and decoder 2025-05-20 19:53:00 +09:00
ebbc7ff650 ffv1enc_vulkan: merge all encoder variants into one file
Makes it easier to work with, despite the heavy ifdeffery.
2025-05-20 19:52:55 +09:00
fd18ae88ae avcodec/x86/vp9: Add AVX-512ICL for 16x16 and 32x32 8bpc inverse transforms 2025-05-19 15:56:27 +02:00
b6803bf104 aarch64: increase default alignment for functions and constants
Use 16-byte alignment (align=4) instead of 4-byte (align=2) in the function and
const macros. This improves instruction fetch and NEON load performance on
modern AArch64 CPUs.
2025-05-19 13:20:51 +02:00
c55d65ac0a configure: correct liboapv feature support
Only encoding support has been added for liboapv
2025-05-19 15:21:33 +05:30
9c5ed57f94 ogg/opus: implement header packet skip in chained ogg bitstreams. 2025-05-19 07:24:05 +02:00
2fb6416dd0 ogg/flac: implement header packet skip in chained ogg bitstreams. 2025-05-19 07:24:05 +02:00
bd2dcfaed4 tests/fate/matroska: Add container cropping test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-05-19 03:21:27 +02:00