We truncated the diff of some files because they were too big.
If you want to see the full diff for every file, click here.
Changes of Revision 7
avidemux3.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Tue Jun 24 2014 - joerg.lorenzen@ki.tng.de
4
+- update internal ffmpeg to version 1.2.7
5
+
6
+-------------------------------------------------------------------
7
Fri Mar 14 2014 - joerg.lorenzen@ki.tng.de
8
- Update to version 2.6.8
9
* Image/export: Proper initialization of Qz for jpeg export
10
avidemux3.spec
Changed
10
1
2
#
3
4
5
-%define ffmpeg_version 1.2.6
6
+%define ffmpeg_version 1.2.7
7
8
Name: avidemux3
9
Summary: Graphical video editing and transcoding tool
10
ffmpeg-1.2.6.tar.bz2/RELEASE -> ffmpeg-1.2.7.tar.bz2/RELEASE
Changed
4
1
2
-1.2.6
3
+1.2.7
4
ffmpeg-1.2.6.tar.bz2/VERSION -> ffmpeg-1.2.7.tar.bz2/VERSION
Changed
4
1
2
-1.2.6
3
+1.2.7
4
ffmpeg-1.2.6.tar.bz2/configure -> ffmpeg-1.2.7.tar.bz2/configure
Changed
10
1
2
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
3
enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
4
enabled libass && require_pkg_config libass ass/ass.h ass_library_init
5
-enabled libbluray && require libbluray libbluray/bluray.h bd_open -lbluray
6
+enabled libbluray && require_pkg_config libbluray libbluray/bluray.h bd_open
7
enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
8
{ check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
9
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
10
ffmpeg-1.2.6.tar.bz2/doc/Doxyfile -> ffmpeg-1.2.7.tar.bz2/doc/Doxyfile
Changed
10
1
2
# This could be handy for archiving the generated documentation or
3
# if some version control system is used.
4
5
-PROJECT_NUMBER = 1.2.6
6
+PROJECT_NUMBER = 1.2.7
7
8
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
9
# in the documentation. The maximum height of the logo should not exceed 55
10
ffmpeg-1.2.6.tar.bz2/ffmpeg_filter.c -> ffmpeg-1.2.7.tar.bz2/ffmpeg_filter.c
Changed
20
1
2
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
3
int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
4
enum AVPixelFormat best= AV_PIX_FMT_NONE;
5
+ const enum AVPixelFormat mjpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE };
6
+ const enum AVPixelFormat ljpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P,
7
+ AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE };
8
+
9
if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
10
if (st->codec->codec_id == AV_CODEC_ID_MJPEG) {
11
- p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE };
12
+ p = mjpeg_formats;
13
} else if (st->codec->codec_id == AV_CODEC_ID_LJPEG) {
14
- p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P,
15
- AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE };
16
+ p =ljpeg_formats;
17
}
18
}
19
for (; *p != AV_PIX_FMT_NONE; p++) {
20
ffmpeg-1.2.6.tar.bz2/ffprobe.c -> ffmpeg-1.2.7.tar.bz2/ffprobe.c
Changed
9
1
2
vald /= pow(10, index * 3);
3
prefix_string = decimal_unit_prefixes[index];
4
}
5
+ vali = vald;
6
}
7
8
if (show_float || (use_value_prefix && vald != (long long int)vald))
9
ffmpeg-1.2.6.tar.bz2/libavcodec/aac.h -> ffmpeg-1.2.7.tar.bz2/libavcodec/aac.h
Changed
10
1
2
INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions.
3
};
4
5
-#define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10)
6
+#define IS_CODEBOOK_UNSIGNED(x) (((x) - 1) & 10)
7
8
enum ChannelPosition {
9
AAC_CHANNEL_OFF = 0,
10
ffmpeg-1.2.6.tar.bz2/libavcodec/adpcm.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/adpcm.c
Changed
68
1
2
* @param[out] coded_samples set to the number of samples as coded in the
3
* packet, or 0 if the codec does not encode the
4
* number of samples in each frame.
5
+ * @param[out] approx_nb_samples set to non-zero if the number of samples
6
+ * returned is an approximation.
7
*/
8
static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
9
- int buf_size, int *coded_samples)
10
+ int buf_size, int *coded_samples, int *approx_nb_samples)
11
{
12
ADPCMDecodeContext *s = avctx->priv_data;
13
int nb_samples = 0;
14
15
int header_size;
16
17
*coded_samples = 0;
18
+ *approx_nb_samples = 0;
19
20
if(ch <= 0)
21
return 0;
22
23
case AV_CODEC_ID_ADPCM_EA_R2:
24
header_size = 4 + 5 * ch;
25
*coded_samples = bytestream2_get_le32(gb);
26
+ *approx_nb_samples = 1;
27
break;
28
case AV_CODEC_ID_ADPCM_EA_R3:
29
header_size = 4 + 5 * ch;
30
*coded_samples = bytestream2_get_be32(gb);
31
+ *approx_nb_samples = 1;
32
break;
33
}
34
*coded_samples -= *coded_samples % 28;
35
36
int16_t **samples_p;
37
int st; /* stereo */
38
int count1, count2;
39
- int nb_samples, coded_samples, ret;
40
+ int nb_samples, coded_samples, approx_nb_samples, ret;
41
GetByteContext gb;
42
43
bytestream2_init(&gb, buf, buf_size);
44
- nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples);
45
+ nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples, &approx_nb_samples);
46
if (nb_samples <= 0) {
47
av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n");
48
return AVERROR_INVALIDDATA;
49
50
/* use coded_samples when applicable */
51
/* it is always <= nb_samples, so the output buffer will be large enough */
52
if (coded_samples) {
53
- if (coded_samples != nb_samples)
54
+ if (!approx_nb_samples && coded_samples != nb_samples)
55
av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n");
56
frame->nb_samples = nb_samples = coded_samples;
57
}
58
59
*samples++ = c->status[0].predictor + c->status[1].predictor;
60
*samples++ = c->status[0].predictor - c->status[1].predictor;
61
}
62
+
63
+ if ((bytestream2_tell(&gb) & 1))
64
+ bytestream2_skip(&gb, 1);
65
break;
66
}
67
case AV_CODEC_ID_ADPCM_IMA_ISS:
68
ffmpeg-1.2.6.tar.bz2/libavcodec/adpcmenc.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/adpcmenc.c
Changed
14
1
2
put_bits(&pb, 7, status->step_index);
3
if (avctx->trellis > 0) {
4
uint8_t buf[64];
5
- adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status,
6
+ adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status,
7
64, 1);
8
for (i = 0; i < 64; i++)
9
put_bits(&pb, 4, buf[i ^ 1]);
10
+ status->prev_sample = status->predictor;
11
} else {
12
for (i = 0; i < 64; i += 2) {
13
int t1, t2;
14
ffmpeg-1.2.6.tar.bz2/libavcodec/alsdec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/alsdec.c
Changed
10
1
2
GetBitContext gb;
3
uint64_t ht_size;
4
int i, config_offset;
5
- MPEG4AudioConfig m4ac;
6
+ MPEG4AudioConfig m4ac = {0};
7
ALSSpecificConfig *sconf = &ctx->sconf;
8
AVCodecContext *avctx = ctx->avctx;
9
uint32_t als_id, header_size, trailer_size;
10
ffmpeg-1.2.6.tar.bz2/libavcodec/dirac_arith.h -> ffmpeg-1.2.7.tar.bz2/libavcodec/dirac_arith.h
Changed
18
1
2
#ifndef AVCODEC_DIRAC_ARITH_H
3
#define AVCODEC_DIRAC_ARITH_H
4
5
+#include "libavutil/x86/asm.h"
6
#include "bytestream.h"
7
#include "get_bits.h"
8
9
10
11
range_times_prob = (c->range * prob_zero) >> 16;
12
13
-#if HAVE_FAST_CMOV && HAVE_INLINE_ASM
14
+#if HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS
15
low -= range_times_prob << 16;
16
range -= range_times_prob;
17
bit = 0;
18
ffmpeg-1.2.6.tar.bz2/libavcodec/diracdec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/diracdec.c
Changed
89
1
2
3
uint16_t *mctmp; /* buffer holding the MC data multipled by OBMC weights */
4
uint8_t *mcscratch;
5
+ int buffer_stride;
6
7
DECLARE_ALIGNED(16, uint8_t, obmc_weight)[3][MAX_BLOCKSIZE*MAX_BLOCKSIZE];
8
9
10
return AVERROR(ENOMEM);
11
}
12
13
- w = s->source.width;
14
- h = s->source.height;
15
-
16
/* fixme: allocate using real stride here */
17
- s->sbsplit = av_malloc(sbwidth * sbheight);
18
- s->blmotion = av_malloc(sbwidth * sbheight * 16 * sizeof(*s->blmotion));
19
- s->edge_emu_buffer_base = av_malloc((w+64)*MAX_BLOCKSIZE);
20
+ s->sbsplit = av_malloc_array(sbwidth, sbheight);
21
+ s->blmotion = av_malloc_array(sbwidth, sbheight * 16 * sizeof(*s->blmotion));
22
+
23
+ if (!s->sbsplit || !s->blmotion)
24
+ return AVERROR(ENOMEM);
25
+ return 0;
26
+}
27
+
28
+static int alloc_buffers(DiracContext *s, int stride)
29
+{
30
+ int w = s->source.width;
31
+ int h = s->source.height;
32
+
33
+ av_assert0(stride >= w);
34
+ stride += 64;
35
+
36
+ if (s->buffer_stride >= stride)
37
+ return 0;
38
+ s->buffer_stride = 0;
39
+
40
+ av_freep(&s->edge_emu_buffer_base);
41
+ memset(s->edge_emu_buffer, 0, sizeof(s->edge_emu_buffer));
42
+ av_freep(&s->mctmp);
43
+ av_freep(&s->mcscratch);
44
45
- s->mctmp = av_malloc((w+64+MAX_BLOCKSIZE) * (h+MAX_BLOCKSIZE) * sizeof(*s->mctmp));
46
- s->mcscratch = av_malloc((w+64)*MAX_BLOCKSIZE);
47
+ s->edge_emu_buffer_base = av_malloc_array(stride, MAX_BLOCKSIZE);
48
49
- if (!s->sbsplit || !s->blmotion || !s->mctmp || !s->mcscratch)
50
+ s->mctmp = av_malloc_array((stride+MAX_BLOCKSIZE), (h+MAX_BLOCKSIZE) * sizeof(*s->mctmp));
51
+ s->mcscratch = av_malloc_array(stride, MAX_BLOCKSIZE);
52
+
53
+ if (!s->edge_emu_buffer_base || !s->mctmp || !s->mcscratch)
54
return AVERROR(ENOMEM);
55
+
56
+ s->buffer_stride = stride;
57
return 0;
58
}
59
60
61
av_freep(&s->plane[i].idwt_tmp);
62
}
63
64
+ s->buffer_stride = 0;
65
av_freep(&s->sbsplit);
66
av_freep(&s->blmotion);
67
av_freep(&s->edge_emu_buffer_base);
68
69
motion_y >>= s->chroma_y_shift;
70
}
71
72
- mx = motion_x & ~(-1 << s->mv_precision);
73
- my = motion_y & ~(-1 << s->mv_precision);
74
+ mx = motion_x & ~(-1U << s->mv_precision);
75
+ my = motion_y & ~(-1U << s->mv_precision);
76
motion_x >>= s->mv_precision;
77
motion_y >>= s->mv_precision;
78
/* normalize subpel coordinates to epel */
79
80
s->plane[1].stride = pic->avframe.linesize[1];
81
s->plane[2].stride = pic->avframe.linesize[2];
82
83
+ if (alloc_buffers(s, FFMAX3(FFABS(s->plane[0].stride), FFABS(s->plane[1].stride), FFABS(s->plane[2].stride))) < 0)
84
+ return AVERROR(ENOMEM);
85
+
86
/* [DIRAC_STD] 11.1 Picture parse. picture_parse() */
87
if (dirac_decode_picture_header(s))
88
return -1;
89
ffmpeg-1.2.6.tar.bz2/libavcodec/g723_1.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/g723_1.c
Changed
11
1
2
if (p->cur_rate == RATE_6300) {
3
info_bits = 0;
4
put_bits(&pb, 2, info_bits);
5
- }
6
+ }else
7
+ av_assert0(0);
8
9
put_bits(&pb, 8, p->lsp_index[2]);
10
put_bits(&pb, 8, p->lsp_index[1]);
11
ffmpeg-1.2.6.tar.bz2/libavcodec/golomb-test.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/golomb-test.c
Changed
10
1
2
}
3
}
4
5
-#define EXTEND(i) (i << 3 | i & 7)
6
+#define EXTEND(i) ((i) << 3 | (i) & 7)
7
init_put_bits(&pb, temp, SIZE);
8
for (i = 0; i < COUNT; i++)
9
set_ue_golomb(&pb, EXTEND(i));
10
ffmpeg-1.2.6.tar.bz2/libavcodec/h263dec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/h263dec.c
Changed
14
1
2
}
3
4
if(startcode_found){
5
- av_fast_malloc(
6
+ av_fast_padded_mallocz(
7
&s->bitstream_buffer,
8
&s->allocated_bitstream_buffer_size,
9
- buf_size - current_pos + FF_INPUT_BUFFER_PADDING_SIZE);
10
+ buf_size - current_pos);
11
if (!s->bitstream_buffer)
12
return AVERROR(ENOMEM);
13
memcpy(s->bitstream_buffer, buf + current_pos, buf_size - current_pos);
14
ffmpeg-1.2.6.tar.bz2/libavcodec/h264.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/h264.c
Changed
29
1
2
return 0;
3
}
4
5
+static enum AVPixelFormat non_j_pixfmt(enum AVPixelFormat a)
6
+{
7
+ switch (a) {
8
+ case AV_PIX_FMT_YUVJ420P: return AV_PIX_FMT_YUV420P;
9
+ case AV_PIX_FMT_YUVJ422P: return AV_PIX_FMT_YUV422P;
10
+ case AV_PIX_FMT_YUVJ444P: return AV_PIX_FMT_YUV444P;
11
+ default:
12
+ return a;
13
+ }
14
+}
15
+
16
+
17
/**
18
* Decode a slice header.
19
* This will also call ff_MPV_common_init() and frame_start() as needed.
20
21
|| h->mb_width != h->sps.mb_width
22
|| h->mb_height != h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag)
23
));
24
- if (h0->avctx->pix_fmt != get_pixel_format(h0, 0))
25
+ if (non_j_pixfmt(h0->avctx->pix_fmt) != non_j_pixfmt(get_pixel_format(h0, 0)))
26
must_reinit = 1;
27
28
h->mb_width = h->sps.mb_width;
29
ffmpeg-1.2.6.tar.bz2/libavcodec/h264_mp4toannexb_bsf.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/h264_mp4toannexb_bsf.c
Changed
10
1
2
goto fail;
3
4
/* prepend only to the first type 5 NAL unit of an IDR picture */
5
- if (ctx->first_idr && unit_type == 5) {
6
+ if (ctx->first_idr && (unit_type == 5 || unit_type == 7 || unit_type == 8)) {
7
if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
8
avctx->extradata, avctx->extradata_size,
9
buf, nal_size)) < 0)
10
ffmpeg-1.2.6.tar.bz2/libavcodec/libvorbisenc.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/libvorbisenc.c
Changed
11
1
2
avctx->delay = duration;
3
av_assert0(!s->afq.remaining_delay);
4
s->afq.frames->duration += duration;
5
- s->afq.frames->pts -= duration;
6
+ if (s->afq.frames->pts != AV_NOPTS_VALUE)
7
+ s->afq.frames->pts -= duration;
8
s->afq.remaining_samples += duration;
9
}
10
ff_af_queue_remove(&s->afq, duration, &avpkt->pts, &avpkt->duration);
11
ffmpeg-1.2.6.tar.bz2/libavcodec/libx264.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/libx264.c
Changed
41
1
2
3
OPT_STR("level", x4->level);
4
5
- if(x4->x264opts){
6
- const char *p= x4->x264opts;
7
- while(p){
8
- char param[256]={0}, val[256]={0};
9
- if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){
10
- OPT_STR(param, "1");
11
- }else
12
- OPT_STR(param, val);
13
- p= strchr(p, ':');
14
- p+=!!p;
15
- }
16
- }
17
-
18
if (avctx->i_quant_factor > 0)
19
x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
20
21
22
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
23
x4->params.b_repeat_headers = 0;
24
25
+ if(x4->x264opts){
26
+ const char *p= x4->x264opts;
27
+ while(p){
28
+ char param[256]={0}, val[256]={0};
29
+ if(sscanf(p, "%255[^:=]=%255[^:]", param, val) == 1){
30
+ OPT_STR(param, "1");
31
+ }else
32
+ OPT_STR(param, val);
33
+ p= strchr(p, ':');
34
+ p+=!!p;
35
+ }
36
+ }
37
+
38
if (x4->x264_params) {
39
AVDictionary *dict = NULL;
40
AVDictionaryEntry *en = NULL;
41
ffmpeg-1.2.6.tar.bz2/libavcodec/mjpegdec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/mjpegdec.c
Changed
10
1
2
}
3
4
if (!Al) {
5
- s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
6
+ s->coefs_finished[c] |= (2LL << se) - (1LL << ss);
7
last_scan = !~s->coefs_finished[c];
8
}
9
10
ffmpeg-1.2.6.tar.bz2/libavcodec/mjpegenc.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/mjpegenc.c
Changed
10
1
2
put_bits(&s->pb, huff_size_ac[0], huff_code_ac[0]);
3
}
4
5
-void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[6][64])
6
+void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64])
7
{
8
int i;
9
if (s->chroma_format == CHROMA_444) {
10
ffmpeg-1.2.6.tar.bz2/libavcodec/mjpegenc.h -> ffmpeg-1.2.7.tar.bz2/libavcodec/mjpegenc.h
Changed
9
1
2
void ff_mjpeg_encode_stuffing(MpegEncContext *s);
3
void ff_mjpeg_encode_dc(MpegEncContext *s, int val,
4
uint8_t *huff_size, uint16_t *huff_code);
5
-void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[6][64]);
6
+void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]);
7
8
#endif /* AVCODEC_MJPEGENC_H */
9
ffmpeg-1.2.6.tar.bz2/libavcodec/mlpdec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/mlpdec.c
Changed
10
1
2
return 0;
3
}
4
5
-#define MSB_MASK(bits) (-1u << bits)
6
+#define MSB_MASK(bits) (-1u << (bits))
7
8
/** Generate PCM samples using the prediction filters and residual values
9
* read from the data stream, and update the filter state. */
10
ffmpeg-1.2.6.tar.bz2/libavcodec/msrle.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/msrle.c
Changed
11
1
2
uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
3
int i, j;
4
5
+ if (linesize < 0)
6
+ return linesize;
7
+
8
for (i = 0; i < avctx->height; i++) {
9
if (avctx->bits_per_coded_sample == 4) {
10
for (j = 0; j < avctx->width - 1; j += 2) {
11
ffmpeg-1.2.6.tar.bz2/libavcodec/mss34dsp.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/mss34dsp.c
Changed
12
1
2
blk[6 * step] = (-(t3 + t7) + t8 + tA) >> shift; \
3
blk[7 * step] = (-(t1 + t6) + t9 + tB) >> shift; \
4
5
-#define SOP_ROW(a) ((a) << 16) + 0x2000
6
-#define SOP_COL(a) ((a + 32) << 16)
7
+#define SOP_ROW(a) (((a) << 16) + 0x2000)
8
+#define SOP_COL(a) (((a) + 32) << 16)
9
10
void ff_mss34_dct_put(uint8_t *dst, int stride, int *block)
11
{
12
ffmpeg-1.2.6.tar.bz2/libavcodec/mss4.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/mss4.c
Changed
10
1
2
return prev[component];
3
}
4
5
-#define MKVAL(vals) (vals[0] | (vals[1] << 3) | (vals[2] << 6))
6
+#define MKVAL(vals) ((vals)[0] | ((vals)[1] << 3) | ((vals)[2] << 6))
7
8
/* Image mode - the hardest to comprehend MSS4 coding mode.
9
*
10
ffmpeg-1.2.6.tar.bz2/libavcodec/utvideodec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/utvideodec.c
Changed
10
1
2
code += 0x80000000u >> (he[i].len - 1);
3
}
4
5
- return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1,
6
+ return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 11), last + 1,
7
bits, sizeof(*bits), sizeof(*bits),
8
codes, sizeof(*codes), sizeof(*codes),
9
syms, sizeof(*syms), sizeof(*syms), 0);
10
ffmpeg-1.2.6.tar.bz2/libavcodec/vc1dec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/vc1dec.c
Changed
13
1
2
uvmx = (mx + ((mx & 3) == 3)) >> 1;
3
uvmy = (my + ((my & 3) == 3)) >> 1;
4
if (v->field_mode) {
5
- if (v->cur_field_type != v->ref_field_type[1])
6
+ if (v->cur_field_type != v->ref_field_type[1]) {
7
my = my - 2 + 4 * v->cur_field_type;
8
uvmy = uvmy - 2 + 4 * v->cur_field_type;
9
+ }
10
}
11
if (v->fastuvmc) {
12
uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1));
13
ffmpeg-1.2.6.tar.bz2/libavcodec/vorbisdec.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/vorbisdec.c
Changed
101
1
2
uint8_t mode_count;
3
vorbis_mode *modes;
4
uint8_t mode_number; // mode number for the current packet
5
- uint8_t previous_window;
6
+ int8_t previous_window;
7
float *channel_residues;
8
float *saved;
9
} vorbis_context;
10
11
res_setup->partition_size = get_bits(gb, 24) + 1;
12
/* Validations to prevent a buffer overflow later. */
13
if (res_setup->begin>res_setup->end ||
14
- res_setup->end > (res_setup->type == 2 ? vc->audio_channels : 1) * vc->blocksize[1] / 2 ||
15
- (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) {
16
+ (res_setup->end-res_setup->begin) / res_setup->partition_size > FFMIN(V_MAX_PARTITIONS, 65535)) {
17
av_log(vc->avctx, AV_LOG_ERROR,
18
"partition out of bounds: type, begin, end, size, blocksize: %"PRIu16", %"PRIu32", %"PRIu32", %u, %"PRIu32"\n",
19
res_setup->type, res_setup->begin, res_setup->end,
20
21
if (!vc->channel_residues || !vc->saved)
22
return AVERROR(ENOMEM);
23
24
- vc->previous_window = 0;
25
+ vc->previous_window = -1;
26
27
ff_mdct_init(&vc->mdct[0], bl0, 1, -1.0);
28
ff_mdct_init(&vc->mdct[1], bl1, 1, -1.0);
29
30
uint8_t *classifs = vr->classifs;
31
unsigned pass, ch_used, i, j, k, l;
32
unsigned max_output = (ch - 1) * vlen;
33
+ int libvorbis_bug = 0;
34
35
if (vr_type == 2) {
36
for (j = 1; j < ch; ++j)
37
38
}
39
40
if (max_output > ch_left * vlen) {
41
- av_log(vc->avctx, AV_LOG_ERROR, "Insufficient output buffer\n");
42
- return -1;
43
+ if (max_output <= ch_left * vlen + vr->partition_size*ch_used/ch) {
44
+ ptns_to_read--;
45
+ libvorbis_bug = 1;
46
+ } else {
47
+ av_log(vc->avctx, AV_LOG_ERROR, "Insufficient output buffer\n");
48
+ return AVERROR_INVALIDDATA;
49
+ }
50
}
51
52
av_dlog(NULL, " residue type 0/1/2 decode begin, ch: %d cpc %d \n", ch, c_p_c);
53
54
voffset += vr->partition_size;
55
}
56
}
57
+ if (libvorbis_bug && !pass) {
58
+ for (j = 0; j < ch_used; ++j) {
59
+ if (!do_not_decode[j]) {
60
+ get_vlc2(&vc->gb, vc->codebooks[vr->classbook].vlc.table,
61
+ vc->codebooks[vr->classbook].nb_bits, 3);
62
+ }
63
+ }
64
+ }
65
}
66
return 0;
67
}
68
69
{
70
GetBitContext *gb = &vc->gb;
71
FFTContext *mdct;
72
- unsigned previous_window = vc->previous_window;
73
+ int previous_window = vc->previous_window;
74
unsigned mode_number, blockflag, blocksize;
75
int i, j;
76
uint8_t no_residue[255];
77
78
blocksize = vc->blocksize[blockflag];
79
vlen = blocksize / 2;
80
if (blockflag) {
81
- previous_window = get_bits(gb, 1);
82
- skip_bits1(gb); // next_window
83
- }
84
+ int code = get_bits(gb, 2);
85
+ if (previous_window < 0)
86
+ previous_window = code>>1;
87
+ } else if (previous_window < 0)
88
+ previous_window = 0;
89
90
memset(ch_res_ptr, 0, sizeof(float) * vc->audio_channels * vlen); //FIXME can this be removed ?
91
for (i = 0; i < vc->audio_channels; ++i)
92
93
memset(vc->saved, 0, (vc->blocksize[1] / 4) * vc->audio_channels *
94
sizeof(*vc->saved));
95
}
96
- vc->previous_window = 0;
97
+ vc->previous_window = -1;
98
}
99
100
AVCodec ff_vorbis_decoder = {
101
ffmpeg-1.2.6.tar.bz2/libavcodec/wma.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/wma.c
Changed
14
1
2
}
3
for (i = 0; i < 2; i++) {
4
ff_free_vlc(&s->coef_vlc[i]);
5
- av_free(s->run_table[i]);
6
- av_free(s->level_table[i]);
7
- av_free(s->int_table[i]);
8
+ av_freep(&s->run_table[i]);
9
+ av_freep(&s->level_table[i]);
10
+ av_freep(&s->int_table[i]);
11
}
12
13
#if FF_API_OLD_ENCODE_AUDIO
14
ffmpeg-1.2.6.tar.bz2/libavcodec/x86/idct_sse2_xvid.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/x86/idct_sse2_xvid.c
Changed
10
1
2
"movdqa %%xmm6, 4*16("dct") \n\t" \
3
"movdqa "SREG2", 7*16("dct") \n\t"
4
5
-inline void ff_idct_xvid_sse2(short *block)
6
+av_extern_inline void ff_idct_xvid_sse2(short *block)
7
{
8
__asm__ volatile(
9
"movq "MANGLE(m127)", %%mm0 \n\t"
10
ffmpeg-1.2.6.tar.bz2/libavcodec/x86/mpegvideoenc_template.c -> ffmpeg-1.2.7.tar.bz2/libavcodec/x86/mpegvideoenc_template.c
Changed
10
1
2
"psubusw "MM"1, "MM"4 \n\t"
3
"packuswb "MM"4, "MM"4 \n\t"
4
#if COMPILE_TEMPLATE_SSE2
5
- "packuswb "MM"4, "MM"4 \n\t"
6
+ "packsswb "MM"4, "MM"4 \n\t"
7
#endif
8
"movd "MM"4, %0 \n\t" // *overflow
9
: "=g" (*overflow)
10
ffmpeg-1.2.6.tar.bz2/libavfilter/filtfmts.c -> ffmpeg-1.2.7.tar.bz2/libavfilter/filtfmts.c
Changed
43
1
2
for (j = 0; j < fmts->format_count; j++) \
3
if(av_get_pix_fmt_name(fmts->formats[j])) \
4
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
5
- i, filter_ctx->filter->inout##puts[i].name, \
6
+ i, filter_ctx->inout##put_pads[i].name, \
7
av_get_pix_fmt_name(fmts->formats[j])); \
8
} else if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_AUDIO) { \
9
AVFilterFormats *fmts; \
10
11
fmts = filter_ctx->inout##puts[i]->outin##_formats; \
12
for (j = 0; j < fmts->format_count; j++) \
13
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
14
- i, filter_ctx->filter->inout##puts[i].name, \
15
+ i, filter_ctx->inout##put_pads[i].name, \
16
av_get_sample_fmt_name(fmts->formats[j])); \
17
\
18
layouts = filter_ctx->inout##puts[i]->outin##_channel_layouts; \
19
20
av_get_channel_layout_string(buf, sizeof(buf), -1, \
21
layouts->channel_layouts[j]); \
22
printf(#INOUT "PUT[%d] %s: chlayout:%s\n", \
23
- i, filter_ctx->filter->inout##puts[i].name, buf); \
24
+ i, filter_ctx->inout##put_pads[i].name, buf); \
25
} \
26
} \
27
} \
28
29
/* create a link for each of the input pads */
30
for (i = 0; i < filter_ctx->input_count; i++) {
31
AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
32
- link->type = filter_ctx->filter->inputs[i].type;
33
+ link->type = filter_ctx->input_pads[i].type;
34
filter_ctx->inputs[i] = link;
35
}
36
for (i = 0; i < filter_ctx->output_count; i++) {
37
AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
38
- link->type = filter_ctx->filter->outputs[i].type;
39
+ link->type = filter_ctx->output_pads[i].type;
40
filter_ctx->outputs[i] = link;
41
}
42
43
ffmpeg-1.2.6.tar.bz2/libavfilter/graphdump.c -> ffmpeg-1.2.7.tar.bz2/libavfilter/graphdump.c
Changed
13
1
2
{
3
char *format;
4
char layout[64];
5
+ AVBPrint dummy_buffer = { 0 };
6
7
if (!buf)
8
- buf = &(AVBPrint){ 0 }; /* dummy buffer */
9
+ buf = &dummy_buffer;
10
switch (link->type) {
11
case AVMEDIA_TYPE_VIDEO:
12
format = av_x_if_null(av_get_pix_fmt_name(link->format), "?");
13
ffmpeg-1.2.6.tar.bz2/libavfilter/vf_deshake.c -> ffmpeg-1.2.7.tar.bz2/libavfilter/vf_deshake.c
Changed
12
1
2
//av_log(NULL, AV_LOG_ERROR, "\n");
3
}
4
5
- p_x = (center_x - width / 2);
6
- p_y = (center_y - height / 2);
7
+ p_x = (center_x - width / 2.0);
8
+ p_y = (center_y - height / 2.0);
9
t->vector.x += (cos(t->angle)-1)*p_x - sin(t->angle)*p_y;
10
t->vector.y += sin(t->angle)*p_x + (cos(t->angle)-1)*p_y;
11
12
ffmpeg-1.2.6.tar.bz2/libavformat/asfdec.c -> ffmpeg-1.2.7.tar.bz2/libavformat/asfdec.c
Changed
11
1
2
3
if (!(asf->hdr.flags & 0x01)) { // if we aren't streaming...
4
int64_t fsize = avio_size(pb);
5
- if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 || FFABS(fsize - (int64_t)asf->hdr.file_size) < 10000)
6
+ if (fsize <= 0 || (int64_t)asf->hdr.file_size <= 0 ||
7
+ FFABS(fsize - (int64_t)asf->hdr.file_size) / (float)FFMIN(fsize, asf->hdr.file_size) < 0.05)
8
st->duration = asf->hdr.play_time /
9
(10000000 / 1000) - start_time;
10
}
11
ffmpeg-1.2.6.tar.bz2/libavformat/avidec.c -> ffmpeg-1.2.7.tar.bz2/libavformat/avidec.c
Changed
36
1
2
}
3
}
4
5
-
6
- if( (st->discard >= AVDISCARD_DEFAULT && size==0)
7
- /*|| (st->discard >= AVDISCARD_NONKEY && !(pkt->flags & AV_PKT_FLAG_KEY))*/ //FIXME needs a little reordering
8
- || st->discard >= AVDISCARD_ALL){
9
+ if (!avi->dv_demux &&
10
+ ((st->discard >= AVDISCARD_DEFAULT && size == 0) /* ||
11
+ // FIXME: needs a little reordering
12
+ (st->discard >= AVDISCARD_NONKEY &&
13
+ !(pkt->flags & AV_PKT_FLAG_KEY)) */
14
+ || st->discard >= AVDISCARD_ALL)) {
15
if (!exit_early) {
16
ast->frame_offset += get_duration(ast, size);
17
avio_skip(pb, size);
18
19
int index;
20
av_assert0(st->index_entries);
21
22
- index= av_index_search_timestamp(st, ast->frame_offset, 0);
23
+ index= av_index_search_timestamp(st, ast->frame_offset, AVSEEK_FLAG_ANY);
24
e= &st->index_entries[index];
25
26
if(index >= 0 && e->timestamp == ast->frame_offset){
27
28
continue;
29
30
// av_assert1(st2->codec->block_align);
31
- av_assert0((int64_t)st2->time_base.num*ast2->rate == (int64_t)st2->time_base.den*ast2->scale);
32
+ av_assert0(fabs(av_q2d(st2->time_base) - ast2->scale / (double)ast2->rate) < av_q2d(st2->time_base) * 0.00000001);
33
index = av_index_search_timestamp(
34
st2,
35
av_rescale_q(timestamp, st->time_base, st2->time_base) * FFMAX(ast2->sample_size, 1),
36
ffmpeg-1.2.6.tar.bz2/libavformat/flvdec.c -> ffmpeg-1.2.7.tar.bz2/libavformat/flvdec.c
Changed
12
1
2
if (cts < 0) { // dts are wrong
3
flv->wrong_dts = 1;
4
av_log(s, AV_LOG_WARNING, "negative cts, previous timestamps might be wrong\n");
5
+ } else if (FFABS(dts - pts) > 1000*60*15) {
6
+ av_log(s, AV_LOG_WARNING,
7
+ "invalid timestamps %"PRId64" %"PRId64"\n", dts, pts);
8
+ dts = pts = AV_NOPTS_VALUE;
9
}
10
if (flv->wrong_dts)
11
dts = AV_NOPTS_VALUE;
12
ffmpeg-1.2.6.tar.bz2/libavformat/flvenc.c -> ffmpeg-1.2.7.tar.bz2/libavformat/flvenc.c
Changed
20
1
2
avcodec_get_name(enc->codec_id), i);
3
return AVERROR(EINVAL);
4
}
5
+ if (enc->codec_id == AV_CODEC_ID_MPEG4 ||
6
+ enc->codec_id == AV_CODEC_ID_H263) {
7
+ int error = enc->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL;
8
+ av_log(s, error ? AV_LOG_ERROR : AV_LOG_WARNING,
9
+ "Codec %s is not supported in the official FLV specification,\n", avcodec_get_name(enc->codec_id));
10
+
11
+ if (error) {
12
+ av_log(s, AV_LOG_ERROR,
13
+ "use vstrict=-1 / -strict -1 to use it anyway.\n");
14
+ return AVERROR(EINVAL);
15
+ }
16
+ }
17
break;
18
case AVMEDIA_TYPE_AUDIO:
19
audio_enc = enc;
20
ffmpeg-1.2.6.tar.bz2/libavformat/h263dec.c -> ffmpeg-1.2.7.tar.bz2/libavformat/h263dec.c
Changed
10
1
2
for(i=0; i<p->buf_size; i++){
3
code = (code<<8) + p->buf[i];
4
if ((code & 0xfffffc0000) == 0x800000) {
5
- src_fmt= (code>>2)&3;
6
+ src_fmt= (code>>2)&7;
7
if( src_fmt != last_src_fmt
8
&& last_src_fmt>0 && last_src_fmt<6
9
&& src_fmt<6)
10
ffmpeg-1.2.6.tar.bz2/libavformat/matroskadec.c -> ffmpeg-1.2.7.tar.bz2/libavformat/matroskadec.c
Changed
15
1
2
} else if (!strcmp(track->codec_id, "V_QUICKTIME")
3
&& (track->codec_priv.size >= 86)
4
&& (track->codec_priv.data != NULL)) {
5
- fourcc = AV_RL32(track->codec_priv.data);
6
+ fourcc = AV_RL32(track->codec_priv.data + 4);
7
codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc);
8
+ if (ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(track->codec_priv.data))) {
9
+ fourcc = AV_RL32(track->codec_priv.data);
10
+ codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc);
11
+ }
12
} else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX-12) {
13
/* Only ALAC's magic cookie is stored in Matroska's track headers.
14
Create the "atom size", "tag", and "tag version" fields the
15
ffmpeg-1.2.6.tar.bz2/libavformat/matroskaenc.c -> ffmpeg-1.2.7.tar.bz2/libavformat/matroskaenc.c
Changed
21
1
2
if (qt_id) {
3
if (!codec->codec_tag)
4
codec->codec_tag = ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id);
5
- if (codec->extradata_size)
6
+ if (codec->extradata_size) {
7
+ if ( ff_codec_get_id(ff_codec_movvideo_tags, codec->codec_tag) == codec->codec_id
8
+ && ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(codec->extradata+4)) != codec->codec_id
9
+ ) {
10
+ int i;
11
+ avio_wb32(dyn_cp, 0x5a + codec->extradata_size);
12
+ avio_wl32(dyn_cp, codec->codec_tag);
13
+ for(i=0; i<0x5a-8; i++)
14
+ avio_w8(dyn_cp, 0);
15
+ }
16
avio_write(dyn_cp, codec->extradata, codec->extradata_size);
17
+ }
18
} else {
19
if (!codec->codec_tag)
20
codec->codec_tag = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
21
ffmpeg-1.2.6.tar.bz2/libavformat/mov.c -> ffmpeg-1.2.7.tar.bz2/libavformat/mov.c
Changed
22
1
2
if (!entries)
3
{
4
sc->keyframe_absent = 1;
5
- if (!st->need_parsing)
6
+ if (!st->need_parsing && st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
7
st->need_parsing = AVSTREAM_PARSE_HEADERS;
8
return 0;
9
}
10
11
rap_group_index++;
12
}
13
}
14
+ if (sc->keyframe_absent
15
+ && !sc->stps_count
16
+ && !rap_group_present
17
+ && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
18
+ keyframe = 1;
19
if (keyframe)
20
distance = 0;
21
sample_size = sc->alt_sample_size > 0 ? sc->alt_sample_size : sc->sample_sizes[current_sample];
22
ffmpeg-1.2.6.tar.bz2/libavformat/mpc.c -> ffmpeg-1.2.7.tar.bz2/libavformat/mpc.c
Changed
10
1
2
}
3
c->curbits = (curbits + size2) & 0x1F;
4
5
- if ((ret = av_new_packet(pkt, size)) < 0)
6
+ if ((ret = av_new_packet(pkt, size + 4)) < 0)
7
return ret;
8
9
pkt->data[0] = curbits;
10
ffmpeg-1.2.6.tar.bz2/libavformat/mpegts.c -> ffmpeg-1.2.7.tar.bz2/libavformat/mpegts.c
Changed
10
1
2
AVStream *st;
3
if (ts->pids[pid]->es_id != mp4_descr[i].es_id)
4
continue;
5
- if (!(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES)) {
6
+ if (ts->pids[pid]->type != MPEGTS_PES) {
7
av_log(s, AV_LOG_ERROR, "pid %x is not PES\n", pid);
8
continue;
9
}
10
ffmpeg-1.2.6.tar.bz2/libavformat/mux.c -> ffmpeg-1.2.7.tar.bz2/libavformat/mux.c
Changed
14
1
2
av_dlog(s, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
3
av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
4
5
+ if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
6
+ av_log(s, AV_LOG_WARNING, "Packet with invalid duration %d in stream %d\n",
7
+ pkt->duration, pkt->stream_index);
8
+ pkt->duration = 0;
9
+ }
10
+
11
/* duration field */
12
if (pkt->duration == 0) {
13
ff_compute_frame_duration(&num, &den, st, NULL, pkt);
14
ffmpeg-1.2.6.tar.bz2/libavutil/cpu.c -> ffmpeg-1.2.7.tar.bz2/libavutil/cpu.c
Changed
26
1
2
static int flags, checked;
3
4
void av_force_cpu_flags(int arg){
5
+ if ( (arg & ( AV_CPU_FLAG_3DNOW |
6
+ AV_CPU_FLAG_3DNOWEXT |
7
+ AV_CPU_FLAG_SSE |
8
+ AV_CPU_FLAG_SSE2 |
9
+ AV_CPU_FLAG_SSE2SLOW |
10
+ AV_CPU_FLAG_SSE3 |
11
+ AV_CPU_FLAG_SSE3SLOW |
12
+ AV_CPU_FLAG_SSSE3 |
13
+ AV_CPU_FLAG_SSE4 |
14
+ AV_CPU_FLAG_SSE42 |
15
+ AV_CPU_FLAG_AVX |
16
+ AV_CPU_FLAG_XOP |
17
+ AV_CPU_FLAG_FMA4 ))
18
+ && !(arg & AV_CPU_FLAG_MMX)) {
19
+ av_log(NULL, AV_LOG_WARNING, "MMX implied by specified flags\n");
20
+ arg |= AV_CPU_FLAG_MMX;
21
+ }
22
+
23
flags = arg;
24
checked = arg != -1;
25
}
26
ffmpeg-1.2.6.tar.bz2/libavutil/lzo.c -> ffmpeg-1.2.7.tar.bz2/libavutil/lzo.c
Changed
44
1
2
#include <string.h>
3
4
#include "avutil.h"
5
+#include "avassert.h"
6
#include "common.h"
7
#include "intreadwrite.h"
8
#include "lzo.h"
9
10
{
11
int cnt = x & mask;
12
if (!cnt) {
13
- while (!(x = get_byte(c)))
14
+ while (!(x = get_byte(c))) {
15
+ if (cnt >= INT_MAX - 1000) {
16
+ c->error |= AV_LZO_ERROR;
17
+ break;
18
+ }
19
cnt += 255;
20
+ }
21
cnt += mask + x;
22
}
23
return cnt;
24
25
{
26
register const uint8_t *src = c->in;
27
register uint8_t *dst = c->out;
28
+ av_assert0(cnt >= 0);
29
if (cnt > c->in_end - src) {
30
cnt = FFMAX(c->in_end - src, 0);
31
c->error |= AV_LZO_INPUT_DEPLETED;
32
33
*/
34
static inline void copy_backptr(LZOContext *c, int back, int cnt)
35
{
36
- register const uint8_t *src = &c->out[-back];
37
register uint8_t *dst = c->out;
38
- if (src < c->out_start || src > dst) {
39
+ av_assert0(cnt > 0);
40
+ if (dst - c->out_start < back) {
41
c->error |= AV_LZO_INVALID_BACKPTR;
42
return;
43
}
44
ffmpeg-1.2.6.tar.bz2/libavutil/opt.c -> ffmpeg-1.2.7.tar.bz2/libavutil/opt.c
Changed
14
1
2
3
for (i = 0; i < ranges->nb_ranges; i++) {
4
AVOptionRange *range = ranges->range[i];
5
- av_freep(&range->str);
6
- av_freep(&ranges->range[i]);
7
+ if (range) {
8
+ av_freep(&range->str);
9
+ av_freep(&ranges->range[i]);
10
+ }
11
}
12
av_freep(&ranges->range);
13
av_freep(rangesp);
14
ffmpeg-1.2.6.tar.bz2/libavutil/timestamp.h -> ffmpeg-1.2.7.tar.bz2/libavutil/timestamp.h
Changed
12
1
2
3
#include "common.h"
4
5
+#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)
6
+#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
7
+#endif
8
+
9
#define AV_TS_MAX_STRING_SIZE 32
10
11
/**
12
ffmpeg-1.2.6.tar.bz2/libswresample/dither.c -> ffmpeg-1.2.7.tar.bz2/libswresample/dither.c
Changed
10
1
2
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) {
3
double scale = s->dither.noise_scale;
4
#define TMP_EXTRA 2
5
- double *tmp = av_malloc((len + TMP_EXTRA) * sizeof(double));
6
+ double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double));
7
int i;
8
9
for(i=0; i<len + TMP_EXTRA; i++){
10
ffmpeg-1.2.6.tar.bz2/libswresample/rematrix.c -> ffmpeg-1.2.7.tar.bz2/libswresample/rematrix.c
Changed
13
1
2
)
3
out_ch_layout = AV_CH_LAYOUT_STEREO;
4
5
+ if( in_ch_layout == AV_CH_LAYOUT_STEREO_DOWNMIX
6
+ && (out_ch_layout & AV_CH_LAYOUT_STEREO_DOWNMIX) == 0
7
+ )
8
+ in_ch_layout = AV_CH_LAYOUT_STEREO;
9
+
10
if(!sane_layout(in_ch_layout)){
11
av_get_channel_layout_string(buf, sizeof(buf), -1, s->in_ch_layout);
12
av_log(s, AV_LOG_ERROR, "Input channel layout '%s' is not supported\n", buf);
13
ffmpeg-1.2.6.tar.bz2/libswresample/resample.c -> ffmpeg-1.2.7.tar.bz2/libswresample/resample.c
Changed
22
1
2
int filter_type, int kaiser_beta){
3
int ph, i;
4
double x, y, w;
5
- double *tab = av_malloc(tap_count * sizeof(*tab));
6
+ double *tab = av_malloc_array(tap_count, sizeof(*tab));
7
const int center= (tap_count-1)/2;
8
9
if (!tab)
10
11
av_assert0(0);
12
}
13
14
+ if (filter_size/factor > INT32_MAX/256) {
15
+ av_log(NULL, AV_LOG_ERROR, "Filter length too large\n");
16
+ goto error;
17
+ }
18
+
19
c->phase_shift = phase_shift;
20
c->phase_mask = phase_count - 1;
21
c->linear = linear;
22
ffmpeg-1.2.6.tar.bz2/libswscale/swscale.c -> ffmpeg-1.2.7.tar.bz2/libswscale/swscale.c
Changed
22
1
2
{
3
int i;
4
int32_t *dst = (int32_t *) _dst;
5
- for (i = 0; i < width; i++)
6
- dst[i] = (FFMIN(dst[i], 30189 << 4) * 4769 - (39057361 << 2)) >> 12;
7
+ for (i = 0; i < width; i++) {
8
+ dst[i] = ((int)(FFMIN(dst[i], 30189 << 4) * 4769U - (39057361 << 2))) >> 12;
9
+ }
10
}
11
12
static void lumRangeFromJpeg16_c(int16_t *_dst, int width)
13
14
uint8_t *dst2[4];
15
uint8_t *rgb0_tmp = NULL;
16
17
- if (!srcSlice || !dstStride || !dst || !srcSlice) {
18
+ if (!srcStride || !dstStride || !dst || !srcSlice) {
19
av_log(c, AV_LOG_ERROR, "One of the input parameters to sws_scale() is NULL, please check the calling code\n");
20
return 0;
21
}
22
ffmpeg-1.2.6.tar.bz2/libswscale/swscale_unscaled.c -> ffmpeg-1.2.7.tar.bz2/libswscale/swscale_unscaled.c
Changed
10
1
2
c->swScale = ff_yuv2rgb_get_func_ptr(c);
3
}
4
5
- if (srcFormat == AV_PIX_FMT_YUV410P &&
6
+ if (srcFormat == AV_PIX_FMT_YUV410P && !(dstH & 3) &&
7
(dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) &&
8
!(flags & SWS_BITEXACT)) {
9
c->swScale = yvu9ToYv12Wrapper;
10
ffmpeg-1.2.6.tar.bz2/libswscale/x86/swscale.c -> ffmpeg-1.2.7.tar.bz2/libswscale/x86/swscale.c
Changed
11
1
2
"jb 1b \n\t"\
3
:: "g" (filter),
4
"r" (dest-offset), "g" ((x86_reg)(dstW+offset)), "m" (offset)
5
- : "%"REG_d, "%"REG_S, "%"REG_c
6
+ : XMM_CLOBBERS("%xmm0" , "%xmm1" , "%xmm2" , "%xmm3" , "%xmm4" , "%xmm5" , "%xmm7" ,)
7
+ "%"REG_d, "%"REG_S, "%"REG_c
8
);
9
}
10
#endif
11
ffmpeg-1.2.6.tar.bz2/libswscale/x86/swscale_template.c -> ffmpeg-1.2.7.tar.bz2/libswscale/x86/swscale_template.c
Changed
201
1
2
MOVNTQ( q3, 24(dst, index, 4))\
3
\
4
"add $8, "#index" \n\t"\
5
- "cmp "#dstw", "#index" \n\t"\
6
+ "cmp "dstw", "#index" \n\t"\
7
" jb 1b \n\t"
8
#define WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t) REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)
9
10
11
"psraw $3, %%mm1 \n\t"
12
"psraw $3, %%mm7 \n\t"
13
"packuswb %%mm7, %%mm1 \n\t"
14
- WRITEBGR32(%4, %5, %%REGa, %%mm3, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm2, %%mm6)
15
+ WRITEBGR32(%4, "%5", %%REGa, %%mm3, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm2, %%mm6)
16
YSCALEYUV2PACKEDX_END
17
} else {
18
YSCALEYUV2PACKEDX_ACCURATE
19
YSCALEYUV2RGBX
20
"pcmpeqd %%mm7, %%mm7 \n\t"
21
- WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
22
+ WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
23
YSCALEYUV2PACKEDX_END
24
}
25
}
26
27
"psraw $3, %%mm1 \n\t"
28
"psraw $3, %%mm7 \n\t"
29
"packuswb %%mm7, %%mm1 \n\t"
30
- WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
31
+ WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
32
YSCALEYUV2PACKEDX_END
33
} else {
34
YSCALEYUV2PACKEDX
35
YSCALEYUV2RGBX
36
"pcmpeqd %%mm7, %%mm7 \n\t"
37
- WRITEBGR32(%4, %5, %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
38
+ WRITEBGR32(%4, "%5", %%REGa, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
39
YSCALEYUV2PACKEDX_END
40
}
41
}
42
43
MOVNTQ(%%mm1, 8(dst, index, 2))\
44
\
45
"add $8, "#index" \n\t"\
46
- "cmp "#dstw", "#index" \n\t"\
47
+ "cmp "dstw", "#index" \n\t"\
48
" jb 1b \n\t"
49
#define WRITERGB16(dst, dstw, index) REAL_WRITERGB16(dst, dstw, index)
50
51
52
"paddusb "GREEN_DITHER"(%0), %%mm4\n\t"
53
"paddusb "RED_DITHER"(%0), %%mm5\n\t"
54
#endif
55
- WRITERGB16(%4, %5, %%REGa)
56
+ WRITERGB16(%4, "%5", %%REGa)
57
YSCALEYUV2PACKEDX_END
58
}
59
60
61
"paddusb "GREEN_DITHER"(%0), %%mm4 \n\t"
62
"paddusb "RED_DITHER"(%0), %%mm5 \n\t"
63
#endif
64
- WRITERGB16(%4, %5, %%REGa)
65
+ WRITERGB16(%4, "%5", %%REGa)
66
YSCALEYUV2PACKEDX_END
67
}
68
69
70
MOVNTQ(%%mm1, 8(dst, index, 2))\
71
\
72
"add $8, "#index" \n\t"\
73
- "cmp "#dstw", "#index" \n\t"\
74
+ "cmp "dstw", "#index" \n\t"\
75
" jb 1b \n\t"
76
#define WRITERGB15(dst, dstw, index) REAL_WRITERGB15(dst, dstw, index)
77
78
79
"paddusb "GREEN_DITHER"(%0), %%mm4\n\t"
80
"paddusb "RED_DITHER"(%0), %%mm5\n\t"
81
#endif
82
- WRITERGB15(%4, %5, %%REGa)
83
+ WRITERGB15(%4, "%5", %%REGa)
84
YSCALEYUV2PACKEDX_END
85
}
86
87
88
"paddusb "GREEN_DITHER"(%0), %%mm4 \n\t"
89
"paddusb "RED_DITHER"(%0), %%mm5 \n\t"
90
#endif
91
- WRITERGB15(%4, %5, %%REGa)
92
+ WRITERGB15(%4, "%5", %%REGa)
93
YSCALEYUV2PACKEDX_END
94
}
95
96
97
"add $24, "#dst" \n\t"\
98
\
99
"add $8, "#index" \n\t"\
100
- "cmp "#dstw", "#index" \n\t"\
101
+ "cmp "dstw", "#index" \n\t"\
102
" jb 1b \n\t"
103
104
#define WRITEBGR24MMXEXT(dst, dstw, index) \
105
106
"add $24, "#dst" \n\t"\
107
\
108
"add $8, "#index" \n\t"\
109
- "cmp "#dstw", "#index" \n\t"\
110
+ "cmp "dstw", "#index" \n\t"\
111
" jb 1b \n\t"
112
113
#if COMPILE_TEMPLATE_MMXEXT
114
115
"pxor %%mm7, %%mm7 \n\t"
116
"lea (%%"REG_a", %%"REG_a", 2), %%"REG_c"\n\t" //FIXME optimize
117
"add %4, %%"REG_c" \n\t"
118
- WRITEBGR24(%%REGc, %5, %%REGa)
119
+ WRITEBGR24(%%REGc, "%5", %%REGa)
120
:: "r" (&c->redDither),
121
"m" (dummy), "m" (dummy), "m" (dummy),
122
"r" (dest), "m" (dstW_reg), "m"(uv_off)
123
124
"pxor %%mm7, %%mm7 \n\t"
125
"lea (%%"REG_a", %%"REG_a", 2), %%"REG_c" \n\t" //FIXME optimize
126
"add %4, %%"REG_c" \n\t"
127
- WRITEBGR24(%%REGc, %5, %%REGa)
128
+ WRITEBGR24(%%REGc, "%5", %%REGa)
129
:: "r" (&c->redDither),
130
"m" (dummy), "m" (dummy), "m" (dummy),
131
"r" (dest), "m" (dstW_reg), "m"(uv_off)
132
133
MOVNTQ(%%mm7, 8(dst, index, 2))\
134
\
135
"add $8, "#index" \n\t"\
136
- "cmp "#dstw", "#index" \n\t"\
137
+ "cmp "dstw", "#index" \n\t"\
138
" jb 1b \n\t"
139
#define WRITEYUY2(dst, dstw, index) REAL_WRITEYUY2(dst, dstw, index)
140
141
142
"psraw $3, %%mm4 \n\t"
143
"psraw $3, %%mm1 \n\t"
144
"psraw $3, %%mm7 \n\t"
145
- WRITEYUY2(%4, %5, %%REGa)
146
+ WRITEYUY2(%4, "%5", %%REGa)
147
YSCALEYUV2PACKEDX_END
148
}
149
150
151
"psraw $3, %%mm4 \n\t"
152
"psraw $3, %%mm1 \n\t"
153
"psraw $3, %%mm7 \n\t"
154
- WRITEYUY2(%4, %5, %%REGa)
155
+ WRITEYUY2(%4, "%5", %%REGa)
156
YSCALEYUV2PACKEDX_END
157
}
158
159
160
"psraw $3, %%mm1 \n\t" /* abuf0[eax] - abuf1[eax] >>7*/
161
"psraw $3, %%mm7 \n\t" /* abuf0[eax] - abuf1[eax] >>7*/
162
"packuswb %%mm7, %%mm1 \n\t"
163
- WRITEBGR32(%4, 8280(%5), %%r8, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
164
+ WRITEBGR32(%4, DSTW_OFFSET"(%5)", %%r8, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
165
:: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "r" (dest),
166
"a" (&c->redDither),
167
"r" (abuf0), "r" (abuf1)
168
169
"packuswb %%mm7, %%mm1 \n\t"
170
"pop %1 \n\t"
171
"pop %0 \n\t"
172
- WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
173
+ WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm1, %%mm0, %%mm7, %%mm3, %%mm6)
174
"pop %%"REG_BP" \n\t"
175
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
176
:: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),
177
178
"push %%"REG_BP" \n\t"
179
YSCALEYUV2RGB(%%REGBP, %5)
180
"pcmpeqd %%mm7, %%mm7 \n\t"
181
- WRITEBGR32(%%REGb, 8280(%5), %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
182
+ WRITEBGR32(%%REGb, DSTW_OFFSET"(%5)", %%REGBP, %%mm2, %%mm4, %%mm5, %%mm7, %%mm0, %%mm1, %%mm3, %%mm6)
183
"pop %%"REG_BP" \n\t"
184
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
185
:: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),
186
187
const int16_t *buf0 = buf[0], *buf1 = buf[1],
188
*ubuf0 = ubuf[0], *ubuf1 = ubuf[1];
189
190
- //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :(
191
__asm__ volatile(
192
"mov %%"REG_b", "ESP_OFFSET"(%5) \n\t"
193
"mov %4, %%"REG_b" \n\t"
194
"push %%"REG_BP" \n\t"
195
YSCALEYUV2RGB(%%REGBP, %5)
196
"pxor %%mm7, %%mm7 \n\t"
197
- WRITEBGR24(%%REGb, 8280(%5), %%REGBP)
198
+ WRITEBGR24(%%REGb, DSTW_OFFSET"(%5)", %%REGBP)
199
"pop %%"REG_BP" \n\t"
200
"mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"
201
ffmpeg-1.2.6.tar.bz2/tests/ref/fate/vc1_sa10143 -> ffmpeg-1.2.7.tar.bz2/tests/ref/fate/vc1_sa10143
Changed
47
1
2
#tb 0: 1/25
3
0, 0, 0, 1, 518400, 0x89407f55
4
-0, 2, 2, 1, 518400, 0x8611849c
5
+0, 2, 2, 1, 518400, 0xaa896afd
6
0, 3, 3, 1, 518400, 0x0e69ff59
7
-0, 4, 4, 1, 518400, 0xf31adb03
8
+0, 4, 4, 1, 518400, 0x0c30bfa0
9
0, 5, 5, 1, 518400, 0x1a5b6a69
10
-0, 6, 6, 1, 518400, 0x6ae6232e
11
+0, 6, 6, 1, 518400, 0x23470858
12
0, 7, 7, 1, 518400, 0x9a4e3c54
13
-0, 8, 8, 1, 518400, 0xe5852b45
14
+0, 8, 8, 1, 518400, 0xad63160b
15
0, 9, 9, 1, 518400, 0x0fcfeebc
16
-0, 10, 10, 1, 518400, 0x06e22dc3
17
+0, 10, 10, 1, 518400, 0x20b31777
18
0, 11, 11, 1, 518400, 0x9d79df09
19
-0, 12, 12, 1, 518400, 0xcb2c716f
20
+0, 12, 12, 1, 518400, 0x3e86766f
21
0, 13, 13, 1, 518400, 0x638a8746
22
-0, 14, 14, 1, 518400, 0xf7032efd
23
+0, 14, 14, 1, 518400, 0x7a6c1a0e
24
0, 15, 15, 1, 518400, 0x306f6cef
25
-0, 16, 16, 1, 518400, 0xe83d2518
26
+0, 16, 16, 1, 518400, 0x81f81281
27
0, 17, 17, 1, 518400, 0x49ab5bf5
28
-0, 18, 18, 1, 518400, 0x6b336b6f
29
+0, 18, 18, 1, 518400, 0x8f316e44
30
0, 19, 19, 1, 518400, 0x95ae00c9
31
-0, 20, 20, 1, 518400, 0x68ddb64f
32
+0, 20, 20, 1, 518400, 0xf71bb7f5
33
0, 21, 21, 1, 518400, 0x5205ea68
34
-0, 22, 22, 1, 518400, 0xb088e617
35
+0, 22, 22, 1, 518400, 0x74a1d8b9
36
0, 23, 23, 1, 518400, 0xa3217616
37
-0, 24, 24, 1, 518400, 0x1723bc53
38
+0, 24, 24, 1, 518400, 0x2b28bbf8
39
0, 25, 25, 1, 518400, 0xf024872a
40
-0, 26, 26, 1, 518400, 0x2e81a8bb
41
+0, 26, 26, 1, 518400, 0x2fdbaaf3
42
0, 27, 27, 1, 518400, 0xa3a2418e
43
-0, 28, 28, 1, 518400, 0xb7beffed
44
+0, 28, 28, 1, 518400, 0x55bfe435
45
0, 29, 29, 1, 518400, 0x50fb6c94
46
0, 30, 30, 1, 518400, 0x5584bb40
47