[FFmpeg-devel] [PATCH] avcodec/ac4dec: process immersive stereo

Peter Ross pross at xvid.org
Wed Nov 27 02:58:38 EET 2024


---
This doesn't apply to git master, but is for anyone with AC-4 decoder branch.

 libavcodec/ac4dec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/ac4dec.c b/libavcodec/ac4dec.c
index 9ac866eb4f..e9f7991c9e 100644
--- a/libavcodec/ac4dec.c
+++ b/libavcodec/ac4dec.c
@@ -1171,6 +1171,13 @@ static int ac4_substream_info_chan(AC4DecodeContext *s, SubstreamGroupInfo *g,
     if (ssi->channel_mode == 16)
         ssi->channel_mode += variable_bits(gb, 2);
 
+    if (ssi->channel_mode == 6) {
+        for (int i = 0; i < s->nb_presentations; i++)
+            if (s->pinfo[i].presentation_version == 2) {
+                ssi->channel_mode = 1; /* immersive stereo */
+                break;
+            }
+
     if (ssi->channel_mode == 11 ||
         ssi->channel_mode == 12 ||
         ssi->channel_mode == 13 ||
-- 
2.45.2

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241127/8f05553d/attachment.sig>


More information about the ffmpeg-devel mailing list