Michael Niedermayer
805931dfc8
avfilter/scale_eval: Avoid undefined behavior with double to int cast
...
We use INT32_MIN/MAX so as to ensure we dont have to deal with 64bit width or height
on a int is int64 system. int64 width would overflow in a system where we assume the product of 2
values fit in int64
Fixes: #YWH-PGM40646-14
Found-by: An0n99X
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-13 22:25:53 +00:00
Michael Niedermayer
5bbc8f828e
avfilter/scale_eval: Use 64bit for factor_w/h
...
Avoids truncation and overflows
Fixes: #YWH-PGM40646-14
Found-by: An0n99X
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-13 22:25:53 +00:00
Michael Niedermayer
23c8123d5b
avformat/http: Check white and blacklists on redirects
...
Noticed while fixing the previous
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-13 21:56:14 +00:00
Michael Niedermayer
b9227d49ea
avformat/http: Check that the protocol of redirects is http or https
...
Fixes: #YWH-PGM40646-10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-13 21:56:14 +00:00
James Almer
80a3ba7d79
configure: add missing vulkan_1_4 check
...
Removed in f2affdfafb by mistake.
Also, fix the logic in probe_glslc() so it doesn't return false when debug is disabled.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-01-13 13:28:23 -03:00
James Almer
f897bcd122
configure: fix glslc checks and add missing dependencies to relevant modules
...
Signed-off-by: James Almer <jamrial@gmail.com >
2026-01-12 18:20:01 -03:00
Lynne
ab66bc5776
Makefile: add missing vpath for glsl/spv
...
Similar to CUDA. Fixes building on some systems.
2026-01-12 19:18:36 +01:00
Michael Niedermayer
7e9f99ef41
doc/mailing-list-faq.texi: Fix typo in link anchor
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-12 18:00:14 +00:00
Michael Niedermayer
aa0a3e6223
.forgejo/CODEOWNERS: get notified for vf_find_rect
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-12 17:50:30 +00:00
Lynne
80229c161b
scale_vulkan: use compile-time SPIR-V generation for debayering
2026-01-12 17:28:43 +01:00
Lynne
f2a55af9a4
vulkan_dpx: switch to compile-time SPIR-V generation
2026-01-12 17:28:43 +01:00
Lynne
0f4667fc11
vulkan_prores_raw: clean up and optimize
2026-01-12 17:28:42 +01:00
averne
771b58c0b6
vulkan/prores: fix buffer alignments
2026-01-12 17:28:42 +01:00
Lynne
23ab1b1a66
vulkan/dct: embed DCT scaling values during SPIR-V generation
...
Instead of relying on rounded off values, use specialization constants
to bake the DCT values into the shader when its compiled.
2026-01-12 17:28:42 +01:00
Lynne
e27b510da8
vulkan_prores: generate SPIR-V at compile-time
2026-01-12 17:28:42 +01:00
Lynne
026e94e339
vulkan_prores_raw: use compile-time SPIR-V generation
2026-01-12 17:28:42 +01:00
Lynne
f3b0ca4f2c
avgblur_vulkan: generate SPIR-V during compilation
2026-01-12 17:28:42 +01:00
Lynne
a6391168f2
bwdif_vulkan: use compile-time SPIR-V
2026-01-12 17:28:42 +01:00
Lynne
e32cb94258
hwcontext_vulkan: enable long vector extension
...
This enables us to do some neat tricks.
2026-01-12 17:28:41 +01:00
Lynne
95a23820f7
hwcontext_vulkan: enable non-uniform features we were already using
2026-01-12 17:28:41 +01:00
Lynne
cf0ce1b7e4
hwcontext_vulkan: enable the VK_EXT_shader_replicated_composites extension
...
Its required to use certain features in SPIR-V that glslang uses.
2026-01-12 17:28:41 +01:00
Lynne
dd69ebc9a8
vulkan_filter: don't use lg_size[2] as the number of workgroup.z
...
This was put there because who knows why, but it's wrong, this
ends up having double dispatches in the z direction if non-1.
2026-01-12 17:28:41 +01:00
Lynne
e844b43776
vulkan: support shader compression
2026-01-12 17:28:41 +01:00
Lynne
7ce22b085e
cuda/load_helper: move zlib decompression into a separate file
...
Allows it to be reused for Vulkan
2026-01-12 17:28:41 +01:00
Lynne
35235c762c
configure: add zlib to suggests for shader_compression
2026-01-12 17:28:40 +01:00
Lynne
5996a9ad3d
configure: rename PTX_COMPRESSION to SHADER_COMPRESSION
...
Its useful for GLSL and Metal as well.
2026-01-12 17:28:40 +01:00
Lynne
540c4df5c7
vulkan: add support for precompiled shaders
2026-01-12 17:28:40 +01:00
Lynne
f2affdfafb
configure/make: support compile-time SPIR-V generation
2026-01-12 17:28:40 +01:00
Lynne
17f9a64860
configure: rename spirv_compiler to spirv_library
...
More accurate.
2026-01-12 17:28:40 +01:00
Lynne
f11aa29df8
configure: remove unused X86ASM dependency flag variables
2026-01-12 17:28:40 +01:00
Lynne
40edf7d75d
vulkan: switch to static allocation for temporary descriptor data
...
Simplifies management, and the hardware is limited to 4 descriptor sets
and whatever bindings.
2026-01-12 17:28:35 +01:00
Soham
ecfabc25c2
avcodec/get_bits: mark unused VLC parameters
...
This commit marks unused parameters in get_vlc_multi() to fix
-Wunused-parameter warnings when building with -Wall/-Wextra.
No functional changes intended.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-12 14:03:25 +01:00
stevxiao
21a3e44fbe
avcodec/d3d12va_encode: add Region of Interest (ROI) support
...
This commit implements ROI (Region of Interest) encoding support for D3D12VA hardware encoders, enabling spatially-adaptive quality control for H.264, HEVC, and AV1 encoders.
Query for `D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_DELTA_QP` support during initialization to check whether the hardware support delta QP. If delta QP is supported, then process `AV_FRAME_DATA_REGIONS_OF_INTEREST` side data and generate delta QP maps for each frame.
Sample command line:
ffmpeg.exe -hwaccel d3d12va -hwaccel_output_format d3d12 -i input.mp4 -vf addroi=x=480:y=270:w=960:h=540:qoffset=-1/5 -c:v hevc_d3d12va output.mp4
2026-01-12 02:45:48 +00:00
Michael Niedermayer
f99df7dbb3
avfilter/vf_find_rect: Fix handling odd sized images
...
Fixes: out of array read
Fixes: #YWH-PGM40646-17
Found-by: An0n99X
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-01-12 02:05:11 +00:00
Raja Rathour
06d799ce1a
avfilter/dnn_backend_torch: handle lifecycle of worker thread
...
Initialize async resources in dnn_load_model_th and ensure proper cleanup and thread joining in dnn_free_model_th.
Signed-off-by: Raja Rathour <imraja729@gmail.com >
Reviewed-by: Wenbin Chen <wenbin.chen@intel.com >
Reviewed-by: Guo Yejun <yejun.guo@intel.com >
2026-01-12 08:53:42 +08:00
Raja Rathour
5e8ad5c39b
avfilter/dnn_backend_torch: implement async execution logic
...
Update execute_model_th to support asynchronous execution by pushing tasks to the pending queue and notifying the worker thread.
Signed-off-by: Raja Rathour <imraja729@gmail.com >
Reviewed-by: Wenbin Chen <wenbin.chen@intel.com >
Reviewed-by: Guo Yejun <yejun.guo@intel.com >
2026-01-12 08:53:42 +08:00
Raja Rathour
910270b179
avfilter/dnn_backend_torch: add async infrastructure
...
Add worker thread, mutex, and condition variable to THModel.
Signed-off-by: Raja Rathour <imraja729@gmail.com >
Reviewed-by: Wenbin Chen <wenbin.chen@intel.com >
Reviewed-by: Guo Yejun <yejun.guo@intel.com >
2026-01-12 08:53:42 +08:00
James Almer
cd03e0a001
libavformat/evcdec.c: add a check to ensure evc_frame_merge_bsf is present
...
While the inclusion of the bsf is forced by a configure check, it's better to not
just have the code here assume filter will never be NULL.
Fixes Coverity issue CID 1680305.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-01-12 01:43:21 +00:00
Marton Balint
96e8f3b8cc
avformat/vorbiscomment: fix writing huge chapter numbers and time offets to vorbiscomment
...
Previous code truncated chapter numbers more than 999 and and time offsets more
than 99 hours.
The Vorbis comment format only allows 1000 chapters, so cap the number of
written chapters there.
This also fixes the GCC warnings for truncated strings.
Signed-off-by: Marton Balint <cus@passwd.hu >
2026-01-12 00:47:20 +01:00
Marton Balint
b2e077ad69
avformat/vorbiscomment: use null buf to calculate vorbis comment length
...
Also check possible failures when calculating length, and change return type to
int as bigger return values are no longer possible.
2026-01-12 00:47:20 +01:00
Marton Balint
c80d3b35ae
avformat/aviobuf: return error for ffio_close_null_buf() if written bytes exceed INT_MAX
...
Also check return value where it is used.
Signed-off-by: Marton Balint <cus@passwd.hu >
2026-01-12 00:47:20 +01:00
James Almer
af136db1c3
avfilter/vf_lcevc: attach a reference to the source frame to each passed in base picture
...
And free them once they are guaranteed to be no longer needed, instead of freeing them
when returned with an enhanced output.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-01-11 17:59:15 -03:00
James Almer
188521c7ad
avcodec/lcevc: attach a reference to the source frame to each passed in base picture
...
This way we can ensure a frame reference will always exists for as long as the
external library needs the base picture.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-01-11 17:59:15 -03:00
Jack Lau
24213d5db3
MAINTAINERS: add myself as whip maintainer
...
Signed-off-by: Jack Lau <jacklau1222gm@gmail.com >
2026-01-11 04:24:55 +00:00
Jack Lau
b0fe52ba4e
avformat/tls_gnutls: add gnutls_pull_timeout() for dtls
...
See https://gnutls.org/manual/gnutls.html#index-gnutls_005ftransport_005fset_005fpull_005ftimeout_005ffunction
This callback is necessary for enforcing the DTLS mode timeouts when in blocking mode.
Otherwise the dtls pull function won't work.
The gnutls_pull_timeout() implementation refers to gnutls example:
https://gnutls.org/manual/gnutls.html#DTLS-echo-server-with-X_002e509-authentication-1
Signed-off-by: Jack Lau <jacklau1222gm@gmail.com >
2026-01-11 04:24:26 +00:00
Hassan Hany
202b7d29e8
avcodec/pngenc: disable background disposal for non-alpha formats
2026-01-11 00:47:17 +00:00
Andreas Rheinhardt
685011003f
avcodec/x86/pngdsp: Remove MMXEXT function overridden by SSSE3
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-01-10 22:47:22 +01:00
Andreas Rheinhardt
31daa7cd87
avcodec/pngdsp: Use proper prefix ff_add_png->ff_png_add
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-01-10 22:47:22 +01:00
Andreas Rheinhardt
5f15c067fe
avcodec/pngdsp: Constify
...
Also constify ff_png_filter_row().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-01-10 22:47:22 +01:00
Andreas Rheinhardt
3bbb3269a1
avcodec/pngdec: Move ff_add_png_paeth_prediction() to pngdsp.c
...
Also rename it to ff_png_add_paeth_prediction() so that it
has a proper prefix.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-01-10 22:47:22 +01:00