[FFmpeg-devel] [PATCH] avcodec/mlpdec: Add decoding of object audio data

James Almer jamrial at gmail.com
Sun Mar 23 21:01:38 EET 2025


On 3/22/2025 2:49 PM, Massimo Eynard wrote:
> This patch adds support for decoding the fourth MLP substream
> which contains the 16-channel presentation used for Atmos
> audio objects.
> 
> By default only the first three substreams are decoded
> unless the new extract_objects flag is enabled as the resulting
> presentation contains audio object feeds instead of classic
> loudspeaker feeds.
> 
> As this introduces interpolation of primitive matrices, precision
> has been increased to 2.18 fixed point. Therefore this requires
> DSP code upgrade which has been done for C and x86 implementations
> but not the ARM implementation.
> 
> Adds two FATE tests using existing atmos.thd sample to reflect
> changes.
> 
> Signed-off-by: Massimo Eynard <eynard.massimo at gmail.com>
> ---
>   libavcodec/arm/mlpdsp_armv5te.S  |   2 +-
>   libavcodec/arm/mlpdsp_init_arm.c |   3 +-
>   libavcodec/mlp.h                 |  10 +-
>   libavcodec/mlp_parse.c           |  31 ++-
>   libavcodec/mlp_parse.h           |   1 +
>   libavcodec/mlp_parser.c          |  11 +-
>   libavcodec/mlpdec.c              | 389 +++++++++++++++++++++++++++----
>   libavcodec/mlpdsp.c              |  50 +++-
>   libavcodec/mlpdsp.h              |  25 ++
>   libavcodec/x86/mlpdsp.asm        |  19 +-
>   tests/fate/truehd.mak            |  10 +
>   11 files changed, 476 insertions(+), 75 deletions(-)

With atmos.thd i get:

> [aist#0:0/truehd @ 00000209caf3ee00] Guessed Channel Layout: 7.1.4
> Input #0, truehd, from '../samples/truehd/atmos.thd':
>   Duration: N/A, start: 0.000000, bitrate: N/A
>   Stream #0:0: Audio: truehd (Dolby TrueHD + Dolby Atmos), 48000 Hz, 7.1.4, s32 (24 bit)

Which is unlikely to be correct. The file has 11 (or 12) objects, which 
is exported as 12 channels in an unspecified layout, and automatically 
assumed to be a 7.1.4 fixed layout.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250323/d4cf60f9/attachment.sig>


More information about the ffmpeg-devel mailing list