diff mbox series

[FFmpeg-devel,4/5] avcodec: add "Argonaut Games Video" descriptor

Message ID 20200907131326.32737-5-zane@zanevaniperen.com
State Rejected
Headers show
Series Add demuxer for Argonaut Games BRP files | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Zane van Iperen Sept. 7, 2020, 1:14 p.m. UTC
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
---
 libavcodec/codec_desc.c | 7 +++++++
 libavcodec/codec_id.h   | 1 +
 libavcodec/version.h    | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

Comments

Paul B Mahol Sept. 7, 2020, 2:33 p.m. UTC | #1
On Mon, Sep 07, 2020 at 01:14:26PM +0000, Zane van Iperen wrote:
> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
> ---
>  libavcodec/codec_desc.c | 7 +++++++
>  libavcodec/codec_id.h   | 1 +
>  libavcodec/version.h    | 2 +-
>  3 files changed, 9 insertions(+), 1 deletion(-)
>

If there is no actual video decoder source code ever
going to be added then no point in adding this.

> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
> index 9e73dcba27..f33585adaa 100644
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -1412,6 +1412,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
>          .long_name = NULL_IF_CONFIG_SMALL("PGX (JPEG2000 Test Format)"),
>          .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
>      },
> +    {
> +        .id        = AV_CODEC_ID_ARGO,
> +        .type      = AVMEDIA_TYPE_VIDEO,
> +        .name      = "argo",
> +        .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
> +        .props     = AV_CODEC_PROP_LOSSY,
> +    },
>      {
>          .id        = AV_CODEC_ID_Y41P,
>          .type      = AVMEDIA_TYPE_VIDEO,
> diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
> index e4eca5d580..3d115187b4 100644
> --- a/libavcodec/codec_id.h
> +++ b/libavcodec/codec_id.h
> @@ -242,6 +242,7 @@ enum AVCodecID {
>      AV_CODEC_ID_RSCC,
>      AV_CODEC_ID_AVS2,
>      AV_CODEC_ID_PGX,
> +    AV_CODEC_ID_ARGO,
>  
>      AV_CODEC_ID_Y41P = 0x8000,
>      AV_CODEC_ID_AVRP,
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 4b221f96ad..5ce4ba55d9 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -28,7 +28,7 @@
>  #include "libavutil/version.h"
>  
>  #define LIBAVCODEC_VERSION_MAJOR  58
> -#define LIBAVCODEC_VERSION_MINOR 105
> +#define LIBAVCODEC_VERSION_MINOR 106
>  #define LIBAVCODEC_VERSION_MICRO 100
>  
>  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
> -- 
> 2.25.4
> 
> 
> _______________________________________________
> 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".
Zane van Iperen Sept. 7, 2020, 11:10 p.m. UTC | #2
On Mon, 7 Sep 2020 16:33:58 +0200
"Paul B Mahol" <onemda@gmail.com> wrote:

> 
> On Mon, Sep 07, 2020 at 01:14:26PM +0000, Zane van Iperen wrote:
> > Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
> > ---
> >  libavcodec/codec_desc.c | 7 +++++++
> >  libavcodec/codec_id.h   | 1 +
> >  libavcodec/version.h    | 2 +-
> >  3 files changed, 9 insertions(+), 1 deletion(-)
> >
> 
> If there is no actual video decoder source code ever
> going to be added then no point in adding this.
> 

I asked about this on IRC, and this was suggested.
If I leave it at AV_CODEC_ID_NONE, then the ffmpeg CLI complains with
"Could not find codec parameters". I don't want to set it to
AVMEDIA_TYPE_UNKNOWN because then you lose all the codec parameters.

I would like to add a decoder eventually, but I'd have to reverse
engineer it. There's also not many samples to work with, so I'm not sure
how viable it'd be.
James Almer Sept. 7, 2020, 11:15 p.m. UTC | #3
On 9/7/2020 8:10 PM, Zane van Iperen wrote:
> On Mon, 7 Sep 2020 16:33:58 +0200
> "Paul B Mahol" <onemda@gmail.com> wrote:
> 
>>
>> On Mon, Sep 07, 2020 at 01:14:26PM +0000, Zane van Iperen wrote:
>>> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
>>> ---
>>>  libavcodec/codec_desc.c | 7 +++++++
>>>  libavcodec/codec_id.h   | 1 +
>>>  libavcodec/version.h    | 2 +-
>>>  3 files changed, 9 insertions(+), 1 deletion(-)
>>>
>>
>> If there is no actual video decoder source code ever
>> going to be added then no point in adding this.
>>
> 
> I asked about this on IRC, and this was suggested.
> If I leave it at AV_CODEC_ID_NONE, then the ffmpeg CLI complains with
> "Could not find codec parameters". I don't want to set it to
> AVMEDIA_TYPE_UNKNOWN because then you lose all the codec parameters.
> 
> I would like to add a decoder eventually, but I'd have to reverse
> engineer it. There's also not many samples to work with, so I'm not sure
> how viable it'd be.

You could change the demuxer you submitted to simply skip the video
track and demux only the audio, which afaik can be decoded by libavcodec.
If this Argo video codec was supported by some other container then it
would make sense adding a descriptor for it, as it would allow remuxing.
But as is, it's probably better not to bother with it.
Zane van Iperen Sept. 8, 2020, 3:40 a.m. UTC | #4
On Mon, 7 Sep 2020 20:15:28 -0300
"James Almer" <jamrial@gmail.com> wrote:
> 
> You could change the demuxer you submitted to simply skip the video
> track and demux only the audio, which afaik can be decoded by libavcodec.
> If this Argo video codec was supported by some other container then it
> would make sense adding a descriptor for it, as it would allow remuxing.
> But as is, it's probably better not to bother with it.

Fair enough. I would like to keep all the info such as size, pixel
format, etc. (as its still useful information), so I'll use
AV_CODEC_ID_NONE so it's ignored.
diff mbox series

Patch

diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 9e73dcba27..f33585adaa 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1412,6 +1412,13 @@  static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("PGX (JPEG2000 Test Format)"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
+    {
+        .id        = AV_CODEC_ID_ARGO,
+        .type      = AVMEDIA_TYPE_VIDEO,
+        .name      = "argo",
+        .long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
+        .props     = AV_CODEC_PROP_LOSSY,
+    },
     {
         .id        = AV_CODEC_ID_Y41P,
         .type      = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index e4eca5d580..3d115187b4 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -242,6 +242,7 @@  enum AVCodecID {
     AV_CODEC_ID_RSCC,
     AV_CODEC_ID_AVS2,
     AV_CODEC_ID_PGX,
+    AV_CODEC_ID_ARGO,
 
     AV_CODEC_ID_Y41P = 0x8000,
     AV_CODEC_ID_AVRP,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 4b221f96ad..5ce4ba55d9 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@ 
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  58
-#define LIBAVCODEC_VERSION_MINOR 105
+#define LIBAVCODEC_VERSION_MINOR 106
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \