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 | /* get lower loudness to consider */ | 769 | /* get lower loudness to consider */ |
| 770 | n = 0; | 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 | for (i = gate_hist_pos; i < HIST_SIZE; i++) { | 772 | for (i = gate_hist_pos; i < HIST_SIZE; i++) { |
| 773 | n += ebur128->i3000.histogram[i].count; | 773 | n += ebur128->i3000.histogram[i].count; |
| 774 | if (n >= nb_pow) { | 774 | if (n >= nb_pow) { |
| @@ -779,7 +779,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 4 unmodified lines | |||
| 779 | 779 | ||
| 780 | /* get higher loudness to consider */ | 780 | /* get higher loudness to consider */ |
| 781 | n = nb_powers; | 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 | for (i = HIST_SIZE - 1; i >= 0; i--) { | 783 | for (i = HIST_SIZE - 1; i >= 0; i--) { |
| 784 | n -= FFMIN(n, ebur128->i3000.histogram[i].count); | 784 | n -= FFMIN(n, ebur128->i3000.histogram[i].count); |
| 785 | if (n < nb_pow) { | 785 | if (n < nb_pow) { |