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] avformat/matroska: Add support for A_ATRAC/AT1
@ 2023-03-06  0:57 asivery
  2023-03-06 18:39 ` Paul B Mahol
  2023-08-04 17:28 ` Andreas Rheinhardt
  0 siblings, 2 replies; 13+ messages in thread
From: asivery @ 2023-03-06  0:57 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: asivery <asivery@protonmail.com>
---
libavformat/matroska.c | 1 +
libavformat/matroskadec.c | 2 ++
2 files changed, 3 insertions(+)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 90d94b65bf..37305a523c 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
{"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
{"A_REAL/COOK" , AV_CODEC_ID_COOK},
{"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
+ {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
{"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
{"A_TTA1" , AV_CODEC_ID_TTA},
{"A_VORBIS" , AV_CODEC_ID_VORBIS},
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index d582f566a2..0aa8e6f3b3 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
track->audio.frame_size);
if (!track->audio.buf)
return AVERROR(ENOMEM);
+ } else if (codec_id == AV_CODEC_ID_ATRAC1) {
+ st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */
} else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
ret = matroska_parse_flac(s, track, &extradata_offset);
if (ret < 0)
--
2.34.1
_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-03-06  0:57 [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1 asivery
@ 2023-03-06 18:39 ` Paul B Mahol
  2023-03-06 18:51   ` asivery
  2023-08-04 17:28 ` Andreas Rheinhardt
  1 sibling, 1 reply; 13+ messages in thread
From: Paul B Mahol @ 2023-03-06 18:39 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On 3/6/23, asivery <asivery@protonmail.com> wrote:
> Signed-off-by: asivery <asivery@protonmail.com>
> ---
> libavformat/matroska.c | 1 +
> libavformat/matroskadec.c | 2 ++
> 2 files changed, 3 insertions(+)
>

where is this defined?


> diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> index 90d94b65bf..37305a523c 100644
> --- a/libavformat/matroska.c
> +++ b/libavformat/matroska.c
> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> {"A_TTA1" , AV_CODEC_ID_TTA},
> {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index d582f566a2..0aa8e6f3b3 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
> track->audio.frame_size);
> if (!track->audio.buf)
> return AVERROR(ENOMEM);
> + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC
> frame size */
> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> ret = matroska_parse_flac(s, track, &extradata_offset);
> if (ret < 0)
> --
> 2.34.1
> _______________________________________________
> 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".

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

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-03-06 18:39 ` Paul B Mahol
@ 2023-03-06 18:51   ` asivery
  2023-04-17  0:27     ` asivery
  0 siblings, 1 reply; 13+ messages in thread
From: asivery @ 2023-03-06 18:51 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1


------- Original Message -------
On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol <onemda@gmail.com> wrote:


> On 3/6/23, asivery asivery@protonmail.com wrote:
> 
> > Signed-off-by: asivery asivery@protonmail.com
> > ---
> > libavformat/matroska.c | 1 +
> > libavformat/matroskadec.c | 2 ++
> > 2 files changed, 3 insertions(+)
> 
> 
> where is this defined?
> 
> > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > index 90d94b65bf..37305a523c 100644
> > --- a/libavformat/matroska.c
> > +++ b/libavformat/matroska.c
> > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > {"A_TTA1" , AV_CODEC_ID_TTA},
> > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index d582f566a2..0aa8e6f3b3 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
> > track->audio.frame_size);
> > if (!track->audio.buf)
> > return AVERROR(ENOMEM);
> > + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC
> > frame size */
> > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> > ret = matroska_parse_flac(s, track, &extradata_offset);
> > if (ret < 0)
> > --
> > 2.34.1
> > _______________________________________________
> > 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".
_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-03-06 18:51   ` asivery
@ 2023-04-17  0:27     ` asivery
  2023-06-17  1:24       ` asivery
  0 siblings, 1 reply; 13+ messages in thread
From: asivery @ 2023-04-17  0:27 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

I'd appreciate it if someone took a look at this.
If there's anything I need to change to make this patch viable for merging, please let me know.

Best regards,
asivery
------- Original Message -------
On Monday, March 6th, 2023 at 7:51 PM, asivery <asivery@protonmail.com> wrote:


> It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1
> 
> 
> ------- Original Message -------
> On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote:
> 
> 
> 
> > On 3/6/23, asivery asivery@protonmail.com wrote:
> > 
> > > Signed-off-by: asivery asivery@protonmail.com
> > > ---
> > > libavformat/matroska.c | 1 +
> > > libavformat/matroskadec.c | 2 ++
> > > 2 files changed, 3 insertions(+)
> > 
> > where is this defined?
> > 
> > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > > index 90d94b65bf..37305a523c 100644
> > > --- a/libavformat/matroska.c
> > > +++ b/libavformat/matroska.c
> > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > > {"A_TTA1" , AV_CODEC_ID_TTA},
> > > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > index d582f566a2..0aa8e6f3b3 100644
> > > --- a/libavformat/matroskadec.c
> > > +++ b/libavformat/matroskadec.c
> > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
> > > track->audio.frame_size);
> > > if (!track->audio.buf)
> > > return AVERROR(ENOMEM);
> > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC
> > > frame size */
> > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> > > ret = matroska_parse_flac(s, track, &extradata_offset);
> > > if (ret < 0)
> > > --
> > > 2.34.1
> > > _______________________________________________
> > > 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".
_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-04-17  0:27     ` asivery
@ 2023-06-17  1:24       ` asivery
  2023-06-17  1:42         ` Andreas Rheinhardt
  0 siblings, 1 reply; 13+ messages in thread
From: asivery @ 2023-06-17  1:24 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly.

Thank you in advance.

------- Original Message -------
On Monday, April 17th, 2023 at 2:27 AM, asivery <asivery@protonmail.com> wrote:


> I'd appreciate it if someone took a look at this.
> If there's anything I need to change to make this patch viable for merging, please let me know.
> 
> Best regards,
> asivery
> ------- Original Message -------
> On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote:
> 
> 
> 
> > It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1
> > 
> > ------- Original Message -------
> > On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote:
> > 
> > > On 3/6/23, asivery asivery@protonmail.com wrote:
> > > 
> > > > Signed-off-by: asivery asivery@protonmail.com
> > > > ---
> > > > libavformat/matroska.c | 1 +
> > > > libavformat/matroskadec.c | 2 ++
> > > > 2 files changed, 3 insertions(+)
> > > 
> > > where is this defined?
> > > 
> > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > > > index 90d94b65bf..37305a523c 100644
> > > > --- a/libavformat/matroska.c
> > > > +++ b/libavformat/matroska.c
> > > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > > > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> > > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > > > {"A_TTA1" , AV_CODEC_ID_TTA},
> > > > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > > index d582f566a2..0aa8e6f3b3 100644
> > > > --- a/libavformat/matroskadec.c
> > > > +++ b/libavformat/matroskadec.c
> > > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
> > > > track->audio.frame_size);
> > > > if (!track->audio.buf)
> > > > return AVERROR(ENOMEM);
> > > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> > > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC
> > > > frame size */
> > > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> > > > ret = matroska_parse_flac(s, track, &extradata_offset);
> > > > if (ret < 0)
> > > > --
> > > > 2.34.1
> > > > _______________________________________________
> > > > 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".
_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-06-17  1:24       ` asivery
@ 2023-06-17  1:42         ` Andreas Rheinhardt
  2023-06-28 13:27           ` asivery
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2023-06-17  1:42 UTC (permalink / raw)
  To: ffmpeg-devel

asivery:
> Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly.
> 
> Thank you in advance.

Sorry for having missed this. I will look at it tomorrow.

- Andreas

> 
> ------- Original Message -------
> On Monday, April 17th, 2023 at 2:27 AM, asivery <asivery@protonmail.com> wrote:
> 
> 
>> I'd appreciate it if someone took a look at this.
>> If there's anything I need to change to make this patch viable for merging, please let me know.
>>
>> Best regards,
>> asivery
>> ------- Original Message -------
>> On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote:
>>
>>
>>
>>> It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1
>>>
>>> ------- Original Message -------
>>> On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote:
>>>
>>>> On 3/6/23, asivery asivery@protonmail.com wrote:
>>>>
>>>>> Signed-off-by: asivery asivery@protonmail.com
>>>>> ---
>>>>> libavformat/matroska.c | 1 +
>>>>> libavformat/matroskadec.c | 2 ++
>>>>> 2 files changed, 3 insertions(+)
>>>>
>>>> where is this defined?
>>>>
>>>>> diff --git a/libavformat/matroska.c b/libavformat/matroska.c
>>>>> index 90d94b65bf..37305a523c 100644
>>>>> --- a/libavformat/matroska.c
>>>>> +++ b/libavformat/matroska.c
>>>>> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
>>>>> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
>>>>> {"A_REAL/COOK" , AV_CODEC_ID_COOK},
>>>>> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
>>>>> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
>>>>> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
>>>>> {"A_TTA1" , AV_CODEC_ID_TTA},
>>>>> {"A_VORBIS" , AV_CODEC_ID_VORBIS},
>>>>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>>>>> index d582f566a2..0aa8e6f3b3 100644
>>>>> --- a/libavformat/matroskadec.c
>>>>> +++ b/libavformat/matroskadec.c
>>>>> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
>>>>> track->audio.frame_size);
>>>>> if (!track->audio.buf)
>>>>> return AVERROR(ENOMEM);
>>>>> + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
>>>>> + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC
>>>>> frame size */
>>>>> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
>>>>> ret = matroska_parse_flac(s, track, &extradata_offset);
>>>>> if (ret < 0)
>>>>> --
>>>>> 2.34.1

_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-06-17  1:42         ` Andreas Rheinhardt
@ 2023-06-28 13:27           ` asivery
  0 siblings, 0 replies; 13+ messages in thread
From: asivery @ 2023-06-28 13:27 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Hi, it's really not a problem. Thanks and please let me know if I need to change anything for this to be merged.

------- Original Message -------
On Saturday, June 17th, 2023 at 3:41 AM, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:


> asivery:
> 
> > Hello, apologies for bothering you all with this, but if anyone could take a look at this patch it would be great. The only other container that supports ATRAC1 is AEA, and it's not that good of a format since it has no magic number, and therefore is easily detected incorrectly.
> > 
> > Thank you in advance.
> 
> 
> Sorry for having missed this. I will look at it tomorrow.
> 
> - Andreas
> 
> > ------- Original Message -------
> > On Monday, April 17th, 2023 at 2:27 AM, asivery asivery@protonmail.com wrote:
> > 
> > > I'd appreciate it if someone took a look at this.
> > > If there's anything I need to change to make this patch viable for merging, please let me know.
> > > 
> > > Best regards,
> > > asivery
> > > ------- Original Message -------
> > > On Monday, March 6th, 2023 at 7:51 PM, asivery asivery@protonmail.com wrote:
> > > 
> > > > It's been added recently. Here's the definition: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#a_atracat1
> > > > 
> > > > ------- Original Message -------
> > > > On Monday, March 6th, 2023 at 7:39 PM, Paul B Mahol onemda@gmail.com wrote:
> > > > 
> > > > > On 3/6/23, asivery asivery@protonmail.com wrote:
> > > > > 
> > > > > > Signed-off-by: asivery asivery@protonmail.com
> > > > > > ---
> > > > > > libavformat/matroska.c | 1 +
> > > > > > libavformat/matroskadec.c | 2 ++
> > > > > > 2 files changed, 3 insertions(+)
> > > > > 
> > > > > where is this defined?
> > > > > 
> > > > > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > > > > > index 90d94b65bf..37305a523c 100644
> > > > > > --- a/libavformat/matroska.c
> > > > > > +++ b/libavformat/matroska.c
> > > > > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > > > > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > > > > > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > > > > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > > > > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> > > > > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > > > > > {"A_TTA1" , AV_CODEC_ID_TTA},
> > > > > > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > > > > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > > > > index d582f566a2..0aa8e6f3b3 100644
> > > > > > --- a/libavformat/matroskadec.c
> > > > > > +++ b/libavformat/matroskadec.c
> > > > > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
> > > > > > track->audio.frame_size);
> > > > > > if (!track->audio.buf)
> > > > > > return AVERROR(ENOMEM);
> > > > > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> > > > > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC
> > > > > > frame size */
> > > > > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> > > > > > ret = matroska_parse_flac(s, track, &extradata_offset);
> > > > > > if (ret < 0)
> > > > > > --
> > > > > > 2.34.1
> 
> 
> _______________________________________________
> 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".

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

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-03-06  0:57 [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1 asivery
  2023-03-06 18:39 ` Paul B Mahol
@ 2023-08-04 17:28 ` Andreas Rheinhardt
  2023-08-04 17:31   ` Andreas Rheinhardt
  1 sibling, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2023-08-04 17:28 UTC (permalink / raw)
  To: ffmpeg-devel

asivery:
> Signed-off-by: asivery <asivery@protonmail.com>
> ---
> libavformat/matroska.c | 1 +
> libavformat/matroskadec.c | 2 ++
> 2 files changed, 3 insertions(+)
> 
> diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> index 90d94b65bf..37305a523c 100644
> --- a/libavformat/matroska.c
> +++ b/libavformat/matroska.c
> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> {"A_TTA1" , AV_CODEC_ID_TTA},
> {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index d582f566a2..0aa8e6f3b3 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
> track->audio.frame_size);
> if (!track->audio.buf)
> return AVERROR(ENOMEM);
> + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */
> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> ret = matroska_parse_flac(s, track, &extradata_offset);
> if (ret < 0)
> --
> 2.34.1

This patch is broken. The indentation is off.

- Andreas

_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-08-04 17:28 ` Andreas Rheinhardt
@ 2023-08-04 17:31   ` Andreas Rheinhardt
  2024-02-12  0:34     ` asivery via ffmpeg-devel
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2023-08-04 17:31 UTC (permalink / raw)
  To: ffmpeg-devel

Andreas Rheinhardt:
> asivery:
>> Signed-off-by: asivery <asivery@protonmail.com>
>> ---
>> libavformat/matroska.c | 1 +
>> libavformat/matroskadec.c | 2 ++
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/libavformat/matroska.c b/libavformat/matroska.c
>> index 90d94b65bf..37305a523c 100644
>> --- a/libavformat/matroska.c
>> +++ b/libavformat/matroska.c
>> @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
>> {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
>> {"A_REAL/COOK" , AV_CODEC_ID_COOK},
>> {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
>> + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
>> {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
>> {"A_TTA1" , AV_CODEC_ID_TTA},
>> {"A_VORBIS" , AV_CODEC_ID_VORBIS},
>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> index d582f566a2..0aa8e6f3b3 100644
>> --- a/libavformat/matroskadec.c
>> +++ b/libavformat/matroskadec.c
>> @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
>> track->audio.frame_size);
>> if (!track->audio.buf)
>> return AVERROR(ENOMEM);
>> + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
>> + st->codecpar->block_align = track->audio.channels * 212; /* Constant ATRAC frame size */
>> } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
>> ret = matroska_parse_flac(s, track, &extradata_offset);
>> if (ret < 0)
>> --
>> 2.34.1
> 
> This patch is broken. The indentation is off.
> 
> - Andreas
> 

Apart from this: The result of the multiplication may not fit into an
int; looking at the other atrac1 code it seems that we only support mono
and stereo files. Is this a limitation of FFmpeg or of the format?

- Andreas

_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2023-08-04 17:31   ` Andreas Rheinhardt
@ 2024-02-12  0:34     ` asivery via ffmpeg-devel
  2024-02-12 10:55       ` Andreas Rheinhardt
  0 siblings, 1 reply; 13+ messages in thread
From: asivery via ffmpeg-devel @ 2024-02-12  0:34 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: asivery

I apologize for not having responded earlier.
I've attached the updated patch.


From 68c77320954e44a7f02e95537fc9a6436da7549c Mon Sep 17 00:00:00 2001
From: asivery <asivery@protonmail.com>
Date: Sun, 11 Feb 2024 23:13:07 +0100
Subject: [PATCH] avformat/matroska: Add support for A_ATRAC/AT1

Signed-off-by: asivery <asivery@protonmail.com>
---
 libavformat/matroska.c    | 1 +
 libavformat/matroskadec.c | 8 ++++++++
 libavformat/matroskaenc.c | 1 +
 3 files changed, 10 insertions(+)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 5878594e68..ae9ecc8207 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -53,6 +53,7 @@ const CodecTags ff_mkv_codec_tags[]={
     {"A_REAL/ATRC"      , AV_CODEC_ID_ATRAC3},
     {"A_REAL/COOK"      , AV_CODEC_ID_COOK},
     {"A_REAL/SIPR"      , AV_CODEC_ID_SIPR},
+    {"A_ATRAC/AT1"      , AV_CODEC_ID_ATRAC1},
     {"A_TRUEHD"         , AV_CODEC_ID_TRUEHD},
     {"A_TTA1"           , AV_CODEC_ID_TTA},
     {"A_VORBIS"         , AV_CODEC_ID_VORBIS},
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8f000f86be..1bb6e8605a 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2779,6 +2779,14 @@ static int mka_parse_audio_codec(MatroskaTrack *track, AVCodecParameters *par,
             return AVERROR(ENOMEM);
         break;
     }
+    case AV_CODEC_ID_ATRAC1:
+        /* ATRAC1 uses a constant frame size.
+         * Typical ATRAC1 streams are either mono or stereo.
+         * At most, ATRAC1 was used to store 8 channels of audio. */
+        if (track->audio.channels > 8)
+            return AVERROR_INVALIDDATA;
+        par->block_align = track->audio.channels * 212;
+        break;
     case AV_CODEC_ID_FLAC:
         if (track->codec_priv.size) {
             ret = matroska_parse_flac(s, track, extradata_offset);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 1457a6890c..aa25657f8f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -3483,6 +3483,7 @@ static const AVCodecTag additional_audio_tags[] = {
     { AV_CODEC_ID_QDM2,      0xFFFFFFFF },
     { AV_CODEC_ID_RA_144,    0xFFFFFFFF },
     { AV_CODEC_ID_TRUEHD,    0xFFFFFFFF },
+    { AV_CODEC_ID_ATRAC1,    0xFFFFFFFF },
     { AV_CODEC_ID_NONE,      0xFFFFFFFF }
 };
 
-- 
2.34.1





On Friday, August 4th, 2023 at 7:30 PM, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:

> Andreas Rheinhardt:
> 
> > asivery:
> > 
> > > Signed-off-by: asivery asivery@protonmail.com
> > > ---
> > > libavformat/matroska.c | 1 +
> > > libavformat/matroskadec.c | 2 ++
> > > 2 files changed, 3 insertions(+)
> > > 
> > > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > > index 90d94b65bf..37305a523c 100644
> > > --- a/libavformat/matroska.c
> > > +++ b/libavformat/matroska.c
> > > @@ -55,6 +55,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> > > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > > {"A_TTA1" , AV_CODEC_ID_TTA},
> > > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > > index d582f566a2..0aa8e6f3b3 100644
> > > --- a/libavformat/matroskadec.c
> > > +++ b/libavformat/matroskadec.c
> > > @@ -2795,6 +2795,8 @@ static int matroska_parse_tracks(AVFormatContext s)
> > > track->audio.frame_size);
> > > if (!track->audio.buf)
> > > return AVERROR(ENOMEM);
> > > + } else if (codec_id == AV_CODEC_ID_ATRAC1) {
> > > + st->codecpar->block_align = track->audio.channels * 212; / Constant ATRAC frame size */
> > > } else if (codec_id == AV_CODEC_ID_FLAC && track->codec_priv.size) {
> > > ret = matroska_parse_flac(s, track, &extradata_offset);
> > > if (ret < 0)
> > > --
> > > 2.34.1
> > 
> > This patch is broken. The indentation is off.
> > 
> > - Andreas
> 
> 
> Apart from this: The result of the multiplication may not fit into an
> int; looking at the other atrac1 code it seems that we only support mono
> and stereo files. Is this a limitation of FFmpeg or of the format?
> 
> - Andreas
> 
> _______________________________________________
> 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".

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

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2024-02-12  0:34     ` asivery via ffmpeg-devel
@ 2024-02-12 10:55       ` Andreas Rheinhardt
  2024-02-12 18:05         ` asivery via ffmpeg-devel
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2024-02-12 10:55 UTC (permalink / raw)
  To: ffmpeg-devel

asivery via ffmpeg-devel:
> I apologize for not having responded earlier.
> I've attached the updated patch.
> 
> 
> From 68c77320954e44a7f02e95537fc9a6436da7549c Mon Sep 17 00:00:00 2001
> From: asivery <asivery@protonmail.com>
> Date: Sun, 11 Feb 2024 23:13:07 +0100
> Subject: [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
> 
> Signed-off-by: asivery <asivery@protonmail.com>
> ---

Send your patch either via git send-email or as an attachment; if you
have comments for your patch (that are not supposed to be part of the
eventual commit and not its commit message), then put them here, in
between the --- and the affected files.

>  libavformat/matroska.c    | 1 +
>  libavformat/matroskadec.c | 8 ++++++++
>  libavformat/matroskaenc.c | 1 +
>  3 files changed, 10 insertions(+)
> 
> diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> index 5878594e68..ae9ecc8207 100644
> --- a/libavformat/matroska.c
> +++ b/libavformat/matroska.c
> @@ -53,6 +53,7 @@ const CodecTags ff_mkv_codec_tags[]={
>      {"A_REAL/ATRC"      , AV_CODEC_ID_ATRAC3},
>      {"A_REAL/COOK"      , AV_CODEC_ID_COOK},
>      {"A_REAL/SIPR"      , AV_CODEC_ID_SIPR},
> +    {"A_ATRAC/AT1"      , AV_CODEC_ID_ATRAC1},

This audio part of this list is ordered by the Matroska CodecID (i.e.
the string on the left). Please keep it that way.

>      {"A_TRUEHD"         , AV_CODEC_ID_TRUEHD},
>      {"A_TTA1"           , AV_CODEC_ID_TTA},
>      {"A_VORBIS"         , AV_CODEC_ID_VORBIS},
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index 8f000f86be..1bb6e8605a 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -2779,6 +2779,14 @@ static int mka_parse_audio_codec(MatroskaTrack *track, AVCodecParameters *par,
>              return AVERROR(ENOMEM);
>          break;
>      }
> +    case AV_CODEC_ID_ATRAC1:
> +        /* ATRAC1 uses a constant frame size.
> +         * Typical ATRAC1 streams are either mono or stereo.
> +         * At most, ATRAC1 was used to store 8 channels of audio. */
> +        if (track->audio.channels > 8)
> +            return AVERROR_INVALIDDATA;
> +        par->block_align = track->audio.channels * 212;
> +        break;
>      case AV_CODEC_ID_FLAC:
>          if (track->codec_priv.size) {
>              ret = matroska_parse_flac(s, track, extradata_offset);
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 1457a6890c..aa25657f8f 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -3483,6 +3483,7 @@ static const AVCodecTag additional_audio_tags[] = {
>      { AV_CODEC_ID_QDM2,      0xFFFFFFFF },
>      { AV_CODEC_ID_RA_144,    0xFFFFFFFF },
>      { AV_CODEC_ID_TRUEHD,    0xFFFFFFFF },
> +    { AV_CODEC_ID_ATRAC1,    0xFFFFFFFF },

Please keep this list sorted alphabetically.

>      { AV_CODEC_ID_NONE,      0xFFFFFFFF }
>  };
>  

_______________________________________________
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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2024-02-12 10:55       ` Andreas Rheinhardt
@ 2024-02-12 18:05         ` asivery via ffmpeg-devel
  2024-02-13 14:29           ` Andreas Rheinhardt
  0 siblings, 1 reply; 13+ messages in thread
From: asivery via ffmpeg-devel @ 2024-02-12 18:05 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: asivery

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

I've attached the updated patch. Both new entries are now placed in an alphabetically correct way in their appropriate lists.

On Monday, February 12th, 2024 at 11:53 AM, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:

> asivery via ffmpeg-devel:
> 
> > I apologize for not having responded earlier.
> > I've attached the updated patch.
> > 
> > From 68c77320954e44a7f02e95537fc9a6436da7549c Mon Sep 17 00:00:00 2001
> > From: asivery asivery@protonmail.com
> > Date: Sun, 11 Feb 2024 23:13:07 +0100
> > Subject: [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
> > 
> > Signed-off-by: asivery asivery@protonmail.com
> > ---
> 
> 
> Send your patch either via git send-email or as an attachment; if you
> have comments for your patch (that are not supposed to be part of the
> eventual commit and not its commit message), then put them here, in
> between the --- and the affected files.
> 
> > libavformat/matroska.c | 1 +
> > libavformat/matroskadec.c | 8 ++++++++
> > libavformat/matroskaenc.c | 1 +
> > 3 files changed, 10 insertions(+)
> > 
> > diff --git a/libavformat/matroska.c b/libavformat/matroska.c
> > index 5878594e68..ae9ecc8207 100644
> > --- a/libavformat/matroska.c
> > +++ b/libavformat/matroska.c
> > @@ -53,6 +53,7 @@ const CodecTags ff_mkv_codec_tags[]={
> > {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
> > {"A_REAL/COOK" , AV_CODEC_ID_COOK},
> > {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
> > + {"A_ATRAC/AT1" , AV_CODEC_ID_ATRAC1},
> 
> 
> This audio part of this list is ordered by the Matroska CodecID (i.e.
> the string on the left). Please keep it that way.
> 
> > {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
> > {"A_TTA1" , AV_CODEC_ID_TTA},
> > {"A_VORBIS" , AV_CODEC_ID_VORBIS},
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 8f000f86be..1bb6e8605a 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -2779,6 +2779,14 @@ static int mka_parse_audio_codec(MatroskaTrack *track, AVCodecParameters par,
> > return AVERROR(ENOMEM);
> > break;
> > }
> > + case AV_CODEC_ID_ATRAC1:
> > + / ATRAC1 uses a constant frame size.
> > + * Typical ATRAC1 streams are either mono or stereo.
> > + * At most, ATRAC1 was used to store 8 channels of audio. */
> > + if (track->audio.channels > 8)
> > + return AVERROR_INVALIDDATA;
> > + par->block_align = track->audio.channels * 212;
> > + break;
> > case AV_CODEC_ID_FLAC:
> > if (track->codec_priv.size) {
> > ret = matroska_parse_flac(s, track, extradata_offset);
> > diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> > index 1457a6890c..aa25657f8f 100644
> > --- a/libavformat/matroskaenc.c
> > +++ b/libavformat/matroskaenc.c
> > @@ -3483,6 +3483,7 @@ static const AVCodecTag additional_audio_tags[] = {
> > { AV_CODEC_ID_QDM2, 0xFFFFFFFF },
> > { AV_CODEC_ID_RA_144, 0xFFFFFFFF },
> > { AV_CODEC_ID_TRUEHD, 0xFFFFFFFF },
> > + { AV_CODEC_ID_ATRAC1, 0xFFFFFFFF },
> 
> 
> Please keep this list sorted alphabetically.
> 
> > { AV_CODEC_ID_NONE, 0xFFFFFFFF }
> > };
> 
> 
> _______________________________________________
> 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".

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-avformat-matroska-Add-support-for-A_ATRAC-AT1.patch --]
[-- Type: text/x-patch; name=0001-avformat-matroska-Add-support-for-A_ATRAC-AT1.patch, Size: 2307 bytes --]

From a530931ebba6638b095720c222b72d2f3d5b0bd1 Mon Sep 17 00:00:00 2001
From: asivery <asivery@protonmail.com>
Date: Mon, 12 Feb 2024 19:01:32 +0100
Subject: [PATCH] avformat/matroska: Add support for A_ATRAC/AT1

Signed-off-by: asivery <asivery@protonmail.com>
---
 libavformat/matroska.c    | 1 +
 libavformat/matroskadec.c | 8 ++++++++
 libavformat/matroskaenc.c | 1 +
 3 files changed, 10 insertions(+)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 5878594e68..d0ecfbeb6a 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -28,6 +28,7 @@ const CodecTags ff_mkv_codec_tags[]={
     {"A_AAC"            , AV_CODEC_ID_AAC},
     {"A_AC3"            , AV_CODEC_ID_AC3},
     {"A_ALAC"           , AV_CODEC_ID_ALAC},
+    {"A_ATRAC/AT1"      , AV_CODEC_ID_ATRAC1},
     {"A_DTS"            , AV_CODEC_ID_DTS},
     {"A_EAC3"           , AV_CODEC_ID_EAC3},
     {"A_FLAC"           , AV_CODEC_ID_FLAC},
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8f000f86be..5d3d18a146 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2779,6 +2779,14 @@ static int mka_parse_audio_codec(MatroskaTrack *track, AVCodecParameters *par,
             return AVERROR(ENOMEM);
         break;
     }
+    case AV_CODEC_ID_ATRAC1:
+        /* ATRAC1 uses a constant frame size.
+         * Typical ATRAC1 streams are either mono or stereo.
+         * At most, ATRAC1 was used to store 8 channels of audio. */
+        if (track->audio.channels > 8)
+            return AVERROR_INVALIDDATA;
+        par->block_align = track->audio.channels * 212;
+        break;
     case AV_CODEC_ID_FLAC:
         if (track->codec_priv.size) {
             ret = matroska_parse_flac(s, track, extradata_offset);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 1457a6890c..21ce4aef3d 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -3474,6 +3474,7 @@ static int mkv_check_bitstream(AVFormatContext *s, AVStream *st,
 
 static const AVCodecTag additional_audio_tags[] = {
     { AV_CODEC_ID_ALAC,      0XFFFFFFFF },
+    { AV_CODEC_ID_ATRAC1,    0xFFFFFFFF },
     { AV_CODEC_ID_MLP,       0xFFFFFFFF },
     { AV_CODEC_ID_OPUS,      0xFFFFFFFF },
     { AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
-- 
2.34.1


[-- 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] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1
  2024-02-12 18:05         ` asivery via ffmpeg-devel
@ 2024-02-13 14:29           ` Andreas Rheinhardt
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Rheinhardt @ 2024-02-13 14:29 UTC (permalink / raw)
  To: ffmpeg-devel

asivery via ffmpeg-devel:
> I've attached the updated patch. Both new entries are now placed in an alphabetically correct way in their appropriate lists.
> 

Applied.

- Andreas

_______________________________________________
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] 13+ messages in thread

end of thread, other threads:[~2024-02-13 14:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  0:57 [FFmpeg-devel] [PATCH] avformat/matroska: Add support for A_ATRAC/AT1 asivery
2023-03-06 18:39 ` Paul B Mahol
2023-03-06 18:51   ` asivery
2023-04-17  0:27     ` asivery
2023-06-17  1:24       ` asivery
2023-06-17  1:42         ` Andreas Rheinhardt
2023-06-28 13:27           ` asivery
2023-08-04 17:28 ` Andreas Rheinhardt
2023-08-04 17:31   ` Andreas Rheinhardt
2024-02-12  0:34     ` asivery via ffmpeg-devel
2024-02-12 10:55       ` Andreas Rheinhardt
2024-02-12 18:05         ` asivery via ffmpeg-devel
2024-02-13 14:29           ` Andreas Rheinhardt

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