Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
@ 2023-04-27 22:17 Ammon Riley
  2023-05-08 22:58 ` Marton Balint
  0 siblings, 1 reply; 4+ messages in thread
From: Ammon Riley @ 2023-04-27 22:17 UTC (permalink / raw)
  To: ffmpeg-devel

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

This patch simply recognizes the AAC audio tracks during
decode -- it does not add functionality to encode AAC in
MXF.

A sample file (st381-4-sample.mxf) has been uploaded to
https://streams.videolan.org/upload/, and is also available
at https://harmonicinc.box.com/v/st381-4-sample.  Audio
and video are both licensed as CC0.

[-- Attachment #2: 0001-avcodec-mxfdec-Recognize-AAC-per-SMPTE-ST-381-4.patch --]
[-- Type: text/x-patch, Size: 3575 bytes --]

From 9765ec18f65b8ae147660e0d71bfa80293e57f56 Mon Sep 17 00:00:00 2001
From: Ammon Riley <ammon.riley@harmonicinc.com>
Date: Wed, 26 Apr 2023 18:26:35 -0700
Subject: [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4

This patch simply recognizes the AAC audio track during
decode -- it does not add functionality to encode AAC in
MXF.

Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
---
 Changelog            | 1 +
 libavformat/mxf.c    | 1 +
 libavformat/mxfdec.c | 5 +++++
 3 files changed, 7 insertions(+)

diff --git a/Changelog b/Changelog
index a40f32c23f..e68ee0f2c9 100644
--- a/Changelog
+++ b/Changelog
@@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
 
 version <next>:
 - libaribcaption decoder
+- recognize AAC in MXF (SMPTE ST 381-4)
 
 version 6.0:
 - Radiance HDR image support
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 8ef928b8fc..deb6091003 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -78,6 +78,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15,        AV_CODEC_ID_AC3 },
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15,        AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
   //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15,    AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0D,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00 }, 13,        AV_CODEC_ID_AAC }, /* AAC SMPTE 381-4 */
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
 };
 
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 8a7008b298..c5960ecf0c 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1628,6 +1628,9 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE, NULL, 13 }, /* D-10 Mapping 50Mbps PAL Extended Template */
     { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,       AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x16,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_adif_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x17,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_adts_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x18,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_latm_loas_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
 };
 
@@ -3029,6 +3032,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
                     st->codecpar->codec_id = AV_CODEC_ID_PCM_S32BE;
             } else if (st->codecpar->codec_id == AV_CODEC_ID_MP2) {
                 sti->need_parsing = AVSTREAM_PARSE_FULL;
+            } else if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
+                sti->need_parsing = AVSTREAM_PARSE_FULL;
             }
             st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id);
 
-- 
2.29.2


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
  2023-04-27 22:17 [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4 Ammon Riley
@ 2023-05-08 22:58 ` Marton Balint
  2023-05-10 18:06   ` Ammon Riley
  0 siblings, 1 reply; 4+ messages in thread
From: Marton Balint @ 2023-05-08 22:58 UTC (permalink / raw)
  To: Ammon Riley; +Cc: ffmpeg-devel



On Thu, 27 Apr 2023, Ammon Riley wrote:

> This patch simply recognizes the AAC audio tracks during
> decode -- it does not add functionality to encode AAC in
> MXF.
>
> A sample file (st381-4-sample.mxf) has been uploaded to
> https://streams.videolan.org/upload/, and is also available
> at https://harmonicinc.box.com/v/st381-4-sample.  Audio
> and video are both licensed as CC0.
>

> From 9765ec18f65b8ae147660e0d71bfa80293e57f56 Mon Sep 17 00:00:00 2001
> From: Ammon Riley <ammon.riley@harmonicinc.com>
> Date: Wed, 26 Apr 2023 18:26:35 -0700
> Subject: [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
> 
> This patch simply recognizes the AAC audio track during
> decode -- it does not add functionality to encode AAC in
> MXF.
> 
> Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
> ---
>  Changelog            | 1 +
>  libavformat/mxf.c    | 1 +
>  libavformat/mxfdec.c | 5 +++++
>  3 files changed, 7 insertions(+)
> 
> diff --git a/Changelog b/Changelog
> index a40f32c23f..e68ee0f2c9 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
>
>  version <next>:
>  - libaribcaption decoder
> +- recognize AAC in MXF (SMPTE ST 381-4)

I think such small change does not warrant a changelog entry.

>
>  version 6.0:
>  - Radiance HDR image support
> diff --git a/libavformat/mxf.c b/libavformat/mxf.c
> index 8ef928b8fc..deb6091003 100644
> --- a/libavformat/mxf.c
> +++ b/libavformat/mxf.c
> @@ -78,6 +78,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
>      { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15,        AV_CODEC_ID_AC3 },
>      { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15,        AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
>    //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15,    AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0D,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00 }, 13,        AV_CODEC_ID_AAC }, /* AAC SMPTE 381-4 */

If I read the SMPTE registry correctly, AAC is only ... 0x04 0x03, and ... 0x04 0x04.

>      { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
>  };
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index 8a7008b298..c5960ecf0c 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -1628,6 +1628,9 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
>      { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE, NULL, 13 }, /* D-10 Mapping 50Mbps PAL Extended Template */
>      { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
>      { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,       AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x16,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_adif_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */
> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x17,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_adts_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */
> +    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x18,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, "aac_latm_loas_smpte_381_4", 14 }, /* AAC SMPTE 381-4 */

description fields are only used for data, so you can simply use NULL for them for AAC.

>      { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
>  };
> 
> @@ -3029,6 +3032,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
>                      st->codecpar->codec_id = AV_CODEC_ID_PCM_S32BE;
>              } else if (st->codecpar->codec_id == AV_CODEC_ID_MP2) {
>                  sti->need_parsing = AVSTREAM_PARSE_FULL;
> +            } else if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
> +                sti->need_parsing = AVSTREAM_PARSE_FULL;
>              }
>              st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id);
>
-- 
2.29.2

Regards,
Marton
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
  2023-05-08 22:58 ` Marton Balint
@ 2023-05-10 18:06   ` Ammon Riley
  2023-05-11 20:16     ` Marton Balint
  0 siblings, 1 reply; 4+ messages in thread
From: Ammon Riley @ 2023-05-10 18:06 UTC (permalink / raw)
  To: Marton Balint; +Cc: ffmpeg-devel

[-- Attachment #1: Type: text/plain, Size: 4393 bytes --]

Hi Marton,

Thanks for your feedback.

On Mon, May 8, 2023 at 3:58 PM Marton Balint <cus@passwd.hu> wrote:
> On Thu, 27 Apr 2023, Ammon Riley wrote:
> > This patch simply recognizes the AAC audio tracks during
> > decode -- it does not add functionality to encode AAC in
> > MXF.
> >
> > A sample file (st381-4-sample.mxf) has been uploaded to
> > https://streams.videolan.org/upload/, and is also available
> > at https://harmonicinc.box.com/v/st381-4-sample.  Audio
> > and video are both licensed as CC0.
>
> > From 9765ec18f65b8ae147660e0d71bfa80293e57f56 Mon Sep 17 00:00:00 2001
> > From: Ammon Riley <ammon.riley@harmonicinc.com>
> > Date: Wed, 26 Apr 2023 18:26:35 -0700
> > Subject: [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
> >
> > This patch simply recognizes the AAC audio track during
> > decode -- it does not add functionality to encode AAC in
> > MXF.
> >
> > Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
> > ---
> >  Changelog            | 1 +
> >  libavformat/mxf.c    | 1 +
> >  libavformat/mxfdec.c | 5 +++++
> >  3 files changed, 7 insertions(+)
> >
> > diff --git a/Changelog b/Changelog
> > index a40f32c23f..e68ee0f2c9 100644
> > --- a/Changelog
> > +++ b/Changelog
> > @@ -3,6 +3,7 @@ releases are sorted from youngest to oldest.
> >
> >  version <next>:
> >  - libaribcaption decoder
> > +- recognize AAC in MXF (SMPTE ST 381-4)
>
> I think such small change does not warrant a changelog entry.

Removed.

> > diff --git a/libavformat/mxf.c b/libavformat/mxf.c
> > index 8ef928b8fc..deb6091003 100644
> > --- a/libavformat/mxf.c
> > +++ b/libavformat/mxf.c
> > @@ -78,6 +78,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
> >      { {
0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00
}, 15,        AV_CODEC_ID_AC3 },
> >      { {
0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00
}, 15,        AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
> >    //{ {
0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00
}, 15,    AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
> > +    { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0D,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00
}, 13,        AV_CODEC_ID_AAC }, /* AAC SMPTE 381-4 */
>
> If I read the SMPTE registry correctly, AAC is only ... 0x04 0x03, and
... 0x04 0x04.

Correct.  I wasn't sure whether adding both of those more specific ULs
would be considered polluting the table unnecessarily.  In retrospect,
the UL above merely "Identifies MPEG Audio Compression" (per Table 5),
which could also include non-AAC MPEG audio.  Though Table 6 doesn't
currently define anything other than AAC audio, that's not a guarantee some
future update to the spec won't add it.

> >      { {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
},  0,       AV_CODEC_ID_NONE },
> >  };
> >
> > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > index 8a7008b298..c5960ecf0c 100644
> > --- a/libavformat/mxfdec.c
> > +++ b/libavformat/mxfdec.c
> > @@ -1628,6 +1628,9 @@ static const MXFCodecUL
mxf_sound_essence_container_uls[] = {
> >      { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01
}, 14, AV_CODEC_ID_PCM_S16LE, NULL, 13 }, /* D-10 Mapping 50Mbps PAL
Extended Template */
> >      { {
0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F
}, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
> >      { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00
}, 14,       AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
> > +    { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x16,0x00,0x00
}, 14,       AV_CODEC_ID_AAC, "aac_adif_smpte_381_4", 14 }, /* AAC SMPTE
381-4 */
> > +    { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x17,0x00,0x00
}, 14,       AV_CODEC_ID_AAC, "aac_adts_smpte_381_4", 14 }, /* AAC SMPTE
381-4 */
> > +    { {
0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x18,0x00,0x00
}, 14,       AV_CODEC_ID_AAC, "aac_latm_loas_smpte_381_4", 14 }, /* AAC
SMPTE 381-4 */
>
> description fields are only used for data, so you can simply use NULL for
them for AAC.

Changed.

Updated patch attached.

Cheers,
Ammon

[-- Attachment #2: 0001-avcodec-mxfdec-Recognize-AAC-per-SMPTE-ST-381-4.patch --]
[-- Type: text/x-patch, Size: 3377 bytes --]

From 488f586a5cc1ccf7880a0191151093524c409c28 Mon Sep 17 00:00:00 2001
From: Ammon Riley <ammon.riley@harmonicinc.com>
Date: Wed, 26 Apr 2023 18:26:35 -0700
Subject: [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4

This patch simply recognizes the AAC audio track during
decode -- it does not add functionality to encode AAC in
MXF.

Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
---
 libavformat/mxf.c    | 2 ++
 libavformat/mxfdec.c | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 8ef928b8fc..9c5f480cb5 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -78,6 +78,8 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15,        AV_CODEC_ID_AC3 },
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15,        AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
   //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15,    AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x02,0x02,0x02,0x04,0x03,0x00,0x00 }, 14,        AV_CODEC_ID_AAC }, /* MPEG-2 AAC SMPTE 381-4 */
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x02,0x02,0x02,0x04,0x04,0x00,0x00 }, 14,        AV_CODEC_ID_AAC }, /* MPEG-4 AAC SMPTE 381-4 */
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
 };
 
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 8a7008b298..34230ece98 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1628,6 +1628,9 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE, NULL, 13 }, /* D-10 Mapping 50Mbps PAL Extended Template */
     { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,       AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x16,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, NULL, 14 }, /* AAC ADIF (SMPTE 381-4) */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x17,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, NULL, 14 }, /* AAC ADTS (SMPTE 381-4) */
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x18,0x00,0x00 }, 14,       AV_CODEC_ID_AAC, NULL, 14 }, /* AAC LATM/LOAS (SMPTE 381-4) */
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
 };
 
@@ -3029,6 +3032,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
                     st->codecpar->codec_id = AV_CODEC_ID_PCM_S32BE;
             } else if (st->codecpar->codec_id == AV_CODEC_ID_MP2) {
                 sti->need_parsing = AVSTREAM_PARSE_FULL;
+            } else if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
+                sti->need_parsing = AVSTREAM_PARSE_FULL;
             }
             st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id);
 
-- 
2.39.2


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4
  2023-05-10 18:06   ` Ammon Riley
@ 2023-05-11 20:16     ` Marton Balint
  0 siblings, 0 replies; 4+ messages in thread
From: Marton Balint @ 2023-05-11 20:16 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



On Wed, 10 May 2023, Ammon Riley wrote:

> Hi Marton,
>
> Thanks for your feedback.

Thanks for the updated patch, will apply.

Regards,
Marton
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-11 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27 22:17 [FFmpeg-devel] [PATCH] avcodec/mxfdec: Recognize AAC per SMPTE ST 381-4 Ammon Riley
2023-05-08 22:58 ` Marton Balint
2023-05-10 18:06   ` Ammon Riley
2023-05-11 20:16     ` Marton Balint

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