Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  lavf/msnwc: Return 0 if the probe function does not detect msnwc-tcp.
  lavf/mpegts: Return 0 if the probe function does not detect mpegts.
  lavf/img2dec: Improve detection of valid Quickdraw images.
  lavf/asfdec: Reduce minimum header size.
  Changelog: Add jpeg 2000 improvements before they get forgotten.
  lavf/img2dec: Autodetect dds frames.

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-29 17:29:13 +02:00
commit e55e5be982
8 changed files with 32 additions and 10 deletions

View File

@ -10,6 +10,7 @@ version <next>:
- ssim filter
- rewritten ASF demuxer
- showvolume filter
- Many improvements to the JPEG 2000 decoder
version 2.7:

View File

@ -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

View File

@ -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);

View File

@ -132,8 +132,9 @@ static const AVClass asf_class = {
#include <assert.h>
#define ASF_MAX_STREAMS 127
#define FRAME_HEADER_SIZE 11
// Fix Me! FRAME_HEADER_SIZE may be different. (17 is known to be too large)
#define FRAME_HEADER_SIZE 6
// Fix Me! FRAME_HEADER_SIZE may be different.
// (7 is known to be too large for GipsyGuitar.wmv)
#ifdef DEBUG
static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */

View File

@ -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;
@ -714,9 +725,15 @@ static int qdraw_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
if (!b[10] && AV_RB32(b+11) == 0x1102ff0c && !b[15] ||
p->buf_size >= 528 && !b[522] && AV_RB32(b+523) == 0x1102ff0c && !b[527])
return AVPROBE_SCORE_EXTENSION + 1;
if ( p->buf_size >= 528
&& (AV_RB64(b + 520) & 0xFFFFFFFFFFFF) == 0x001102ff0c00
&& AV_RB16(b + 520)
&& AV_RB16(b + 518))
return AVPROBE_SCORE_MAX * 3 / 4;
if ( (AV_RB64(b + 8) & 0xFFFFFFFFFFFF) == 0x001102ff0c00
&& AV_RB16(b + 8)
&& AV_RB16(b + 6))
return AVPROBE_SCORE_EXTENSION / 4;
return 0;
}
@ -799,6 +816,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)

View File

@ -2439,7 +2439,7 @@ static int mpegts_probe(AVProbeData *p)
#define CHECK_BLOCK 100
if (check_count < CHECK_COUNT)
return AVERROR_INVALIDDATA;
return 0;
for (i = 0; i<check_count; i+=CHECK_BLOCK) {
int left = FFMIN(check_count - i, CHECK_BLOCK);
@ -2459,7 +2459,7 @@ static int mpegts_probe(AVProbeData *p)
if (sumscore > 6) return AVPROBE_SCORE_MAX + sumscore - CHECK_COUNT;
else if (maxscore > 6) return AVPROBE_SCORE_MAX/2 + sumscore - CHECK_COUNT;
else
return AVERROR_INVALIDDATA;
return 0;
}
/* return the 90kHz PCR and the extension for the 27MHz PCR. return

View File

@ -67,7 +67,7 @@ static int msnwc_tcp_probe(AVProbeData *p)
}
}
return -1;
return 0;
}
static int msnwc_tcp_read_header(AVFormatContext *ctx)

View File

@ -30,8 +30,8 @@
#include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR 39
#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_MINOR 40
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \