mirror of https://git.ffmpeg.org/ffmpeg.git
lavf/img2dec: Autodetect dds frames.
This commit is contained in:
parent
f6ab967eae
commit
a876a4da4a
|
@ -202,6 +202,7 @@ OBJS-$(CONFIG_IMAGE2PIPE_MUXER) += img2enc.o img2.o
|
|||
OBJS-$(CONFIG_IMAGE2_ALIAS_PIX_DEMUXER) += img2_alias_pix.o
|
||||
OBJS-$(CONFIG_IMAGE2_BRENDER_PIX_DEMUXER) += img2_brender_pix.o
|
||||
OBJS-$(CONFIG_IMAGE_BMP_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_IMAGE_DDS_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
|
||||
|
|
|
@ -335,6 +335,7 @@ void av_register_all(void)
|
|||
|
||||
/* image demuxers */
|
||||
REGISTER_DEMUXER (IMAGE_BMP_PIPE, image_bmp_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_DDS_PIPE, image_dds_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_DPX_PIPE, image_dpx_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_EXR_PIPE, image_exr_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_J2K_PIPE, image_j2k_pipe);
|
||||
|
|
|
@ -609,6 +609,17 @@ static int bmp_probe(AVProbeData *p)
|
|||
return AVPROBE_SCORE_EXTENSION / 4;
|
||||
}
|
||||
|
||||
static int dds_probe(AVProbeData *p)
|
||||
{
|
||||
const uint8_t *b = p->buf;
|
||||
|
||||
if ( AV_RB64(b) == 0x444453207c000000
|
||||
&& AV_RL32(b + 8)
|
||||
&& AV_RL32(b + 12))
|
||||
return AVPROBE_SCORE_MAX - 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dpx_probe(AVProbeData *p)
|
||||
{
|
||||
const uint8_t *b = p->buf;
|
||||
|
@ -799,6 +810,7 @@ AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\
|
|||
};
|
||||
|
||||
IMAGEAUTO_DEMUXER(bmp, AV_CODEC_ID_BMP)
|
||||
IMAGEAUTO_DEMUXER(dds, AV_CODEC_ID_DDS)
|
||||
IMAGEAUTO_DEMUXER(dpx, AV_CODEC_ID_DPX)
|
||||
IMAGEAUTO_DEMUXER(exr, AV_CODEC_ID_EXR)
|
||||
IMAGEAUTO_DEMUXER(j2k, AV_CODEC_ID_JPEG2000)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "libavutil/version.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 56
|
||||
#define LIBAVFORMAT_VERSION_MINOR 39
|
||||
#define LIBAVFORMAT_VERSION_MINOR 40
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
|
Loading…
Reference in New Issue