Michael Niedermayer
b98125e5a5
avfilter/vf_xfade: Compute w2, h2 with float
...
Fixes: CID1458148 Result is not floating-point
Fixes: CID1458149 Result is not floating-point
Fixes: CID1458150 Result is not floating-point
Fixes: CID1458151 Result is not floating-point
Fixes: CID1458152 Result is not floating-point
Fixes: CID1458154 Result is not floating-point
Fixes: CID1458155 Result is not floating-point
Fixes: CID1458156 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
f802d65de0
avfilter/vf_v360: Assert that vf was initialized
...
Maybe helps: CID1504571 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
9229587c2d
avfilter/vf_unsharp_opencl: Use AV_VIDEO_MAX_PLANES
...
Related: CID1423281 Out-of-bounds read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
e5c0f56ca0
avfilter/vf_tonemap_opencl: Dereference after NULL check
...
Fixes: CID1437472 Dereference before null check
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
22ee55a1da
avfilter/af_surround: Check output format
...
Fixes: CID1516994 Out-of-bounds access
Fixes: CID1516996 Out-of-bounds access
Fixes: CID1516999 Out-of-bounds access
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
43b62b7e0c
avfilter/vf_xfade_opencl: Check ff_inlink_consume_frame() for failure
...
Fixes: CID1458127 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Lynne
12080ff040
nlmeans_vulkan: fix uninitialized reads
6 months ago
Lynne
12f868cab5
vulkan_shaderc: add debug information to shaders
6 months ago
Lynne
2f7dfb0d15
vulkan_shaderc: fix error reporting for certain errors
...
The issue is that shaderc_result_get_num_errors may sometime
return 0 even when shaderc_result_get_compilation_status returns
a non-zero error code.
Since we use the result from the former, override the status
if it returned 0.
6 months ago
Rémi Denis-Courmont
f30e5bf1f5
lavfi/riscv: depend on RVB and simplify accordingly
6 months ago
Anton Khirnov
43f702a253
lavfi/framesync: avoid forcing frame writability unnecessarily
...
Callers of ff_framesync_get_frame() generally do not expect the result
to be writable, those that do (e.g. ff_framesync_dualinput_get_writable())
ensure writability themselves.
Significantly reduces memory consumption in complex graphs with
framesync-based filters (e.g. scale, ssim).
Reported-By: Mark Shwartzman
6 months ago
Rémi Denis-Courmont
b5c111272b
lavfi/riscv: add forward-edge CFI landing pads
6 months ago
Rémi Denis-Courmont
9108f3e5e1
lavfi/riscv: require B or zba explicitly
6 months ago
Michael Niedermayer
73ca4e75eb
avfilter/vf_xfade: Check ff_inlink_consume_frame() for failure
...
Fixes: CID1458043 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
2a8fb3c2cc
avfilter/vf_scale: Check ff_scale_adjust_dimensions() for failure
...
Helps: CID1513722 Operands don't affect result
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
ad9df8bcfe
avfilter/scale_eval: Use 64bit, check values in ff_scale_adjust_dimensions()
...
Found by reviewing CID1513722 Operands don't affect result
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
6db4e326c2
avfilter/vf_neighbor_opencl: Use AV_PIX_MAX_PLANES
...
Fix/Robustness/whatever: CID1439575 Out-of-bounds read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
ace2e25720
avfilter/vf_lut3d: Check av_scanf()
...
Fixes: CID1604398 Unchecked return value
Fixes: CID1604542 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
64aa233a88
avfilter/vf_fftfilt: Remove dead depth code
...
Fixes: CID1509373 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
2af95b9214
avfilter/vf_elbg: Use unsigned for shifting into the top bit
...
Fixes: part of CID1355110 Overflowed constant
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
05e21b8902
avfilter/vf_premultiply: Use AV_PIX_MAX_PLANES
...
Helps: CID1435164 Out-of-bounds read
Helps: CID1435165 Out-of-bounds read
Helps: CID1435167 Out-of-bounds read
Helps: CID1435169 Out-of-bounds read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
9385847af4
avfilter/vf_deshake_opencl: Ensure that the first iteration initializes the best variables
...
Fixes: CID1452759 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
c37dc63c7d
avfilter/vf_deshake_opencl: Use AV_VIDEO_MAX_PLANES
...
Fixes: CID1452758 Out-of-bounds read (actual out of bounds access depends on a frame with more than 3 planes)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months ago
Michael Niedermayer
a7f5845a6c
avfilter: Free out on error
...
CID1197065 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
19a5a8997c
avfilter/vf_convolution_opencl: Assert that the filter name is one of the filters
...
Helps with: CID1439572 Uninitialized pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
ec18ec9fc1
avfilter/vf_bm3d: Dont round MSE2SSE to an integer
...
Fixes: CID1439581 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
ffba528bc6
avfilter/vf_avgblur_opencl: Use AV_VIDEO_MAX_PLANES
...
Fixes: CID1437470 Out-of-bounds read (out of bounds read would only occur with a pixel format of more than 4 planes)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Marvin Scholz
613c85a8f5
avfilter/af_channelsplit: fix mixed declaration and code
...
Fix a "mixing declarations and code is incompatible with standards
before C99" warning.
7 months ago
Michael Niedermayer
20e59af07e
avfilter/vf_tiltandshift: Free dst on error
...
Fixes: CID1559901 Resource leak
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
James Almer
0b6c5e9df4
avfilter/vf_crop: prevent integer overflows when calculating SAR
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 months ago
Marvin Scholz
6d9c4bd69e
lavfi/perlin: Fix out of bounds stack buffer write
...
An incorrect calculation in ff_perlin_init causes a write to the
stack array at index 256, which is out of bounds.
Fixes: CID1608711
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Niklas Haas
0deb301ba9
avfilter/vf_scale: test return code of scale_frame()
...
Instead of testing the returned frame against NULL, test the return code
itself, going more in line with the usual behavior of such functions.
7 months ago
Niklas Haas
084e0b364d
avfilter/vf_scale: fix frame lifetimes
...
scale_frame() inconsistently handled the lifetime of `in`. Fixes a
possible double free and a possible memory leak.
The new code always has `scale_frame` take over ownership of the input
frame. I first tried writing this code in a way where the calling code
retains ownership, but this is nontrivial due to the presence of the
no-op short-circuit condition in which the input frame is directly
returned. (As an alternative, we could use av_frame_clone() instead, but
I wanted to avoid touching the original behavior in this commit)
7 months ago
Michael Niedermayer
382e9e79f3
avfilter/af_aderivative: Free out on error
...
Fixes: CID1197065 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
62d4414d54
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503088 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
a5c815f937
avfilter/af_afir: Assert format
...
Maybe helps: CID1516805 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
8f9a6c4ea8
avfilter/af_afftdn: Assert format
...
Maybe helps: CID1515514 Uninitialized scalar variable
Maybe helps: CID1515517 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
5fe8bf4aa5
avfilter/af_pan: check nb_output_channels before use
...
Fixes: CID1500281 Out-of-bounds write
Fixes: CID1500331 Out-of-bounds write
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
2d0d502ff1
avfilter/af_mcompand: compute half frequency in double
...
Fixes: CID1422217 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
cef720ab42
avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds
...
Maybe Helps: CID1503077 Bad bit shift operation
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
7a0ea15c7a
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503078 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
James Almer
a528a54ee1
avfilter/vf_tiltandshift: fix buffer offset for yuv422p input
...
Fixes ticket #10950 .
Signed-off-by: James Almer <jamrial@gmail.com>
7 months ago
Jun Zhao
03c2e9d77e
lavf/scdet: minor fix
...
Change dbl to i64 for bool type
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
7 months ago
Michael Niedermayer
c296d4fdec
avfilter/vf_avgblur: Check plane instead of AVFrame
...
Fixes: CID1551694 Use after free (false positive based on assuming that out == in and one is freed and one used)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
34f821e448
avfilter/drawutils: Fix depthb computation
...
Fixes: CID1496940 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Michael Niedermayer
aab0c344c5
avfilter/avf_showcwt: Check av_parse_video_rate() for failure
...
Fixes: CID1539147 Unused value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 months ago
Andrew Sayers
5d54a25eea
avfilter/af_afade: fix opt_type for nb_samples/ns
...
The actual value is an int64_t, and is accessed elsewhere as AV_OPT_TYPE_INT64.
7 months ago
Stefano Sabatini
3764b8ecdb
lavfi: add Perlin noise generator
7 months ago
Andreas Rheinhardt
2330e77c97
avfilter/textutils: Constify ff_expand_text()
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
7 months ago
Andreas Rheinhardt
ba457e9adb
avfilter/textutils,vf_drawtext,qrencode: Constify function pointers
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
7 months ago