Commit Graph

122337 Commits

Author SHA1 Message Date
Andreas Rheinhardt
f02f948ed0 avcodec/wmv2dsp: Modify IDCTDSPContext directly
This allows to remove ff_wmv2_common_init() altogether.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:39:48 +01:00
Andreas Rheinhardt
34c9438bbe avcodec/wmv2dsp: Move mspel motion functions out of WMV2DSPContext
They are only used by the decoder (which has them twice, because
the IntraX8Context contains a WMV2DSPContext whose put_mspel_pixels
functions were unused), so move them there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:39:48 +01:00
Andreas Rheinhardt
956bfec115 avcodec/wmv2: Move ff_msmpel_motion() to the decoder
mspel is not supported by the encoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:39:48 +01:00
Andreas Rheinhardt
70b58e770d avcodec/msmpeg4: Mark unreachable code as unreachable
Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:39:22 +01:00
Andreas Rheinhardt
1674ff14e9 avcodec/wmv2dec: Mark unreachable code as unreachable
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:30:43 +01:00
Andreas Rheinhardt
224473b676 avcodec/wmv2dec: Don't put skip_type in context
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:30:43 +01:00
Andreas Rheinhardt
11b32b780f avcodec/msmpeg4: Avoid branch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:30:43 +01:00
Andreas Rheinhardt
4f4cbed928 avcodec/msmpeg4: Initialize WMV2 generically
WMV1 and WMV2 use other scantables and therefore
ff_msmpeg4_common_init() reinitializes them. Yet WMV2
also uses a different IDCT overwriting the ordinary one,
so that the IDCT permutation changes and therefore
ff_wmv2_common_init() (called after ff_msmpeg4_common_init())
needs to reinitialize the scantables again.

Avoid this by calling ff_wmv2_common_init() in
ff_msmpeg4_common_init().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:30:43 +01:00
Andreas Rheinhardt
15e1e61888 avcodec/wmv2: Don't initialize BlockDSPContext redundantly
ff_mpv_common_init() already does it for us.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 18:30:43 +01:00
Andreas Rheinhardt
0e4a333683 tests/fate/checkasm: Run vf_idet tests during FATE
Forgotten in 00e05bcd68.

Reviewed-by: Niklas Haas <ffmpeg@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2026-01-02 16:58:55 +00:00
Timo Rothenpieler
e6184bce67 forgejo/workflows: explicitly name all workflows and jobs 2026-01-02 16:56:03 +00:00
Zhao Zhili
85b5927083 avfilter/vf_libopencv: fix null pointer dereference
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-02 23:46:42 +08:00
Zhao Zhili
35eebc5045 avfilter/vf_libopencv: use av_unreachable
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-02 23:46:19 +08:00
Zhao Zhili
4d46eeed02 avfilter/vf_libopencv: fix memleak
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2026-01-02 23:45:52 +08:00
Ramiro Polla
ee5d6e7ee1 avcodec/jpeglsdec: propagate error from ff_jpegls_decode_picture()
Fixes fe7fbf3a22
2026-01-01 23:57:08 +00:00
Marton Balint
8579037b6c avformat/file: respect pkt_size even in streaming mode
Also clarify the documentation a bit.

Signed-off-by: Marton Balint <cus@passwd.hu>
2026-01-01 18:20:58 +00:00
Russell Greene
38e89fe502 hwcontext_vulkan: add support for implict DRM sync for export
When a frame is exported to DRM, it may be written to to read to in an asyncronous fashion. Make sure, on unmap of a Vulkan frame that was mapped to DRM, to import any fences that were put on the dmabuf
2025-12-31 15:53:20 +00:00
Timo Rothenpieler
f6a95c7eb7 avformat/img2dec: reject input images too big to fit into a single packet
Not entirely sure if it should instead use some entirely different
approach here, given that images exceeding 2GB don't seem that crazy
to me, but so far processing such images results in a heap overflow,
since the size addition overflows and a much too small packet is
allocated and its size never checked again when writing into it.

Fixes #YWH-PGM40646-32
2025-12-31 14:37:58 +00:00
Lynne
58bd5ad630 vulkan/prores_raw_idct: use the same prores_idct method for loading coeffs
This saves 2 barriers.
Also implement workbank avoidance.
2025-12-31 15:00:47 +01:00
Lynne
7f2783dcef vulkan_prores_raw: avoid long lines
Just some tidying up.
2025-12-31 15:00:47 +01:00
Lynne
c3530d9a70 vulkan: remove FFVkBuffer.stage and access
Keeping global state for every buffer is unncessary and possibly
suboptimal.
2025-12-31 15:00:47 +01:00
Lynne
c3e117670d vulkan_prores: use ff_vk_buf_barrier() 2025-12-31 15:00:47 +01:00
Lynne
f956e9817c ffv1enc_vulkan: use ff_vk_buf_barrier() 2025-12-31 15:00:46 +01:00
Lynne
9ab3e962b4 nlmeans_vulkan: use ff_vk_buf_barrier() 2025-12-31 15:00:46 +01:00
Lynne
eeeae0e0af vulkan_ffv1: use ff_vk_buf_barrier() 2025-12-31 15:00:46 +01:00
Lynne
95baff9b61 vulkan: add ff_vk_buf_barrier()
This is a shorthand way of writing buffer barrier structures.
2025-12-31 15:00:46 +01:00
Lynne
b7d2469e4c vulkan_functions: add vkCmdDispatchBase
Its useful for multi-stage operations.
2025-12-31 15:00:46 +01:00
Lynne
9f3a04d2f6 vulkan: use HOST_CACHED memory flag only if such a heap exists
NVK does not offer such, so our code failed to allocate memory.
2025-12-31 15:00:46 +01:00
Lynne
bb30126349 hwcontext_vulkan: enable the explicit shader workgroup extension
Its useful as it allows us to alias memory in shaders.
2025-12-31 15:00:45 +01:00
Lynne
d70c6cb511 hwcontext_vulkan: enable subgroup extended types
We were already using them, but had forgotten to enable them.
2025-12-31 15:00:12 +01:00
Kacper Michajłow
eea648ef1d avutil/hwcontext_vulkan: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
Kacper Michajłow
20ac8c3688 avfilter/vulkan_filter: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
Kacper Michajłow
0a8b915b04 avcodec/vulkan_decode: fix logic error when checking for encode support
Both FF_VK_EXT_VIDEO_ENCODE_QUEUE and FF_VK_EXT_VIDEO_MAINTENANCE_1 are
required, not only one of them.

Found by VVL.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-12-31 10:30:36 +00:00
hajin-chung
991ba3fbac avcodec/qsvdec: fix refcount leak in two-stage QSV init
The temporary hw_frames_ctx created for header parsing was not being
fully released, leading to a leak. Explicitly unreference the temporary
context after use to resolve the leak.

Signed-off-by: hajin-chung <hajinchung1@gmail.com>
2025-12-31 08:06:48 +00:00
Leo Izen
4bfac71ecd avcodec/exif.c: avoid buffer overflow with extra IFDs
Maliciously constructed input EXIF blocks could use the extra IFDs we
set aside in noncontinugous ways, which will cause them to be written
as subdirectories of IFD0 rather than existing IFDs. The base tag size
is (correctly) excluded from the size calculation, but if they are
being written as additional tags, the allocation will be too small and
a write may overflow.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-12-30 20:43:49 -05:00
James Almer
d7ee7ac20f avutil/iamf: remove default value from demixing_matrix_def
It's not required sice the previous commit, and fixes memleaks introduced by
a6e5fa3fbb.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-30 20:15:32 -03:00
James Almer
c6e7243f11 avutil/opt: fix av_opt_is_set_to_default() for array options with no default value
If AVOptionArrayDef.def is NULL, av_opt_is_set_to_default() should return true
when the field in the object is NULL.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-30 20:14:56 -03:00
Benjamin Cheng
2298978b47 hwcontext_vulkan: Remove unnecessary validation filters
With the latest changes, I can no longer get these to show up.
2025-12-30 14:39:19 -05:00
Benjamin Cheng
531e184944 lavc/vulkan_video: Drop sampler
With the limiting of video usages on the image views, we no longer need
a yuv sampler, since no multi-plane image will be created with the
SAMPLED usage bit.
2025-12-30 14:39:08 -05:00
Benjamin Cheng
b8de254e8c lavc/vulkan_video: Restrict usages for image views
These image views are used only internally for video coding, so they do
not need all the usages of the image it's created from.
2025-12-30 14:38:37 -05:00
Benjamin Cheng
24db09a881 lavc/vulkan_video: Restrict usages for image views
These image views are used only internally for video coding, so they do
not need all the usages of the image it's created from.
2025-12-30 14:15:46 -05:00
Benjamin Cheng
e41e21a1ec avutil/hwcontext_vulkan: Limit usages for lone DPBs
Lone DPBs will only be requested when the implementation requires
a separate DPB. These images are never given out, and are never used for
anything other than a DPB. Also most implementations requiring these
won't support any other usages on DPBs, so limiting the usages would fix
some validation errors.
2025-12-30 14:15:43 -05:00
Ramiro Polla
aa80a7880b avcodec/jpegls: rename SOF48 to SOF55
SOF48 (0xf0) was used in a public draft of the standard (FCD 14495).
In the final specification it is called SOF55 (0xf7).
2025-12-30 17:30:45 +00:00
Frank Plowman
72a38c12e5 lavc/vvc: Prevent OOB write to slice_top_left_ctu_x in PPS CBS
Prior to the fix, in the case of a tile containing multiple slices
(pps_num_exp_slices_in_tile != 0) the number of slices was temporarily
allowed to exceed pps_num_slices_in_pic_minus1+1 and therefore
VVC_MAX_SLICES.  The number of slices was later verified, but while the
current slice index was higher than expected it was used to write to a
array of size VVC_MAX_SLICES, leading to an OOB write.

To rectify this, the patch adds some checks at an earlier stage, to
ensure that the slice index i + j at no point exceeds
pps_num_slices_in_pic_minus1.

Fixes #YWH-PGM40646-30
2025-12-30 13:39:40 +00:00
Zhao Zhili
ee2eb6ced8 fftools/ffmpeg_filter: fix access private API of libavcodec
Firstly, mathops.h is a private header of libavcodec and should not be used
in fftools. It may reference libavcodec internal symbols, causing link
error with dynamic library, e.g.,

fftools/ffmpeg_filter.c:2687: undefined reference to `ff_rv_zbb_supported'

Secondly, mid_pred operates on int types, while current use case is
int64_t.
2025-12-30 07:40:15 +00:00
caifan3
82144fea48 libavformat/file: apply pkt_size option to read mode
Previously, the pkt_size option only affected write buffering in the file
protocol. This change extends its effect to read mode as well.

On embedded systems with limited RAM, users can now reduce I/O buffer
memory by setting a smaller pkt_size.

Signed-off-by: caifan3 <caifan3@xiaomi.com>
2025-12-30 00:49:13 +00:00
Ramiro Polla
7dda7f3b99 avcodec/mjpegdec: speed up find_marker()
Minimize number of reads and simplify conditionals.

Also use memchr(), as suggested by Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-12-29 21:44:07 +00:00
Ramiro Polla
254124f869 avcodec/mjpegdec: fix some error return codes 2025-12-29 17:22:34 +01:00
James Almer
6223b7fa0b tests/fate/iamf: add tests for Projection mode ambisonic Audio Elements
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-29 12:02:53 -03:00
James Almer
9c5a37388b fftools/ffprobe: print demixing_matrix in Projection mode ambisonic IAMF Audio Element groups
Signed-off-by: James Almer <jamrial@gmail.com>
2025-12-29 12:02:40 -03:00