aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-08-08 21:19:29 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-08-08 22:43:15 +0200
commit4b63bcef907b410facfb337340fb81fe9f1e58f7 (patch)
tree7562b231325bcc638bd1a9514a158fe54ebc2998
parent0dcebb9f6345ecc7fa2f184c48cc5a21a3011b93 (diff)
downloadffmpeg-4b63bcef907b410facfb337340fb81fe9f1e58f7.tar.gz
Autodetect jpeg-ls files.
-rw-r--r--libavformat/Makefile1
-rw-r--r--libavformat/allformats.c1
-rw-r--r--libavformat/img2dec.c10
-rw-r--r--libavformat/version.h2
4 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 37f81ed49d..11d3e9c760 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -192,6 +192,7 @@ OBJS-$(CONFIG_IMAGE_BMP_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_DPX_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_EXR_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_J2K_PIPE_DEMUXER) += img2dec.o img2.o
+OBJS-$(CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_PICTOR_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_PNG_PIPE_DEMUXER) += img2dec.o img2.o
OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER) += img2dec.o img2.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 32bd3481ff..c3b9ba53ee 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -325,6 +325,7 @@ void av_register_all(void)
REGISTER_DEMUXER (IMAGE_DPX_PIPE, image_dpx_pipe);
REGISTER_DEMUXER (IMAGE_EXR_PIPE, image_exr_pipe);
REGISTER_DEMUXER (IMAGE_J2K_PIPE, image_j2k_pipe);
+ REGISTER_DEMUXER (IMAGE_JPEGLS_PIPE, image_jpegls_pipe);
REGISTER_DEMUXER (IMAGE_PICTOR_PIPE, image_pictor_pipe);
REGISTER_DEMUXER (IMAGE_PNG_PIPE, image_png_pipe);
REGISTER_DEMUXER (IMAGE_SGI_PIPE, image_sgi_pipe);
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 272adac69d..b9a1bcfb66 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -609,6 +609,15 @@ static int j2k_probe(AVProbeData *p)
return 0;
}
+static int jpegls_probe(AVProbeData *p)
+{
+ const uint8_t *b = p->buf;
+
+ if (AV_RB32(b) == 0xffd8fff7)
+ return AVPROBE_SCORE_EXTENSION + 1;
+ return 0;
+}
+
static int pictor_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
@@ -690,6 +699,7 @@ IMAGEAUTO_DEMUXER(bmp, AV_CODEC_ID_BMP)
IMAGEAUTO_DEMUXER(dpx, AV_CODEC_ID_DPX)
IMAGEAUTO_DEMUXER(exr, AV_CODEC_ID_EXR)
IMAGEAUTO_DEMUXER(j2k, AV_CODEC_ID_JPEG2000)
+IMAGEAUTO_DEMUXER(jpegls, AV_CODEC_ID_JPEGLS)
IMAGEAUTO_DEMUXER(pictor, AV_CODEC_ID_PICTOR)
IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
IMAGEAUTO_DEMUXER(sgi, AV_CODEC_ID_SGI)
diff --git a/libavformat/version.h b/libavformat/version.h
index 4fbce9acf7..140848d40d 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55
-#define LIBAVFORMAT_VERSION_MINOR 54
+#define LIBAVFORMAT_VERSION_MINOR 55
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \