aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-26 20:45:06 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-23 21:29:01 +0200
commitdb8487611bc444e31e76221c165e9cca558138db (patch)
treeea1830f06b19b95e120bd4ddb722191635eeb3c4
parent23a0acd4d17edfbe1e52d19579d3c304255d0b9d (diff)
downloadffmpeg-db8487611bc444e31e76221c165e9cca558138db.tar.gz
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>
-rw-r--r--libavfilter/vf_find_rect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c
index cb79f4a4ca..1a0e702583 100644
--- a/libavfilter/vf_find_rect.c
+++ b/libavfilter/vf_find_rect.c
@@ -159,7 +159,7 @@ static float search(FOCContext *foc, int pass, int maxpass, int xmin, int xmax,
if (pass + 1 <= maxpass) {
int sub_x, sub_y;
- search(foc, pass+1, maxpass, xmin>>1, (xmax+1)>>1, ymin>>1, (ymax+1)>>1, &sub_x, &sub_y, 1.0);
+ search(foc, pass+1, maxpass, xmin>>1, (xmax+1)>>1, ymin>>1, (ymax+1)>>1, &sub_x, &sub_y, 2.0);
xmin = FFMAX(xmin, 2*sub_x - 4);
xmax = FFMIN(xmax, 2*sub_x + 4);
ymin = FFMAX(ymin, 2*sub_y - 4);
@@ -198,7 +198,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
FFMIN(foc->xmax, foc->last_x + 8),
FFMAX(foc->ymin, foc->last_y - 8),
FFMIN(foc->ymax, foc->last_y + 8),
- &best_x, &best_y, 1.0);
+ &best_x, &best_y, 2.0);
best_score = search(foc, 0, foc->mipmaps - 1, foc->xmin, foc->xmax, foc->ymin, foc->ymax,
&best_x, &best_y, best_score);