Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Hendrik Leppkes <h.leppkes@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 2/4] avcodec/mlpdec: add detection of Atmos spatial extension profile in TrueHD
Date: Sat, 18 Feb 2023 17:50:11 +0100
Message-ID: <CA+anqdyBEtgyU1oEAbvB6eSi0DyUFkOJ6=dQAsQmUQz=R+D+Xg@mail.gmail.com> (raw)
In-Reply-To: <20230218011457.346660-2-marth64@proxyid.net>

On Sat, Feb 18, 2023 at 2:15 AM Marth64 <marth64@proxyid.net> wrote:
>
> Signed-off-by: Marth64 <marth64@proxyid.net>
> ---
>  libavcodec/avcodec.h    |  2 ++
>  libavcodec/codec_desc.c |  1 +
>  libavcodec/mlpdec.c     | 11 +++++++++++
>  libavcodec/profiles.c   |  5 +++++
>  libavcodec/profiles.h   |  1 +
>  5 files changed, 20 insertions(+)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 0e85dd50a4..3feab75741 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1593,6 +1593,8 @@ typedef struct AVCodecContext {
>
>  #define FF_PROFILE_EAC3_DDP_ATMOS         30
>
> +#define FF_PROFILE_TRUEHD_ATMOS           30
> +
>  #define FF_PROFILE_MPEG2_422    0
>  #define FF_PROFILE_MPEG2_HIGH   1
>  #define FF_PROFILE_MPEG2_SS     2
> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> index 4098d4f5a5..e80ac07700 100644
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -2960,6 +2960,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
>          .name      = "truehd",
>          .long_name = NULL_IF_CONFIG_SMALL("TrueHD"),
>          .props     = AV_CODEC_PROP_LOSSLESS,
> +        .profiles  = NULL_IF_CONFIG_SMALL(ff_truehd_profiles),
>      },
>      {
>          .id        = AV_CODEC_ID_MP4ALS,
> diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
> index 0ee1f0982c..85d6207b9c 100644
> --- a/libavcodec/mlpdec.c
> +++ b/libavcodec/mlpdec.c
> @@ -42,6 +42,7 @@
>  #include "mlpdsp.h"
>  #include "mlp.h"
>  #include "config.h"
> +#include "profiles.h"
>
>  /** number of bits used for VLC lookup - longest Huffman code is 9 */
>  #if ARCH_ARM
> @@ -392,6 +393,15 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
>      m->num_substreams        = mh.num_substreams;
>      m->substream_info        = mh.substream_info;
>
> +    /*  If there is a 4th substream and the MSB of substream_info is set,
> +     *  there is a 16-channel spatial presentation (Atmos in TrueHD).
> +     */
> +    if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD
> +            && m->num_substreams == 4
> +            && m->substream_info >> 7 == 1) {
> +        m->avctx->profile     = FF_PROFILE_TRUEHD_ATMOS;
> +    }
> +

Nit: maybe put the if into two lines instead of three? The two
substream checks look like they should fit in one line quite well. But
this is just a style question, so feel free to ignore.

Otherwise LGTM
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2023-02-18 16:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <306450>
2023-02-12  0:31 ` [FFmpeg-devel] [PATCH] ffprobe/eac3/mlp/dca: add detection of spatial audio extensions Marth64
2023-02-17 10:59   ` Anton Khirnov
2023-02-17 14:51     ` Marth64
2023-02-20 16:41       ` Anton Khirnov
2023-02-20 16:57         ` Marth64
2023-03-10  2:17           ` Marth64
2023-03-10 11:53             ` Hendrik Leppkes
2023-03-10 22:00               ` Marth64
2023-02-12  0:52 ` Marth64
2023-02-16 12:36   ` Hendrik Leppkes
2023-02-16 23:20     ` Marth64
2023-02-17  4:46 ` Marth64
2023-02-17 19:46 ` Marth64
2023-02-17 22:43   ` James Almer
2023-02-17 23:09     ` Marth64
2023-02-18  1:14 ` [FFmpeg-devel] [PATCH v2 1/4] avcodec/eac3dec: add detection of Atmos spatial extension profile Marth64
2023-02-18  1:14   ` [FFmpeg-devel] [PATCH v2 2/4] avcodec/mlpdec: add detection of Atmos spatial extension profile in TrueHD Marth64
2023-02-18 16:50     ` Hendrik Leppkes [this message]
2023-02-18 17:22       ` Marth64
2023-02-18  1:14   ` [FFmpeg-devel] [PATCH v2 3/4] avcodec/dca_xll: add detection of DTS:X and DTS:X IMAX Marth64
2023-02-18 16:46     ` Hendrik Leppkes
2023-02-18  1:14   ` [FFmpeg-devel] [PATCH v2 4/4] avcodec/version: bump minor version to accommodate spatial audio detection Marth64
2023-02-18 16:45   ` [FFmpeg-devel] [PATCH v2 1/4] avcodec/eac3dec: add detection of Atmos spatial extension profile Hendrik Leppkes
2023-02-18 16:46   ` Hendrik Leppkes
     [not found] <306724>
2023-02-18 17:24 ` [FFmpeg-devel] [PATCH v2 2/4] avcodec/mlpdec: add detection of Atmos spatial extension profile in TrueHD Marth64

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+anqdyBEtgyU1oEAbvB6eSi0DyUFkOJ6=dQAsQmUQz=R+D+Xg@mail.gmail.com' \
    --to=h.leppkes@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git