Unified · Split
| @@ -974,7 +974,7 @@ static void finish_sample_noise(AudioFFTDeNoiseContext *s, · 973 unmodified lines | |||
| 974 | dnch->noise_band_var[i] -= dnch->noise_band_avr[i] * dnch->noise_band_avr[i] + | 974 | dnch->noise_band_var[i] -= dnch->noise_band_avr[i] * dnch->noise_band_avr[i] + |
| 975 | dnch->noise_band_avi[i] * dnch->noise_band_avi[i]; | 975 | dnch->noise_band_avi[i] * dnch->noise_band_avi[i]; |
| 976 | dnch->noise_band_auto_var[i] = dnch->noise_band_var[i]; | 976 | dnch->noise_band_auto_var[i] = dnch->noise_band_var[i]; |
| 977 | sample_noise[i] = (1.0 / C) * log(dnch->noise_band_var[i] / s->floor) - 100.0; | 977 | sample_noise[i] = 10.0 * log10(dnch->noise_band_var[i] / s->floor) - 100.0; |
| 978 | } | 978 | } |
| 979 | if (s->noise_band_count < NB_PROFILE_BANDS) { | 979 | if (s->noise_band_count < NB_PROFILE_BANDS) { |
| 980 | for (int i = s->noise_band_count; i < NB_PROFILE_BANDS; i++) | 980 | for (int i = s->noise_band_count; i < NB_PROFILE_BANDS; i++) |
| @@ -1091,7 +1091,7 @@ static void get_auto_noise_levels(AudioFFTDeNoiseContext *s, · 110 unmodified lines | |||
| 1091 | { | 1091 | { |
| 1092 | if (s->noise_band_count > 0) { | 1092 | if (s->noise_band_count > 0) { |
| 1093 | for (int i = 0; i < s->noise_band_count; i++) { | 1093 | for (int i = 0; i < s->noise_band_count; i++) { |
| 1094 | levels[i] = (1.0 / C) * log(dnch->noise_band_auto_var[i] / s->floor) - 100.0; | 1094 | levels[i] = 10.0 * log10(dnch->noise_band_auto_var[i] / s->floor) - 100.0; |
| 1095 | } | 1095 | } |
| 1096 | if (s->noise_band_count < NB_PROFILE_BANDS) { | 1096 | if (s->noise_band_count < NB_PROFILE_BANDS) { |
| 1097 | for (int i = s->noise_band_count; i < NB_PROFILE_BANDS; i++) | 1097 | for (int i = s->noise_band_count; i < NB_PROFILE_BANDS; i++) |