7244 Commits

Author SHA1 Message Date
Michael Niedermayer
b3fdcaca7b
avfilter/vf_signature: Fix integer overflow in filter_frame()
Fixes: CID1403233

The second of the 2 changes may be unneeded but will help coverity

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dd6040675ec18d19429f882caea6bb306ed6677a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-10-09 22:15:40 +02:00
Michael Niedermayer
7315e3ced5
avfilter/vsrc_mandelbrot: Check for malloc failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fbd22504c4148d2a01ccfe38df26c144f56db76b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-10-09 22:15:34 +02:00
Michael Niedermayer
3ba5221129
avfilter/vf_frei0r: Copy to frame allocated according to frei0r requirements
Fixes: issues with non trivial linesize

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d353909e773ba8a8201fa13d6c35251351dd567a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-10-09 22:15:34 +02:00
Michael Niedermayer
504a2bc6d9
avfilter/video: Add ff_default_get_video_buffer2() to set specific alignment
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d74078270198b97fdda258840f0d501a3ffcc693)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-10-09 22:15:33 +02:00
Paul B Mahol
e7dbee00f0 avfilter/vf_colorspace: fix memmory leaks
Fixes #8303

(cherry picked from commit fddef964e8aa4a2c123e470db1436a082ff6bcf3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 20:20:30 +02:00
Paul B Mahol
a0307736e7 avfilter/vf_random: fix memory leaks
Fixes #8296

(cherry picked from commit 3488e0977c671568731afa12b811adce9d4d807f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-04 20:20:30 +02:00
Paul B Mahol
293f75b581 avfilter/vf_lenscorrection: make width/height int
Somehow previous correct fix broke usage.

(cherry picked from commit 79522411fa53b68743302d16d28156db95466a21)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-09 22:19:41 +02:00
Oneric
d985ec070c avfilter/vf_subtitles: pass storage size to libass
Due to a quirk of the ASS format some tags depend on the exact storage
resolution of the video, so tell libass via ass_set_storage_size.
2022-04-09 22:19:41 +02:00
Paul B Mahol
d5cb859665 avfilter/vf_gblur: fix heap-buffer overflow
Fixes #8282

(cherry picked from commit 64a805883d7223c868a683f0030837d859edd2ab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-09 22:19:40 +02:00
Paul B Mahol
439645004b avfilter/vf_lenscorrection: fix division by zero
Fixes #8265

(cherry picked from commit 19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-04-09 22:19:40 +02:00
Timo Rothenpieler
0699b0836d avfilter/scale_npp: fix non-aligned output frame dimensions 2021-10-07 18:31:41 +02:00
Paul B Mahol
d7490ef341 avfilter/vf_bwdif: fix heap-buffer overflow
Fixes #8261

(cherry picked from commit 8c3166e1c302c3ba80d9742ae46161c0fa8e2606)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:51:43 -03:00
Paul B Mahol
8c9ff740a3 avfilter/vf_bm3d: fix heap-buffer overflows
Fixes #8262

(cherry picked from commit 0749082eb93ea02fa4b770da86597450cec84054)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:51:43 -03:00
Paul B Mahol
f1fc3fe317 avfilter/vf_floodfill: finish early if source and destination fill matches
Fixes #8236

(cherry picked from commit 1331e001796c656a4a3c770a16121c15ec1db2ac)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:51:43 -03:00
Paul B Mahol
ac5a7d5a67 avfilter/vf_edgedetect: fix heap-buffer overflow
Fixes #8275

(cherry picked from commit de598f82f8c3f8000e1948548e8088148e2b1f44)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:51:43 -03:00
Paul B Mahol
da3d6068f3 avfilter/vf_w3fdif: deny processing small videos
Fixes #8243

(cherry picked from commit 0e68e8c93f9068596484ec8ba725586860e06fc8)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:51:43 -03:00
Paul B Mahol
df5e017709 avfilter/af_afade: fix heap-buffer overflow
Fixes #8276

(cherry picked from commit e1b89c76f66343d1b495165664647317c66764bb)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:46 -03:00
Paul B Mahol
29f1cf0c0f avfilter/vf_colorconstancy: fix overreads in gauss array
Fixes #8250

(cherry picked from commit a7fd1279703683ebb548ef7baa2f1519994496ae)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:33 -03:00
Paul B Mahol
aef4cbec69 avfilter/vf_datascope: fix heap buffer overflow
Fixes #8309

(cherry picked from commit d4d6b7b0355f3597cad3b8d12911790c73b5f96d)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:33 -03:00
Paul B Mahol
d60effdf83 avfilter/vf_fieldmatch: fix heap-buffer overflow
Also fix use of uninitialized values.

Fixes #8239

(cherry picked from commit ce5274c1385d55892a692998923802023526b765)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:33 -03:00
Paul B Mahol
c79606f233 avfilter/vf_fieldorder: fix heap-buffer overflow
Fixes #8264

(cherry picked from commit 07050d7bdc32d82e53ee5bb727f5882323d00dba)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:32 -03:00
Paul B Mahol
69f5d4b7fd avfilter/vf_bitplanenoise: fix overreads
Fixes #8244

(cherry picked from commit 0b567238741854b41f84f7457686b044eadfe29c)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:32 -03:00
Paul B Mahol
540047eda8 avfilter/vf_edgedetect: check if height is big enough
Fixes #8260

(cherry picked from commit ccf4ab8c9aca0aee66bcc2914031a9c97ac0eeb8)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:32 -03:00
Paul B Mahol
3a9f384225 avfilter/af_tremolo: fix heap-buffer overflow
Fixes #8317

(cherry picked from commit 58bb9d3a3a6ede1c6cfb82bf671a5f138e6b2144)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:50:32 -03:00
Paul B Mahol
f5da6cff35 avfilter/vf_neighbor: check if width is 1
Fixes #8242

(cherry picked from commit e787f8fd7ee99ba0c3e0f086ce2ce59eea7ed86c)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:49:27 -03:00
Paul B Mahol
01f3824f6c avfilter/vf_avgblur: fix heap-buffer overflow
Fixes #8274

(cherry picked from commit f069a9c2a65bc20c3462127623127df6dfd06c5b)
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-13 16:49:13 -03:00
Michael Niedermayer
d71d3cc9f6 avfilter/af_drmeter: Check that there is data
Fixes: floating point division by 0
Fixes: -nan is outside the range of representable values of type 'int'
Fixes: Ticket8307

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f49fa6abe89e2fca2585cac4c63190315972cf0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
6ce4989432 avfilter/vf_mestimate: Check b_count
Fixes: left shift of negative value -1
Fixes: Ticket8270

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 06af6e101bbd04e8ecc5337bc3b6894a5e058e14)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
5498836d7d avfilter/vf_dctdnoiz: Check threads
Fixes: floating point division by 0
Fixes: Ticket 8269

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4a3917c02c428b11128ac3d4a01b780ea44aa53c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
5625dc1f32 avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black
Fixes: floating point division by 0
Fixes: undefined behavior in handling NaN
Fixes: Ticket 8268

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d500e62f6206ad11308b18976246366aed8c1a5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
b5ffefdd61 avfilter/vf_yadif: Fix handing of tiny images
Fixes: out of array access
Fixes: Ticket8240
Fixes: CVE-2020-22021

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7971f62120a55c141ec437aa3f0bacc1c1a3526b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
c7da0dad1f avfilter/vf_vmafmotion: Check dimensions
Fixes: out of array access
Fixes: Ticket8241
Fixes: Ticket8246
Fixes: CVE-2020-22019
Fixes: CVE-2020-22033

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 82ad1b76751bcfad5005440db48c46a4de5d6f02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:54:52 +02:00
Michael Niedermayer
2d99005df7 avfilter/vf_scale: Fix adding 0 to NULL (which is UB) in scale_slice()
Found-by: Jeremy Leconte <jleconte@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1cf96ce269364e3c2b4ec2097f121ad42b336839)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-09 13:53:29 +02:00
Michael Niedermayer
555d2ab5a5 avfilter/vf_aspect: Fix integer overflow in compute_dar()
Fixes: signed integer overflow: 1562273630 * 17 cannot be represented in type 'int'
Fixes: Ticket8323

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c0ca0f244b823238e5a4f5584168e620da84899)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-03 12:10:23 +02:00
Michael Niedermayer
7a7be53ac5 avfilter/vf_find_rect: Remove assert
A score of 0 is possible
Fixes: Ticket8500

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dfc471488675aa257183745502d0074055db3bd2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-03 12:10:23 +02:00
Michael Niedermayer
b7b8aeef13 avfilter/vf_find_rect: Increase worst case score
score could be 1.0 which lead to uninitialized values

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6ff2474e02200dce7abdea3fd211fcaf49691c2c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-03 12:10:23 +02:00
Andreas Rheinhardt
63383aaf53 avfilter/vf_xbr: Fix left shift of negative number
Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr,
filter-3xbr, filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4294dc3589a3ab973b10a85b576ff15e3ffb000d)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 22:31:20 +02:00
Andreas Rheinhardt
7cb41481ea avfilter/vf_hqx: Fix undefined left shifts of negative numbers
Affected every usage of this filter; in particular, it affected the
FATE-tests filter-2xbr, filter-3xbr and filter-4xbr.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fa211943265ca991548a4cc2f85a6df9cedcd092)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 22:30:54 +02:00
Michael Niedermayer
f238fcdb3e avfilter/vf_geq: Use av_clipd() instead of av_clipf()
With floats we cannot represent all 32bit integer dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8813b1a984714f0027cabeea2394035df20cf38)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-06 11:30:43 +01:00
Michael Niedermayer
99576bf034 avfilter/vf_tonemap_opencl: Make static tables const
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47c3a10b16f2721c7afa333869aafa8c007fb419)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-21 07:53:26 +01:00
Marton Balint
ddc284300e avfilter/af_asetnsamples: fix last frame props
Frame properties were not copied, so e.g. PTS was not set for the last frame.

Regression since ef3babb2c70f564dc1634b3f29c6e35a2b2dc239.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946)
2019-01-01 20:39:44 +01:00
Paul B Mahol
a4ddc3c9fc avfilter/vf_overlay: fix filtering with negative y
(cherry picked from commit 8440835dbe93ef9972ceb940af9bda9bc0e178e7)
2018-12-14 23:56:21 +01:00
Paul B Mahol
9efc591cb7 avfilter/vf_overlay: fix crash with negative y
(cherry picked from commit 57815cfad5c5d6beb6f3fc0ae86b050a970d3a08)
2018-11-25 12:46:56 +01:00
Marton Balint
bb01cd3cc0 avfilter/af_afade: fix duration maximum
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit aecd63b926812148014c4f01270473722ae5e945)
2018-11-15 22:34:53 +01:00
Mark Harris
fed94c2f22 avfilter/vf_fade: fix start/duration max value
A fade out (usually at the end of a video) can easily start beyond
INT32_MAX (about 36 minutes).  Regression since d40dc64173.

(cherry picked from commit ae4323548ae821db81b73bc66cf5a2f9885296cb)
2018-11-15 22:34:34 +01:00
Philip Langdale
ebc1c49e41 avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation
This requires a newer version of CUDA than we want to require.

(cherry picked from commit 8e50215b5e02074b0773dfcf55867654ee59c179)
2018-11-03 15:50:31 -07:00
Philip Langdale
67126555fc avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer
This is a cuda implementation of yadif, which gives us a way to
do deinterlacing when using the nvdec hwaccel. In that scenario
we don't have access to the nvidia deinterlacer.

(cherry picked from commit d5272e94ab22bfc8f01fa3174e2c4664161ddf5a)
2018-11-03 15:50:12 -07:00
Philip Langdale
041231fcd6 libavfilter/vf_yadif: Make frame management logic and options shareable
I'm writing a cuda implementation of yadif, and while this
obviously has a very different implementation of the actual
filtering, all the frame management is unchanged. To avoid
duplicating that logic, let's make it shareable.

From the perspective of the existing filter, the only real change
is introducing a function pointer for the filter() function so it
can be specified for the specific filter.

(cherry picked from commit 598f0f39271d6033588b4d8ccc672c5bdc85fec7)
2018-11-03 15:45:55 -07:00
Michael Niedermayer
780d5e30a0 Bump minor versions for branching 4.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-02 00:15:32 +01:00
Paul B Mahol
323c2cfd38 avfilter: add (a)graphmonitor filter(s) 2018-10-31 11:49:39 +01:00