diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-07-03 23:50:05 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-07-16 21:43:54 +0200 |
commit | 307ab7fe8a47ff0184af9c7e4155c9a6437a87d5 (patch) | |
tree | 56562a78ad31c1f70bdd9bce07572a57e483caa0 /libavformat/img2dec.c | |
parent | 4136405c86162063e45d40d55c9985f348d4ea0a (diff) | |
download | ffmpeg-307ab7fe8a47ff0184af9c7e4155c9a6437a87d5.tar.gz |
avcodec: add Radiance HDR image format support
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index e7ff26e5dd..fbc8a4517a 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1070,6 +1070,13 @@ static int pam_probe(const AVProbeData *p) return pnm_magic_check(p, 7) ? pnm_probe(p) : 0; } +static int hdr_probe(const AVProbeData *p) +{ + if (!memcmp(p->buf, "#?RADIANCE\n", 11)) + return AVPROBE_SCORE_MAX; + return 0; +} + static int xbm_probe(const AVProbeData *p) { if (!memcmp(p->buf, "/* XBM X10 format */", 20)) @@ -1221,6 +1228,7 @@ IMAGEAUTO_DEMUXER(dpx, DPX) IMAGEAUTO_DEMUXER(exr, EXR) IMAGEAUTO_DEMUXER(gem, GEM) IMAGEAUTO_DEMUXER(gif, GIF) +IMAGEAUTO_DEMUXER(hdr, RADIANCE_HDR) IMAGEAUTO_DEMUXER_EXT(j2k, JPEG2000, J2K) IMAGEAUTO_DEMUXER_EXT(jpeg, MJPEG, JPEG) IMAGEAUTO_DEMUXER(jpegls, JPEGLS) |