This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 553321d59e libavcodec/hdrdec: accept "#?RGBE" header in addition to
"#?RADIANCE"
553321d59e is described below
commit 553321d59eca201a337bddffe0a68b3a77bb1592
Author: Kirill Gavrilov <[email protected]>
AuthorDate: Fri Jan 24 20:28:11 2025 +0300
Commit: Marton Balint <[email protected]>
CommitDate: Wed May 13 19:35:33 2026 +0000
libavcodec/hdrdec: accept "#?RGBE" header in addition to "#?RADIANCE"
Some Radiance HDR image files in the wild have "#?RGBE" header,
which other image readers accept.
Also updated hdr_probe() in libavformat/img2dec.
---
libavcodec/hdrdec.c | 2 +-
libavformat/img2dec.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/hdrdec.c b/libavcodec/hdrdec.c
index 1a6935ff75..7f3b830b6d 100644
--- a/libavcodec/hdrdec.c
+++ b/libavcodec/hdrdec.c
@@ -98,7 +98,7 @@ static int hdr_decode_frame(AVCodecContext *avctx, AVFrame *p,
bytestream2_init(&gb, avpkt->data, avpkt->size);
hdr_get_line(&gb, line, sizeof(line));
- if (memcmp("#?RADIANCE\n", line, 11))
+ if (memcmp("#?RADIANCE\n", line, 11) && memcmp("#?RGBE\n", line, 7))
return AVERROR_INVALIDDATA;
do {
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 921458fea9..73ff61fa94 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -1064,7 +1064,7 @@ static int pam_probe(const AVProbeData *p)
static int hdr_probe(const AVProbeData *p)
{
- if (!memcmp(p->buf, "#?RADIANCE\n", 11))
+ if (!memcmp(p->buf, "#?RADIANCE\n", 11) || !memcmp(p->buf, "#?RGBE\n", 7))
return AVPROBE_SCORE_MAX;
return 0;
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]