mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi/ebur128: apply I dual mono correction only if I available
Spotted-by: jamrial & gcc 6
This commit is contained in:
parent
f69f050a31
commit
5083900b73
|
@ -663,12 +663,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
||||||
nb_integrated += nb_v;
|
nb_integrated += nb_v;
|
||||||
integrated_sum += nb_v * ebur128->i400.histogram[i].energy;
|
integrated_sum += nb_v * ebur128->i400.histogram[i].energy;
|
||||||
}
|
}
|
||||||
if (nb_integrated)
|
if (nb_integrated) {
|
||||||
ebur128->integrated_loudness = LOUDNESS(integrated_sum / nb_integrated);
|
ebur128->integrated_loudness = LOUDNESS(integrated_sum / nb_integrated);
|
||||||
/* dual-mono correction */
|
/* dual-mono correction */
|
||||||
if (nb_channels == 1 && ebur128->dual_mono) {
|
if (nb_channels == 1 && ebur128->dual_mono) {
|
||||||
ebur128->integrated_loudness -= ebur128->pan_law;
|
ebur128->integrated_loudness -= ebur128->pan_law;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LRA */
|
/* LRA */
|
||||||
|
|
Loading…
Reference in New Issue