[FFmpeg-cvslog] avcodec/ac3dec: set preferred_stereo_downmix using the relevant coded value
James Almer
git at videolan.org
Tue Dec 31 16:46:26 EET 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Dec 24 00:26:33 2024 -0300| [15b16d58df7d2372c6b7535633556e955ab97090] | committer: James Almer
avcodec/ac3dec: set preferred_stereo_downmix using the relevant coded value
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15b16d58df7d2372c6b7535633556e955ab97090
---
libavcodec/ac3dec.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index e5b52c577f..a796ddf44e 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1611,6 +1611,20 @@ dependent_frame:
s->loro_surround_mix_level = gain_levels[s->surround_mix_level];
s->ltrt_center_mix_level = gain_levels[s-> center_mix_level_ltrt];
s->ltrt_surround_mix_level = gain_levels[s->surround_mix_level_ltrt];
+ switch (s->preferred_downmix) {
+ case AC3_DMIXMOD_LTRT:
+ s->preferred_stereo_downmix = AV_DOWNMIX_TYPE_LTRT;
+ break;
+ case AC3_DMIXMOD_LORO:
+ s->preferred_stereo_downmix = AV_DOWNMIX_TYPE_LORO;
+ break;
+ case AC3_DMIXMOD_DPLII:
+ s->preferred_stereo_downmix = AV_DOWNMIX_TYPE_DPLII;
+ break;
+ default:
+ s->preferred_stereo_downmix = AV_DOWNMIX_TYPE_UNKNOWN;
+ break;
+ }
/* set downmixing coefficients if needed */
if (s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) &&
s->fbw_channels == s->out_channels)) {
More information about the ffmpeg-cvslog
mailing list