diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-07-01 10:06:15 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-07-03 15:16:31 +0200 |
commit | ff1450e449f848ad4b37b3cf448315ba4581364e (patch) | |
tree | 4c6e245afa51c3ec58bb0865ed27f2940acf4f4a /libavformat/img2dec.c | |
parent | 33fe3b73c2d4dec674509de5dc48698895f0806b (diff) | |
download | ffmpeg-ff1450e449f848ad4b37b3cf448315ba4581364e.tar.gz |
avcodec: add PHM decoder and encoder
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index e4912cb487..e7ff26e5dd 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1020,7 +1020,19 @@ static inline int pnm_probe(const AVProbeData *p) static int pbm_probe(const AVProbeData *p) { - return pnm_magic_check(p, 1) || pnm_magic_check(p, 4) || pnm_magic_check(p, 22) || pnm_magic_check(p, 54) ? pnm_probe(p) : 0; + return pnm_magic_check(p, 1) || pnm_magic_check(p, 4) ? pnm_probe(p) : 0; +} + +static int pfm_probe(const AVProbeData *p) +{ + return pnm_magic_check(p, 'F' - '0') || + pnm_magic_check(p, 'f' - '0') ? pnm_probe(p) : 0; +} + +static int phm_probe(const AVProbeData *p) +{ + return pnm_magic_check(p, 'H' - '0') || + pnm_magic_check(p, 'h' - '0') ? pnm_probe(p) : 0; } static inline int pgmx_probe(const AVProbeData *p) @@ -1216,9 +1228,11 @@ IMAGEAUTO_DEMUXER(jpegxl, JPEGXL) IMAGEAUTO_DEMUXER(pam, PAM) IMAGEAUTO_DEMUXER(pbm, PBM) IMAGEAUTO_DEMUXER(pcx, PCX) +IMAGEAUTO_DEMUXER(pfm, PFM) IMAGEAUTO_DEMUXER(pgm, PGM) IMAGEAUTO_DEMUXER(pgmyuv, PGMYUV) IMAGEAUTO_DEMUXER(pgx, PGX) +IMAGEAUTO_DEMUXER(phm, PHM) IMAGEAUTO_DEMUXER(photocd, PHOTOCD) IMAGEAUTO_DEMUXER(pictor, PICTOR) IMAGEAUTO_DEMUXER(png, PNG) |