From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 32782456E3 for ; Sat, 18 Feb 2023 17:23:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0999C68BEA6; Sat, 18 Feb 2023 19:23:14 +0200 (EET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3CA168B0F9 for ; Sat, 18 Feb 2023 19:23:05 +0200 (EET) Received: by mail-pl1-f170.google.com with SMTP id a20so1333067pls.2 for ; Sat, 18 Feb 2023 09:23:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r+OsflhyR5dIvI9jnREOvcPek5UF0SRVpeVtN8to7EY=; b=YL6DhzOvSxqlNJp6dNcE+M6J88ZyYmoyVrkURvHKCFz/RvfeNaGHXd3UN4LFycbzJy 0tT3e0fTotZ5bauebxut0ipiz9xtfnhxBXir07rYCAdzKxVE2ZkOojNtlBPbcRa3d2tW I67UUnb5p2fl1dqQJ1S+PXTo0X6mtUTBz6SYUWHJzcf3waOPbhxDALUGQMAxbVM0IT9+ y6AG2Gs9oM6z7fXarrC4Glh64+Kqwc3hHesudEjXMsQDwEpe9EaxFs2RktIxFQ2v+u1s ZZ8BRb2eGxTLHzYL1DZ1HMJxOi8h8/Fr5aJIgRBNKwDyG2X+l+7a/a7i7kdCbzCaf4WS r8rA== X-Gm-Message-State: AO0yUKURbsFFmpRCCWnrLDpk+P8HlrwrGgDP9dWaG73uvupijnMkVxBQ r6ggUJoxKw66Aw/il93R2KGKvGJE7d6C4Bw2LgB3ue2dC8wq5Bll X-Google-Smtp-Source: AK7set+skiM2g9iSisLAvMet2MO6HS8nkfx8GPq9PZgyn5bpLEdyJYvuWoABqJRFoSWGnqEhuq4tKMu8rqmLIXUPnDk= X-Received: by 2002:a17:903:186:b0:19a:eb5f:1c8e with SMTP id z6-20020a170903018600b0019aeb5f1c8emr197584plg.23.1676740983564; Sat, 18 Feb 2023 09:23:03 -0800 (PST) MIME-Version: 1.0 References: <20230218011457.346660-1-marth64@proxyid.net> <20230218011457.346660-2-marth64@proxyid.net> In-Reply-To: From: Marth64 Date: Sat, 18 Feb 2023 11:22:52 -0600 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v2 2/4] avcodec/mlpdec: add detection of Atmos spatial extension profile in TrueHD X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Good nit. Fix on the way, On Sat, Feb 18, 2023 at 10:50 AM Hendrik Leppkes wrote: > On Sat, Feb 18, 2023 at 2:15 AM Marth64 wrote: > > > > Signed-off-by: Marth64 > > --- > > 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". > _______________________________________________ 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".