Andreas Rheinhardt
358c0bb168
avfilter/vf_minterpolate: Remove redundant code for freeing
...
ad73b32d29
added some code for freeing in
the input's config_props function, yet this is unnecessary as uninit is
called anyway if config_props fails.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Andreas Rheinhardt
aa262dcce8
avfilter/vf_minterpolate: Fix left shift of negative value
...
This has happened when initializing the motion estimation context if
width or height of the video was smaller than the block size used
for motion estimation and if the motion interpolation mode indicates
not to use motion estimation.
The solution is of course to only initialize the motion estimation
context if the interpolation mode uses motion estimation.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Andreas Rheinhardt
bb13cdbe27
avfilter/vf_minterpolate: Reject too small dimensions
...
The latter code relies upon the dimensions to be not too small;
otherwise one will call av_clip() with min > max lateron which aborts
in case ASSERT_LEVEL is >= 2 or one will get a nonsense result that may
lead to a heap-buffer-overflow/underflow. The latter has happened in
ticket #8248 which this commit fixes.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Marton Balint
7f3a946216
Revert "avfilter/vf_minterpolate: if metadata lavfi.scd.mafd exists, we'll use it first"
...
This reverts commit d88e1c9838
.
Fixes null pointer dereference.
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-15 18:35:51 +02:00
Limin Wang
815a3b393c
avfilter/vf_minterpolate: change the default threshold to get better scene change detect result
...
./ffmpeg -loglevel debug -i ../fate-suite/svq3/Vertical400kbit.sorenson3.mov -vf
minterpolate=fps=60:mi_mode=blend -an -f null -
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 1600
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 4120
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 5780
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 6700
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 8140
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 9740
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 14060
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 15680
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 18480
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 20020
[Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 21740
The results are consistent with tests/ref/fate/filter-metadata-scenedetect
For the master, it'll detect more than 20 scene change for the same source.
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Limin Wang
61cc009d53
avfilter/vf_minterpolate: correct the mafd calculation
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Limin Wang
d88e1c9838
avfilter/vf_minterpolate: if metadata lavfi.scd.mafd exists, we'll use it first
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Carl Eugen Hoyos
21dd05ee6a
lavfi/minterpolate: Remove declaration of two unused variables.
2018-11-16 21:45:49 +01:00
Marton Balint
936d18fb42
avfilter/vf_minterpolate: use common scene sad functions
...
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-11-11 20:30:50 +01:00
Jun Zhao
eb776a16ea
lavfi/minterpolate: fix blending calc issue.
...
the right blending calc is:
(alpha * Frame_2 + (MAX - alpha) * Frame_1 + 512) >> 10
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-07-08 23:05:34 +08:00
Carl Eugen Hoyos
ad73b32d29
lavfi/minterpolate: Split struct Pixel to allow higher resolutions.
...
Raises the maximum resolution from 2716x2707 to approximately 4096x4095.
Fixes ticket #6795 .
2017-12-28 01:28:57 +01:00
Michael Niedermayer
855305fac2
avfilter/vf_minterpolate: Use dx and dy
...
Fixes CID1396283 and CID1396284
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-30 22:46:31 +02:00
Carl Eugen Hoyos
350ce0b9d3
lavfi/minterpolate: Remove an unused variable.
2017-02-11 16:38:56 +01:00
Davinder Singh
367577dbe2
avfilter/vf_minterpolate: rename chroma log vars
...
also use AVPixFmtDescriptor instead of avcodec_get_chroma_sub_sample()
for log2_chroma*.
2016-09-02 13:08:21 +02:00
Davinder Singh
11a631d4a7
avfilter/vf_minterpolate: do not right shift negative numbers
...
It was source of crashes. Use division instead.
Original patch by author. Log message by comitter.
2016-08-29 17:32:47 +02:00
Davinder Singh
b07d4a0fb2
avfilter: added motion estimation and interpolation filters
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-26 11:17:51 +02:00