Restores the order of operations from before 15a1104, which reduces errors from floating point calculations, and fixes FATE on mingw64.
Unified · Split
| @@ -768,7 +768,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 767 unmodified lines | ||
| 768 | 768 | |
| 769 | 769 | /* get lower loudness to consider */ |
| 770 | 770 | n = 0; |
| 771 | − nb_pow = LRA_LOWER_PRC * 0.01 * nb_powers + 0.5; | |
| 771 | + nb_pow = LRA_LOWER_PRC * nb_powers * 0.01 + 0.5; | |
| 772 | 772 | for (i = gate_hist_pos; i < HIST_SIZE; i++) { |
| 773 | 773 | n += ebur128->i3000.histogram[i].count; |
| 774 | 774 | if (n >= nb_pow) { |
| @@ -779,7 +779,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 4 unmodified lines | ||
| 779 | 779 | |
| 780 | 780 | /* get higher loudness to consider */ |
| 781 | 781 | n = nb_powers; |
| 782 | − nb_pow = LRA_HIGHER_PRC * 0.01 * nb_powers + 0.5; | |
| 782 | + nb_pow = LRA_HIGHER_PRC * nb_powers * 0.01 + 0.5; | |
| 783 | 783 | for (i = HIST_SIZE - 1; i >= 0; i--) { |
| 784 | 784 | n -= FFMIN(n, ebur128->i3000.histogram[i].count); |
| 785 | 785 | if (n < nb_pow) { |