summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorLeo Izen <leo.izen@gmail.com>2022-04-17 09:22:33 -0400
committerLynne <dev@lynne.ee>2022-04-23 19:51:46 +0200
commit0008c159562b877700cd9b7c96f941de4ee69af5 (patch)
treeb4ad0a200c3584356d0e8e8f0719235a96693e4a /libavcodec
parentce23794b91031162da365a0d389fd0330cdb9486 (diff)
avcodec/jpegxl: add Jpeg XL image codec
This commit adds support to libavcodec to read encoded Jpeg XL images. Jpeg XL is intended to be an extended-life replacement to legacy mjpeg.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/codec_desc.c9
-rw-r--r--libavcodec/codec_id.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index c08854cc93..e7f0f6a8d4 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1870,6 +1870,15 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("Vizrt Binary Image"),
.props = AV_CODEC_PROP_LOSSY,
},
+ {
+ .id = AV_CODEC_ID_JPEGXL,
+ .type = AVMEDIA_TYPE_VIDEO,
+ .name = "jpegxl",
+ .long_name = NULL_IF_CONFIG_SMALL("JPEG XL"),
+ .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY |
+ AV_CODEC_PROP_LOSSLESS,
+ .mime_types= MT("image/jxl"),
+ },
/* various PCM "codecs" */
{
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index 43c72ce8e4..8b317fa121 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -309,6 +309,7 @@ enum AVCodecID {
AV_CODEC_ID_SGA_VIDEO,
AV_CODEC_ID_GEM,
AV_CODEC_ID_VBN,
+ AV_CODEC_ID_JPEGXL,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs