score could be 1.0 which lead to uninitialized values
Unified · Split
| @@ -159,7 +159,7 @@ static float search(FOCContext *foc, int pass, int maxpass, int xmin, int xmax, · 158 unmodified lines | ||
| 159 | 159 | |
| 160 | 160 | if (pass + 1 <= maxpass) { |
| 161 | 161 | int sub_x, sub_y; |
| 162 | − search(foc, pass+1, maxpass, xmin>>1, (xmax+1)>>1, ymin>>1, (ymax+1)>>1, &sub_x, &sub_y, 1.0); | |
| 162 | + search(foc, pass+1, maxpass, xmin>>1, (xmax+1)>>1, ymin>>1, (ymax+1)>>1, &sub_x, &sub_y, 2.0); | |
| 163 | 163 | xmin = FFMAX(xmin, 2*sub_x - 4); |
| 164 | 164 | xmax = FFMIN(xmax, 2*sub_x + 4); |
| 165 | 165 | ymin = FFMAX(ymin, 2*sub_y - 4); |
| @@ -198,7 +198,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 32 unmodified lines | ||
| 198 | 198 | FFMIN(foc->xmax, foc->last_x + 8), |
| 199 | 199 | FFMAX(foc->ymin, foc->last_y - 8), |
| 200 | 200 | FFMIN(foc->ymax, foc->last_y + 8), |
| 201 | − &best_x, &best_y, 1.0); | |
| 201 | + &best_x, &best_y, 2.0); | |
| 202 | 202 | |
| 203 | 203 | best_score = search(foc, 0, foc->mipmaps - 1, foc->xmin, foc->xmax, foc->ymin, foc->ymax, |
| 204 | 204 | &best_x, &best_y, best_score); |