[FFmpeg-trac] #11503(avcodec:new): AC-3 downmix levels defaulting to 1.414 with recent decoder changes
FFmpeg
trac at avcodec.org
Wed Mar 12 05:32:36 EET 2025
#11503: AC-3 downmix levels defaulting to 1.414 with recent decoder changes
-------------------------------------+-------------------------------------
Reporter: Wallboy | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: ac3 | Blocked By:
resampling downmix |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by Wallboy:
Old description:
> **Summary of the bug:**
>
> With the recent commits to AC-3 decoder, I've noticed the default mixing
> levels (when no metadata present) have changed from 0.707 to 1.414 for
> both clev and slev, respectively.
>
> The ATSC A/52 spec does have these 1.414 values listed in the Alternate
> Bit Stream Syntax, but only for the center channel.
>
> **How to reproduce:**
>
> Run a command similar to the following on the latest master branch with a
> 5.1 channel AC-3 file (here using AAC codec so we get fltp sample format,
> so the rematrixing code doesn't normalize the mixing levels):
>
> {{{
> ffmpeg -hide_banner -loglevel debug -i someac3file -vn -c:a aac -frames:a
> 1 -ac 2 -f null /dev/null
> }}}
>
> Relevant debug output:
>
> {{{
> [auto_aresample_0 @ 000001c6d9787100] Mix levels: center 1.414214 -
> surround 1.414214 - lfe 0.000000.
> [auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] Using fltp
> internally between filters
> [auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] Matrix
> coefficients:
> [auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] FL:
> FL:1.000000 FR:0.000000 FC:1.414214 LFE:0.000000 SL:1.414214 SR:0.000000
> [auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] FR:
> FL:0.000000 FR:1.000000 FC:1.414214 LFE:0.000000 SL:0.000000 SR:1.414214
> }}}
>
> Run again on a release version of ffmpeg such as 7.1:
>
> {{{
> [auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] Matrix
> coefficients:
> [auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] FL:
> FL:1.000000 FR:0.000000 FC:0.707107 LFE:0.000000 SL:0.707107 SR:0.000000
> [auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] FR:
> FL:0.000000 FR:1.000000 FC:0.707107 LFE:0.000000 SL:0.000000 SR:0.707107
> }}}
>
> which I believe these are the expected defaults if the metadata doesn't
> explicitly specify otherwise.
>
> If this change was intentional, feel free to close this ticket.
New description:
**Summary of the bug:**
With the recent commits to AC-3 decoder, I've noticed the default mixing
levels (when no metadata present) have changed from 0.707 to 1.414 for
both clev and slev, respectively.
The ATSC A/52 spec does have these 1.414 values listed in the Alternate
Bit Stream Syntax, but only for the center channel.
**How to reproduce:**
Run a command similar to the following on the latest master branch with a
5.1 channel AC-3 file (here using AAC codec so we get fltp sample format,
so the rematrixing code doesn't normalize the mixing levels):
{{{
ffmpeg -hide_banner -loglevel debug -i someac3file -vn -c:a aac -frames:a
1 -ac 2 -f null /dev/null
}}}
Relevant debug output:
{{{
[auto_aresample_0 @ 000001c6d9787100] Mix levels: center 1.414214 -
surround 1.414214 - lfe 0.000000.
[auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] Using fltp
internally between filters
[auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] Matrix
coefficients:
[auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] FL:
FL:1.000000 FR:0.000000 FC:1.414214 LFE:0.000000 SL:1.414214 SR:0.000000
[auto_aresample_0 @ 000001c6d9787100] [SWR @ 000001c6d9787fc0] FR:
FL:0.000000 FR:1.000000 FC:1.414214 LFE:0.000000 SL:0.000000 SR:1.414214
}}}
Run again on a release version of ffmpeg such as 7.1:
{{{
[auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] Matrix
coefficients:
[auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] FL:
FL:1.000000 FR:0.000000 FC:0.707107 LFE:0.000000 SL:0.707107 SR:0.000000
[auto_aresample_0 @ 00000228732b7440] [SWR @ 00000228734caf80] FR:
FL:0.000000 FR:1.000000 FC:0.707107 LFE:0.000000 SL:0.000000 SR:0.707107
}}}
which I believe these are the expected defaults if the metadata doesn't
explicitly specify otherwise.
If this change was intentional, feel free to close this ticket.
----
**UPDATE:** Furthermore, if you manually specify `-clev` and `-slev`
values, they are ignored in the latest git master:
{{{
[auto_aresample_0 @ 0000026f4df79680] [debug] Setting 'slev' to value
'0.707'
[auto_aresample_0 @ 0000026f4df79680] [debug] Setting 'clev' to value
'0.707'
...
[auto_aresample_0 @ 0000026f4df79680] [verbose] Mix levels: center
1.414214 - surround 1.414214 - lfe 0.000000.
[auto_aresample_0 @ 0000026f4df79680] [SWR @ 0000026f4e03c900] [debug]
Using fltp internally between filters
[auto_aresample_0 @ 0000026f4df79680] [SWR @ 0000026f4e03c900] [debug]
Matrix coefficients:
[auto_aresample_0 @ 0000026f4df79680] [SWR @ 0000026f4e03c900] [debug] FL:
FL:1.000000 FR:0.000000 FC:1.414214 LFE:0.000000 SL:1.414214 SR:0.000000
[auto_aresample_0 @ 0000026f4df79680] [SWR @ 0000026f4e03c900] [debug] FR:
FL:0.000000 FR:1.000000 FC:1.414214 LFE:0.000000 SL:0.000000 SR:1.414214
}}}
Probably related.
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11503#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list