Overview
avidemux3.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Mon Jul 20 2015 - joerg.lorenzen@ki.tng.de
4
+
5
+- update internal ffmpeg to version 2.7.2
6
+
7
+-------------------------------------------------------------------
8
Sat Jul 11 2015 - joerg.lorenzen@ki.tng.de
9
10
- Update to version 2.6.10
11
avidemux3.spec
Changed
10
1
2
#
3
4
5
-%define ffmpeg_version 2.7.1
6
+%define ffmpeg_version 2.7.2
7
8
Name: avidemux3
9
Summary: Graphical video editing and transcoding tool
10
ffmpeg-2.7.1.tar.bz2/Changelog -> ffmpeg-2.7.2.tar.bz2/Changelog
Changed
74
1
2
3
version <next>:
4
5
+version 2.7.2:
6
+- imc: use correct position for flcoeffs2 calculation
7
+- hevc: check slice address length
8
+- snow: remove an obsolete av_assert2
9
+- webp: fix infinite loop in webp_decode_frame
10
+- wavpack: limit extra_bits to 32 and use get_bits_long
11
+- ffmpeg: only count got_output/errors in decode_error_stat
12
+- ffmpeg: exit_on_error if decoding a packet failed
13
+- pthread_frame: forward error codes when flushing
14
+- huffyuvdec: validate image size
15
+- wavpack: use get_bits_long to read up to 32 bits
16
+- nutdec: check maxpos in read_sm_data before returning success
17
+- s302m: fix arithmetic exception
18
+- vc1dec: use get_bits_long and limit the read bits to 32
19
+- mpegaudiodec: copy AVFloatDSPContext from first context to all contexts
20
+- avcodec/vp8: Check buffer size in vp8_decode_frame_header()
21
+- avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()
22
+- avcodec/diracdec: Check for hpel_base allocation failure
23
+- avcodec/rv34: Clear pointers in ff_rv34_decode_init_thread_copy()
24
+- avfilter/af_aresample: Check ff_all_* for allocation failures
25
+- avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case
26
+- swscale/utils: Clear pix buffers
27
+- avutil/fifo: Fix the case where func() returns less bytes than requested in av_fifo_generic_write()
28
+- ffmpeg: Fix cleanup after failed allocation of output_files
29
+- avformat/mov: Fix deallocation when MOVStreamContext failed to allocate
30
+- ffmpeg: Fix crash with ost->last_frame allocation failure
31
+- ffmpeg: Fix cleanup with ost = NULL
32
+- avcodec/pthread_frame: check avctx on deallocation
33
+- avcodec/sanm: Reset sizes in destroy_buffers()
34
+- avcodec/alac: Clear pointers in allocate_buffers()
35
+- bytestream2: set the reader to the end when reading more than available
36
+- avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
37
+- avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
38
+- oggparsedirac: check return value of init_get_bits
39
+- wmalosslessdec: reset frame->nb_samples on packet loss
40
+- wmalosslessdec: avoid reading 0 bits with get_bits
41
+- Put a space between string literals and macros.
42
+- avcodec/rawenc: Use ff_alloc_packet() instead of ff_alloc_packet2()
43
+- avcodec/aacsbr: check that the element type matches before applying SBR
44
+- avcodec/h264_slice: Use w/h from the AVFrame instead of mb_w/h
45
+- vp9/update_prob: prevent out of bounds table read
46
+- avfilter/vf_transpose: Fix rounding error
47
+- avcodec/h264_refs: discard mismatching references
48
+- avcodec/mjpegdec: Fix small picture upscale
49
+- avcodec/pngdec: Check values before updating context in decode_fctl_chunk()
50
+- avcodec/pngdec: Copy IHDR & plte state from last thread
51
+- avcodec/pngdec: Require a IHDR chunk before fctl
52
+- avcodec/pngdec: Only allow one IHDR chunk
53
+- wmavoice: limit wmavoice_decode_packet return value to packet size
54
+- swscale/swscale_unscaled: Fix rounding difference with RGBA output between little and big endian
55
+- ffmpeg: Do not use the data/size of a bitstream filter after failure
56
+- swscale/x86/rgb2rgb_template: fix signedness of v in shuffle_bytes_2103_{mmx,mmxext}
57
+- vda: unlock the pixel buffer base address.
58
+- swscale/rgb2rgb_template: Fix signedness of v in shuffle_bytes_2103_c()
59
+- swscale/rgb2rgb_template: Implement shuffle_bytes_0321_c and fix shuffle_bytes_2103_c on BE
60
+- swscale/rgb2rgb_template: Disable shuffle_bytes_2103_c on big endian
61
+- swr: Remember previously set int_sample_format from user
62
+- swresample: soxr implementation for swr_get_out_samples()
63
+- avformat/swfdec: Do not error out on pixel format changes
64
+- ffmpeg_opt: Fix forcing fourccs
65
+- configure: Check for x265_api_get
66
+- swscale/x86/rgb2rgb_template: don't call emms on sse2/avx functions
67
+- swscale/x86/rgb2rgb_template: add missing xmm clobbers
68
+- library.mak: Workaround SDL redefining main and breaking fate tests on mingw
69
+- vaapi_h264: fix RefPicList[] field flags.
70
+
71
version 2.7.1:
72
- postproc: fix unaligned access
73
- avformat: clarify what package needs to be compiled with SSL support
74
ffmpeg-2.7.1.tar.bz2/RELEASE -> ffmpeg-2.7.2.tar.bz2/RELEASE
Changed
4
1
2
-2.7.1
3
+2.7.2
4
ffmpeg-2.7.1.tar.bz2/VERSION -> ffmpeg-2.7.2.tar.bz2/VERSION
Changed
4
1
2
-2.7.1
3
+2.7.2
4
ffmpeg-2.7.1.tar.bz2/configure -> ffmpeg-2.7.2.tar.bz2/configure
Changed
10
1
2
warn "using libx264 without pkg-config"; } } &&
3
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
4
die "ERROR: libx264 must be installed and version must be >= 0.118."; }
5
-enabled libx265 && require_pkg_config x265 x265.h x265_encoder_encode &&
6
+enabled libx265 && require_pkg_config x265 x265.h x265_api_get &&
7
{ check_cpp_condition x265.h "X265_BUILD >= 57" ||
8
die "ERROR: libx265 version must be >= 57."; }
9
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
10
ffmpeg-2.7.1.tar.bz2/doc/Doxyfile -> ffmpeg-2.7.2.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 = 2.7.1
6
+PROJECT_NUMBER = 2.7.2
7
8
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
9
# in the documentation. The maximum height of the logo should not exceed 55
10
ffmpeg-2.7.1.tar.bz2/ffmpeg.c -> ffmpeg-2.7.2.tar.bz2/ffmpeg.c
Changed
86
1
2
/* close files */
3
for (i = 0; i < nb_output_files; i++) {
4
OutputFile *of = output_files[i];
5
- AVFormatContext *s = of->ctx;
6
+ AVFormatContext *s;
7
+ if (!of)
8
+ continue;
9
+ s = of->ctx;
10
if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE))
11
avio_closep(&s->pb);
12
avformat_free_context(s);
13
14
}
15
for (i = 0; i < nb_output_streams; i++) {
16
OutputStream *ost = output_streams[i];
17
- AVBitStreamFilterContext *bsfc = ost->bitstream_filters;
18
+ AVBitStreamFilterContext *bsfc;
19
+
20
+ if (!ost)
21
+ continue;
22
+
23
+ bsfc = ost->bitstream_filters;
24
while (bsfc) {
25
AVBitStreamFilterContext *next = bsfc->next;
26
av_bitstream_filter_close(bsfc);
27
28
if (!new_pkt.buf)
29
exit_program(1);
30
} else if (a < 0) {
31
+ new_pkt = *pkt;
32
av_log(NULL, AV_LOG_ERROR, "Failed to open bitstream filter %s for stream %d with codec %s",
33
bsfc->filter->name, pkt->stream_index,
34
avctx->codec ? avctx->codec->name : "copy");
35
36
if (!ost->last_frame)
37
ost->last_frame = av_frame_alloc();
38
av_frame_unref(ost->last_frame);
39
- if (next_picture)
40
+ if (next_picture && ost->last_frame)
41
av_frame_ref(ost->last_frame, next_picture);
42
else
43
av_frame_free(&ost->last_frame);
44
45
ret = AVERROR_INVALIDDATA;
46
}
47
48
- if (*got_output || ret<0 || pkt->size)
49
+ if (*got_output || ret<0)
50
decode_error_stat[ret<0] ++;
51
52
+ if (ret < 0 && exit_on_error)
53
+ exit_program(1);
54
+
55
if (!*got_output || ret < 0) {
56
if (!pkt->size) {
57
for (i = 0; i < ist->nb_filters; i++)
58
59
);
60
}
61
62
- if (*got_output || ret<0 || pkt->size)
63
+ if (*got_output || ret<0)
64
decode_error_stat[ret<0] ++;
65
66
+ if (ret < 0 && exit_on_error)
67
+ exit_program(1);
68
+
69
if (*got_output && ret >= 0) {
70
if (ist->dec_ctx->width != decoded_frame->width ||
71
ist->dec_ctx->height != decoded_frame->height ||
72
73
int i, ret = avcodec_decode_subtitle2(ist->dec_ctx,
74
&subtitle, got_output, pkt);
75
76
- if (*got_output || ret<0 || pkt->size)
77
+ if (*got_output || ret<0)
78
decode_error_stat[ret<0] ++;
79
80
+ if (ret < 0 && exit_on_error)
81
+ exit_program(1);
82
+
83
if (ret < 0 || !*got_output) {
84
if (!pkt->size)
85
sub2video_flush(ist);
86
ffmpeg-2.7.1.tar.bz2/ffmpeg_opt.c -> ffmpeg-2.7.2.tar.bz2/ffmpeg_opt.c
Changed
9
1
2
uint32_t tag = strtol(codec_tag, &next, 0);
3
if (*next)
4
tag = AV_RL32(codec_tag);
5
+ ost->st->codec->codec_tag =
6
ost->enc_ctx->codec_tag = tag;
7
}
8
9
ffmpeg-2.7.1.tar.bz2/ffmpeg_vda.c -> ffmpeg-2.7.2.tar.bz2/ffmpeg_vda.c
Changed
10
1
2
frame->width, frame->height);
3
4
ret = av_frame_copy_props(vda->tmp_frame, frame);
5
+ CVPixelBufferUnlockBaseAddress(pixbuf, kCVPixelBufferLock_ReadOnly);
6
+
7
if (ret < 0)
8
return ret;
9
10
ffmpeg-2.7.1.tar.bz2/libavcodec/aacsbr.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/aacsbr.c
Changed
31
1
2
{
3
unsigned int cnt = get_bits_count(gb);
4
5
+ sbr->id_aac = id_aac;
6
+
7
if (id_aac == TYPE_SCE || id_aac == TYPE_CCE) {
8
if (read_sbr_single_channel_element(ac, sbr, gb)) {
9
sbr_turnoff(sbr);
10
11
int nch = (id_aac == TYPE_CPE) ? 2 : 1;
12
int err;
13
14
+ if (id_aac != sbr->id_aac) {
15
+ av_log(ac->avctx, AV_LOG_ERROR,
16
+ "element type mismatch %d != %d\n", id_aac, sbr->id_aac);
17
+ sbr_turnoff(sbr);
18
+ }
19
+
20
if (!sbr->kx_and_m_pushed) {
21
sbr->kx[0] = sbr->kx[1];
22
sbr->m[0] = sbr->m[1];
23
24
sbr->c.sbr_hf_inverse_filter(&sbr->dsp, sbr->alpha0, sbr->alpha1,
25
(const float (*)[40][2]) sbr->X_low, sbr->k[0]);
26
sbr_chirp(sbr, &sbr->data[ch]);
27
+ av_assert0(sbr->data[ch].bs_num_env > 0);
28
sbr_hf_gen(ac, sbr, sbr->X_high,
29
(const float (*)[40][2]) sbr->X_low,
30
(const float (*)[2]) sbr->alpha0,
31
ffmpeg-2.7.1.tar.bz2/libavcodec/alac.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/alac.c
Changed
14
1
2
int ch;
3
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
4
5
+ for (ch = 0; ch < 2; ch++) {
6
+ alac->predict_error_buffer[ch] = NULL;
7
+ alac->output_samples_buffer[ch] = NULL;
8
+ alac->extra_bits_buffer[ch] = NULL;
9
+ }
10
+
11
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
12
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
13
buf_size, buf_alloc_fail);
14
ffmpeg-2.7.1.tar.bz2/libavcodec/bytestream.h -> ffmpeg-2.7.2.tar.bz2/libavcodec/bytestream.h
Changed
13
1
2
} \
3
static av_always_inline type bytestream2_get_ ## name(GetByteContext *g) \
4
{ \
5
- if (g->buffer_end - g->buffer < bytes) \
6
+ if (g->buffer_end - g->buffer < bytes) { \
7
+ g->buffer = g->buffer_end; \
8
return 0; \
9
+ } \
10
return bytestream2_get_ ## name ## u(g); \
11
} \
12
static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g) \
13
ffmpeg-2.7.1.tar.bz2/libavcodec/diracdec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/diracdec.c
Changed
49
1
2
}
3
}
4
5
-static void interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, int width, int height)
6
+static int interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, int width, int height)
7
{
8
/* chroma allocates an edge of 8 when subsampled
9
which for 4:2:2 means an h edge of 16 and v edge of 8
10
11
12
/* no need for hpel if we only have fpel vectors */
13
if (!s->mv_precision)
14
- return;
15
+ return 0;
16
17
for (i = 1; i < 4; i++) {
18
if (!ref->hpel_base[plane][i])
19
ref->hpel_base[plane][i] = av_malloc((height+2*edge) * ref->avframe->linesize[plane] + 32);
20
+ if (!ref->hpel_base[plane][i]) {
21
+ return AVERROR(ENOMEM);
22
+ }
23
/* we need to be 16-byte aligned even for chroma */
24
ref->hpel[plane][i] = ref->hpel_base[plane][i] + edge*ref->avframe->linesize[plane] + 16;
25
}
26
27
s->mpvencdsp.draw_edges(ref->hpel[plane][3], ref->avframe->linesize[plane], width, height, edge, edge, EDGE_TOP | EDGE_BOTTOM);
28
}
29
ref->interpolated[plane] = 1;
30
+
31
+ return 0;
32
}
33
34
/**
35
36
37
select_dsp_funcs(s, p->width, p->height, p->xblen, p->yblen);
38
39
- for (i = 0; i < s->num_refs; i++)
40
- interpolate_refplane(s, s->ref_pics[i], comp, p->width, p->height);
41
+ for (i = 0; i < s->num_refs; i++) {
42
+ int ret = interpolate_refplane(s, s->ref_pics[i], comp, p->width, p->height);
43
+ if (ret < 0)
44
+ return ret;
45
+ }
46
47
memset(s->mctmp, 0, 4*p->yoffset*p->stride);
48
49
ffmpeg-2.7.1.tar.bz2/libavcodec/h264_refs.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/h264_refs.c
Changed
31
1
2
int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl)
3
{
4
int i, len;
5
+ int j;
6
7
if (sl->slice_type_nos == AV_PICTURE_TYPE_B) {
8
H264Picture *sorted[32];
9
10
}
11
}
12
#endif
13
+
14
+ for (j = 0; j<1+(sl->slice_type_nos == AV_PICTURE_TYPE_B); j++) {
15
+ for (i = 0; i < sl->ref_count[j]; i++) {
16
+ if (h->default_ref_list[j][i].parent) {
17
+ AVFrame *f = h->default_ref_list[j][i].parent->f;
18
+ if (h->cur_pic_ptr->f->width != f->width ||
19
+ h->cur_pic_ptr->f->height != f->height ||
20
+ h->cur_pic_ptr->f->format != f->format) {
21
+ av_log(h->avctx, AV_LOG_ERROR, "Discarding mismatching reference\n");
22
+ memset(&h->default_ref_list[j][i], 0, sizeof(h->default_ref_list[j][i]));
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
return 0;
29
}
30
31
ffmpeg-2.7.1.tar.bz2/libavcodec/h264_slice.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/h264_slice.c
Changed
12
1
2
(const uint8_t **)prev->f->data,
3
prev->f->linesize,
4
prev->f->format,
5
- h->mb_width * 16,
6
- h->mb_height * 16);
7
+ prev->f->width,
8
+ prev->f->height);
9
h->short_ref[0]->poc = prev->poc + 2;
10
}
11
h->short_ref[0]->frame_num = h->prev_frame_num;
12
ffmpeg-2.7.1.tar.bz2/libavcodec/hevc.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/hevc.c
Changed
10
1
2
3
slice_address_length = av_ceil_log2(s->sps->ctb_width *
4
s->sps->ctb_height);
5
- sh->slice_segment_addr = get_bits(gb, slice_address_length);
6
+ sh->slice_segment_addr = slice_address_length ? get_bits(gb, slice_address_length) : 0;
7
if (sh->slice_segment_addr >= s->sps->ctb_width * s->sps->ctb_height) {
8
av_log(s->avctx, AV_LOG_ERROR,
9
"Invalid slice segment address: %u.\n",
10
ffmpeg-2.7.1.tar.bz2/libavcodec/hevc_parser.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/hevc_parser.c
Changed
10
1
2
3
slice_address_length = av_ceil_log2_c(h->sps->ctb_width *
4
h->sps->ctb_height);
5
- sh->slice_segment_addr = get_bits(gb, slice_address_length);
6
+ sh->slice_segment_addr = slice_address_length ? get_bits(gb, slice_address_length) : 0;
7
if (sh->slice_segment_addr >= h->sps->ctb_width * h->sps->ctb_height) {
8
av_log(h->avctx, AV_LOG_ERROR, "Invalid slice segment address: %u.\n",
9
sh->slice_segment_addr);
10
ffmpeg-2.7.1.tar.bz2/libavcodec/huffyuvdec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/huffyuvdec.c
Changed
20
1
2
#include "huffyuv.h"
3
#include "huffyuvdsp.h"
4
#include "thread.h"
5
+#include "libavutil/imgutils.h"
6
#include "libavutil/pixdesc.h"
7
8
#define classic_shift_luma_table_size 42
9
10
HYuvContext *s = avctx->priv_data;
11
int ret;
12
13
+ ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
14
+ if (ret < 0)
15
+ return ret;
16
+
17
ff_huffyuvdsp_init(&s->hdsp);
18
memset(s->vlc, 0, 4 * sizeof(VLC));
19
20
ffmpeg-2.7.1.tar.bz2/libavcodec/imc.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/imc.c
Changed
10
1
2
3
pos = q->coef0_pos;
4
flcoeffs1[pos] = 20000.0 / pow (2, levlCoeffBuf[0] * 0.18945); // 0.18945 = log2(10) * 0.05703125
5
- flcoeffs2[pos] = log2f(flcoeffs1[0]);
6
+ flcoeffs2[pos] = log2f(flcoeffs1[pos]);
7
tmp = flcoeffs1[pos];
8
tmp2 = flcoeffs2[pos];
9
10
ffmpeg-2.7.1.tar.bz2/libavcodec/mjpegdec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/mjpegdec.c
Changed
19
1
2
}
3
} else if (s->upscale_h[p] == 2) {
4
if (is16bit) {
5
- ((uint16_t*)line)[w - 1] =
6
- ((uint16_t*)line)[w - 2] = ((uint16_t*)line)[(w - 1) / 3];
7
+ ((uint16_t*)line)[w - 1] = ((uint16_t*)line)[(w - 1) / 3];
8
+ if (w > 1)
9
+ ((uint16_t*)line)[w - 2] = ((uint16_t*)line)[w - 1];
10
} else {
11
- line[w - 1] =
12
- line[w - 2] = line[(w - 1) / 3];
13
+ line[w - 1] = line[(w - 1) / 3];
14
+ if (w > 1)
15
+ line[w - 2] = line[w - 1];
16
}
17
for (index = w - 3; index > 0; index--) {
18
line[index] = (line[index / 3] + line[(index + 1) / 3] + line[(index + 2) / 3] + 1) / 3;
19
ffmpeg-2.7.1.tar.bz2/libavcodec/mpegaudiodec_template.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/mpegaudiodec_template.c
Changed
9
1
2
s->mp3decctx[i]->adu_mode = 1;
3
s->mp3decctx[i]->avctx = avctx;
4
s->mp3decctx[i]->mpadsp = s->mp3decctx[0]->mpadsp;
5
+ s->mp3decctx[i]->fdsp = s->mp3decctx[0]->fdsp;
6
}
7
8
return 0;
9
ffmpeg-2.7.1.tar.bz2/libavcodec/mpegvideo.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/mpegvideo.c
Changed
104
1
2
return AVERROR(ENOMEM);
3
}
4
5
+static void clear_context(MpegEncContext *s)
6
+{
7
+ int i, j, k;
8
+
9
+ memset(&s->next_picture, 0, sizeof(s->next_picture));
10
+ memset(&s->last_picture, 0, sizeof(s->last_picture));
11
+ memset(&s->current_picture, 0, sizeof(s->current_picture));
12
+ memset(&s->new_picture, 0, sizeof(s->new_picture));
13
+
14
+ memset(s->thread_context, 0, sizeof(s->thread_context));
15
+
16
+ s->me.map = NULL;
17
+ s->me.score_map = NULL;
18
+ s->dct_error_sum = NULL;
19
+ s->block = NULL;
20
+ s->blocks = NULL;
21
+ memset(s->pblocks, 0, sizeof(s->pblocks));
22
+ s->ac_val_base = NULL;
23
+ s->ac_val[0] =
24
+ s->ac_val[1] =
25
+ s->ac_val[2] =NULL;
26
+ s->sc.edge_emu_buffer = NULL;
27
+ s->me.scratchpad = NULL;
28
+ s->me.temp =
29
+ s->sc.rd_scratchpad =
30
+ s->sc.b_scratchpad =
31
+ s->sc.obmc_scratchpad = NULL;
32
+
33
+ s->parse_context.buffer = NULL;
34
+ s->parse_context.buffer_size = 0;
35
+ s->bitstream_buffer = NULL;
36
+ s->allocated_bitstream_buffer_size = 0;
37
+ s->picture = NULL;
38
+ s->mb_type = NULL;
39
+ s->p_mv_table_base = NULL;
40
+ s->b_forw_mv_table_base = NULL;
41
+ s->b_back_mv_table_base = NULL;
42
+ s->b_bidir_forw_mv_table_base = NULL;
43
+ s->b_bidir_back_mv_table_base = NULL;
44
+ s->b_direct_mv_table_base = NULL;
45
+ s->p_mv_table = NULL;
46
+ s->b_forw_mv_table = NULL;
47
+ s->b_back_mv_table = NULL;
48
+ s->b_bidir_forw_mv_table = NULL;
49
+ s->b_bidir_back_mv_table = NULL;
50
+ s->b_direct_mv_table = NULL;
51
+ for (i = 0; i < 2; i++) {
52
+ for (j = 0; j < 2; j++) {
53
+ for (k = 0; k < 2; k++) {
54
+ s->b_field_mv_table_base[i][j][k] = NULL;
55
+ s->b_field_mv_table[i][j][k] = NULL;
56
+ }
57
+ s->b_field_select_table[i][j] = NULL;
58
+ s->p_field_mv_table_base[i][j] = NULL;
59
+ s->p_field_mv_table[i][j] = NULL;
60
+ }
61
+ s->p_field_select_table[i] = NULL;
62
+ }
63
+
64
+ s->dc_val_base = NULL;
65
+ s->coded_block_base = NULL;
66
+ s->mbintra_table = NULL;
67
+ s->cbp_table = NULL;
68
+ s->pred_dir_table = NULL;
69
+
70
+ s->mbskip_table = NULL;
71
+
72
+ s->er.error_status_table = NULL;
73
+ s->er.er_temp_buffer = NULL;
74
+ s->mb_index2xy = NULL;
75
+ s->lambda_table = NULL;
76
+
77
+ s->cplx_tab = NULL;
78
+ s->bits_tab = NULL;
79
+}
80
+
81
/**
82
* init common structure for both encoder and decoder.
83
* this assumes that some variables like width/height are already set
84
85
s->avctx->active_thread_type & FF_THREAD_SLICE) ?
86
s->avctx->thread_count : 1;
87
88
+ clear_context(s);
89
+
90
if (s->encoding && s->avctx->slices)
91
nb_slices = s->avctx->slices;
92
93
94
if (!s->picture[i].f)
95
goto fail;
96
}
97
- memset(&s->next_picture, 0, sizeof(s->next_picture));
98
- memset(&s->last_picture, 0, sizeof(s->last_picture));
99
- memset(&s->current_picture, 0, sizeof(s->current_picture));
100
- memset(&s->new_picture, 0, sizeof(s->new_picture));
101
s->next_picture.f = av_frame_alloc();
102
if (!s->next_picture.f)
103
goto fail;
104
ffmpeg-2.7.1.tar.bz2/libavcodec/pngdec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/pngdec.c
Changed
121
1
2
return AVERROR_INVALIDDATA;
3
}
4
5
- s->width = bytestream2_get_be32(&s->gb);
6
- s->height = bytestream2_get_be32(&s->gb);
7
+ if (s->state & PNG_IHDR) {
8
+ av_log(avctx, AV_LOG_ERROR, "Multiple IHDR\n");
9
+ return AVERROR_INVALIDDATA;
10
+ }
11
+
12
+ s->width = s->cur_w = bytestream2_get_be32(&s->gb);
13
+ s->height = s->cur_h = bytestream2_get_be32(&s->gb);
14
if (av_image_check_size(s->width, s->height, 0, avctx)) {
15
- s->width = s->height = 0;
16
+ s->cur_w = s->cur_h = s->width = s->height = 0;
17
av_log(avctx, AV_LOG_ERROR, "Invalid image size\n");
18
return AVERROR_INVALIDDATA;
19
}
20
- if (s->cur_w == 0 && s->cur_h == 0) {
21
- // Only set cur_w/h if update_thread_context() has not set it
22
- s->cur_w = s->width;
23
- s->cur_h = s->height;
24
- }
25
s->bit_depth = bytestream2_get_byte(&s->gb);
26
s->color_type = bytestream2_get_byte(&s->gb);
27
s->compression_type = bytestream2_get_byte(&s->gb);
28
29
uint32_t length)
30
{
31
uint32_t sequence_number;
32
+ int cur_w, cur_h, x_offset, y_offset, dispose_op, blend_op;
33
34
if (length != 26)
35
return AVERROR_INVALIDDATA;
36
37
+ if (!(s->state & PNG_IHDR)) {
38
+ av_log(avctx, AV_LOG_ERROR, "fctl before IHDR\n");
39
+ return AVERROR_INVALIDDATA;
40
+ }
41
+
42
s->last_w = s->cur_w;
43
s->last_h = s->cur_h;
44
s->last_x_offset = s->x_offset;
45
46
s->last_dispose_op = s->dispose_op;
47
48
sequence_number = bytestream2_get_be32(&s->gb);
49
- s->cur_w = bytestream2_get_be32(&s->gb);
50
- s->cur_h = bytestream2_get_be32(&s->gb);
51
- s->x_offset = bytestream2_get_be32(&s->gb);
52
- s->y_offset = bytestream2_get_be32(&s->gb);
53
+ cur_w = bytestream2_get_be32(&s->gb);
54
+ cur_h = bytestream2_get_be32(&s->gb);
55
+ x_offset = bytestream2_get_be32(&s->gb);
56
+ y_offset = bytestream2_get_be32(&s->gb);
57
bytestream2_skip(&s->gb, 4); /* delay_num (2), delay_den (2) */
58
- s->dispose_op = bytestream2_get_byte(&s->gb);
59
- s->blend_op = bytestream2_get_byte(&s->gb);
60
+ dispose_op = bytestream2_get_byte(&s->gb);
61
+ blend_op = bytestream2_get_byte(&s->gb);
62
bytestream2_skip(&s->gb, 4); /* crc */
63
64
if (sequence_number == 0 &&
65
- (s->cur_w != s->width ||
66
- s->cur_h != s->height ||
67
- s->x_offset != 0 ||
68
- s->y_offset != 0) ||
69
- s->cur_w <= 0 || s->cur_h <= 0 ||
70
- s->x_offset < 0 || s->y_offset < 0 ||
71
- s->cur_w > s->width - s->x_offset|| s->cur_h > s->height - s->y_offset)
72
+ (cur_w != s->width ||
73
+ cur_h != s->height ||
74
+ x_offset != 0 ||
75
+ y_offset != 0) ||
76
+ cur_w <= 0 || cur_h <= 0 ||
77
+ x_offset < 0 || y_offset < 0 ||
78
+ cur_w > s->width - x_offset|| cur_h > s->height - y_offset)
79
return AVERROR_INVALIDDATA;
80
81
if (sequence_number == 0 && s->dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
82
83
s->dispose_op = APNG_BLEND_OP_SOURCE;
84
}
85
86
+ s->cur_w = cur_w;
87
+ s->cur_h = cur_h;
88
+ s->x_offset = x_offset;
89
+ s->y_offset = y_offset;
90
+ s->dispose_op = dispose_op;
91
+ s->blend_op = blend_op;
92
+
93
return 0;
94
}
95
96
97
(ret = ff_thread_ref_frame(&pdst->picture, &psrc->picture)) < 0)
98
return ret;
99
if (CONFIG_APNG_DECODER && dst->codec_id == AV_CODEC_ID_APNG) {
100
+ pdst->width = psrc->width;
101
+ pdst->height = psrc->height;
102
+ pdst->bit_depth = psrc->bit_depth;
103
+ pdst->color_type = psrc->color_type;
104
+ pdst->compression_type = psrc->compression_type;
105
+ pdst->interlace_type = psrc->interlace_type;
106
+ pdst->filter_type = psrc->filter_type;
107
pdst->cur_w = psrc->cur_w;
108
pdst->cur_h = psrc->cur_h;
109
pdst->x_offset = psrc->x_offset;
110
pdst->y_offset = psrc->y_offset;
111
+
112
pdst->dispose_op = psrc->dispose_op;
113
114
+ memcpy(pdst->palette, psrc->palette, sizeof(pdst->palette));
115
+
116
+ pdst->state |= psrc->state & (PNG_IHDR | PNG_PLTE);
117
+
118
ff_thread_release_buffer(dst, &pdst->last_picture);
119
if (psrc->last_picture.f->data[0])
120
return ff_thread_ref_frame(&pdst->last_picture, &psrc->last_picture);
121
ffmpeg-2.7.1.tar.bz2/libavcodec/pthread_frame.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/pthread_frame.c
Changed
59
1
2
*got_picture_ptr = p->got_frame;
3
picture->pkt_dts = p->avpkt.dts;
4
5
+ if (p->result < 0)
6
+ err = p->result;
7
+
8
/*
9
* A later call with avkpt->size == 0 may loop over all threads,
10
* including this one, searching for a frame to return before being
11
12
13
fctx->next_finished = finished;
14
15
+ /*
16
+ * When no frame was found while flushing, but an error occured in
17
+ * any thread, return it instead of 0.
18
+ * Otherwise the error can get lost.
19
+ */
20
+ if (!avpkt->size && !*got_picture_ptr)
21
+ return err;
22
+
23
/* return the size of the consumed packet if no error occurred */
24
return (p->result >= 0) ? avpkt->size : p->result;
25
}
26
27
pthread_join(p->thread, NULL);
28
p->thread_init=0;
29
30
- if (codec->close)
31
+ if (codec->close && p->avctx)
32
codec->close(p->avctx);
33
34
release_delayed_buffers(p);
35
36
av_packet_unref(&p->avpkt);
37
av_freep(&p->released_buffers);
38
39
- if (i) {
40
+ if (i && p->avctx) {
41
av_freep(&p->avctx->priv_data);
42
av_freep(&p->avctx->slice_offset);
43
}
44
45
- av_freep(&p->avctx->internal);
46
+ if (p->avctx)
47
+ av_freep(&p->avctx->internal);
48
av_freep(&p->avctx);
49
}
50
51
52
53
copy->internal = av_malloc(sizeof(AVCodecInternal));
54
if (!copy->internal) {
55
+ copy->priv_data = NULL;
56
err = AVERROR(ENOMEM);
57
goto error;
58
}
59
ffmpeg-2.7.1.tar.bz2/libavcodec/rawenc.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/rawenc.c
Changed
10
1
2
if (ret < 0)
3
return ret;
4
5
- if ((ret = ff_alloc_packet2(avctx, pkt, ret)) < 0)
6
+ if ((ret = ff_alloc_packet(pkt, ret)) < 0)
7
return ret;
8
if ((ret = avpicture_layout((const AVPicture *)frame, avctx->pix_fmt, avctx->width,
9
avctx->height, pkt->data, pkt->size)) < 0)
10
ffmpeg-2.7.1.tar.bz2/libavcodec/rv34.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/rv34.c
Changed
16
1
2
3
if (avctx->internal->is_copy) {
4
r->tmp_b_block_base = NULL;
5
+ r->cbp_chroma = NULL;
6
+ r->cbp_luma = NULL;
7
+ r->deblock_coefs = NULL;
8
+ r->intra_types_hist = NULL;
9
+ r->mb_type = NULL;
10
+
11
ff_mpv_idct_init(&r->s);
12
+
13
if ((err = ff_mpv_common_init(&r->s)) < 0)
14
return err;
15
if ((err = rv34_decoder_alloc(r)) < 0) {
16
ffmpeg-2.7.1.tar.bz2/libavcodec/s302m.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/s302m.c
Changed
21
1
2
case 8:
3
avctx->channel_layout = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_LAYOUT_STEREO_DOWNMIX;
4
}
5
- avctx->bit_rate = 48000 * avctx->channels * (avctx->bits_per_raw_sample + 4) +
6
- 32 * (48000 / (buf_size * 8 /
7
- (avctx->channels *
8
- (avctx->bits_per_raw_sample + 4))));
9
10
return frame_size;
11
}
12
13
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
14
return ret;
15
16
+ avctx->bit_rate = 48000 * avctx->channels * (avctx->bits_per_raw_sample + 4) +
17
+ 32 * 48000 / frame->nb_samples;
18
buf_size = (frame->nb_samples * avctx->channels / 2) * block_size;
19
20
if (avctx->bits_per_raw_sample == 24) {
21
ffmpeg-2.7.1.tar.bz2/libavcodec/sanm.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/sanm.c
Changed
9
1
2
ctx->frm0_size =
3
ctx->frm1_size =
4
ctx->frm2_size = 0;
5
+ init_sizes(ctx, 0, 0);
6
}
7
8
static av_cold int init_buffers(SANMVideoContext *ctx)
9
ffmpeg-2.7.1.tar.bz2/libavcodec/sbr.h -> ffmpeg-2.7.2.tar.bz2/libavcodec/sbr.h
Changed
9
1
2
struct SpectralBandReplication {
3
int sample_rate;
4
int start;
5
+ int id_aac;
6
int reset;
7
SpectrumParameters spectrum_params;
8
int bs_amp_res_header;
9
ffmpeg-2.7.1.tar.bz2/libavcodec/snow.h -> ffmpeg-2.7.2.tar.bz2/libavcodec/snow.h
Changed
19
1
2
BlockNode *lb= lt+b_stride;
3
BlockNode *rb= lb+1;
4
uint8_t *block[4];
5
+ // When src_stride is large enough, it is possible to interleave the blocks.
6
+ // Otherwise the blocks are written sequentially in the tmp buffer.
7
int tmp_step= src_stride >= 7*MB_SIZE ? MB_SIZE : MB_SIZE*src_stride;
8
uint8_t *tmp = s->scratchbuf;
9
uint8_t *ptmp;
10
11
12
if(b_w<=0 || b_h<=0) return;
13
14
- av_assert2(src_stride > 2*MB_SIZE + 5);
15
-
16
if(!sliced && offset_dst)
17
dst += src_x + src_y*dst_stride;
18
dst8+= src_x + src_y*src_stride;
19
ffmpeg-2.7.1.tar.bz2/libavcodec/utils.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/utils.c
Changed
15
1
2
3
*width = FFALIGN(*width, w_align);
4
*height = FFALIGN(*height, h_align);
5
- if (s->codec_id == AV_CODEC_ID_H264 || s->lowres)
6
+ if (s->codec_id == AV_CODEC_ID_H264 || s->lowres) {
7
// some of the optimized chroma MC reads one line too much
8
// which is also done in mpeg decoders with lowres > 0
9
*height += 2;
10
+ *width = FFMAX(*width, 32);
11
+ }
12
13
for (i = 0; i < 4; i++)
14
linesize_align[i] = STRIDE_ALIGN;
15
ffmpeg-2.7.1.tar.bz2/libavcodec/vaapi_h264.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/vaapi_h264.c
Changed
11
1
2
unsigned int i, n = 0;
3
for (i = 0; i < ref_count; i++)
4
if (ref_list[i].reference)
5
- fill_vaapi_pic(&RefPicList[n++], ref_list[i].parent, 0);
6
+ fill_vaapi_pic(&RefPicList[n++], ref_list[i].parent,
7
+ ref_list[i].reference);
8
9
for (; n < 32; n++)
10
init_vaapi_pic(&RefPicList[n]);
11
ffmpeg-2.7.1.tar.bz2/libavcodec/vc1dec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/vc1dec.c
Changed
10
1
2
count = avctx->extradata_size*8 - get_bits_count(&gb);
3
if (count > 0) {
4
av_log(avctx, AV_LOG_INFO, "Extra data: %i bits left, value: %X\n",
5
- count, get_bits(&gb, count));
6
+ count, get_bits_long(&gb, FFMIN(count, 32)));
7
} else if (count < 0) {
8
av_log(avctx, AV_LOG_INFO, "Read %i bits in overflow\n", -count);
9
}
10
ffmpeg-2.7.1.tar.bz2/libavcodec/vp8.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/vp8.c
Changed
23
1
2
int width = s->avctx->width;
3
int height = s->avctx->height;
4
5
+ if (buf_size < 3) {
6
+ av_log(s->avctx, AV_LOG_ERROR, "Insufficent data (%d) for header\n", buf_size);
7
+ return AVERROR_INVALIDDATA;
8
+ }
9
+
10
s->keyframe = !(buf[0] & 1);
11
s->profile = (buf[0]>>1) & 7;
12
s->invisible = !(buf[0] & 0x10);
13
14
VP8Context *s = avctx->priv_data;
15
int i;
16
17
+ if (!s)
18
+ return 0;
19
+
20
vp8_decode_flush_impl(avctx, 1);
21
for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++)
22
av_frame_free(&s->frames[i].tf.f);
23
ffmpeg-2.7.1.tar.bz2/libavcodec/vp9.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/vp9.c
Changed
27
1
2
// differential forward probability updates
3
static int update_prob(VP56RangeCoder *c, int p)
4
{
5
- static const int inv_map_table[254] = {
6
+ static const int inv_map_table[255] = {
7
7, 20, 33, 46, 59, 72, 85, 98, 111, 124, 137, 150, 163, 176,
8
189, 202, 215, 228, 241, 254, 1, 2, 3, 4, 5, 6, 8, 9,
9
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24,
10
11
207, 208, 209, 210, 211, 212, 213, 214, 216, 217, 218, 219, 220, 221,
12
222, 223, 224, 225, 226, 227, 229, 230, 231, 232, 233, 234, 235, 236,
13
237, 238, 239, 240, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
14
- 252, 253,
15
+ 252, 253, 253,
16
};
17
int d;
18
19
20
if (d >= 65)
21
d = (d << 1) - 65 + vp8_rac_get(c);
22
d += 64;
23
+ av_assert2(d < FF_ARRAY_ELEMS(inv_map_table));
24
}
25
26
return p <= 128 ? 1 + inv_recenter_nonneg(inv_map_table[d], p - 1) :
27
ffmpeg-2.7.1.tar.bz2/libavcodec/wavpack.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/wavpack.c
Changed
41
1
2
if (t >= 2) {
3
if (get_bits_left(gb) < t - 1)
4
goto error;
5
- t = get_bits(gb, t - 1) | (1 << (t - 1));
6
+ t = get_bits_long(gb, t - 1) | (1 << (t - 1));
7
} else {
8
if (get_bits_left(gb) < 0)
9
goto error;
10
11
} else {
12
if (get_bits_left(gb) < t2 - 1)
13
goto error;
14
- t += get_bits(gb, t2 - 1) | (1 << (t2 - 1));
15
+ t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1));
16
}
17
}
18
19
20
21
if (s->got_extra_bits &&
22
get_bits_left(&s->gb_extra_bits) >= s->extra_bits) {
23
- S |= get_bits(&s->gb_extra_bits, s->extra_bits);
24
+ S |= get_bits_long(&s->gb_extra_bits, s->extra_bits);
25
*crc = *crc * 9 + (S & 0xffff) * 3 + ((unsigned)S >> 16);
26
}
27
}
28
29
continue;
30
}
31
bytestream2_get_buffer(&gb, val, 4);
32
- if (val[0]) {
33
+ if (val[0] > 32) {
34
+ av_log(avctx, AV_LOG_ERROR,
35
+ "Invalid INT32INFO, extra_bits = %d (> 32)\n", val[0]);
36
+ continue;
37
+ } else if (val[0]) {
38
s->extra_bits = val[0];
39
} else if (val[1]) {
40
s->shift = val[1];
41
ffmpeg-2.7.1.tar.bz2/libavcodec/webp.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/webp.c
Changed
10
1
2
}
3
4
av_dict_free(&s->exif_metadata);
5
- while (bytestream2_get_bytes_left(&gb) > 0) {
6
+ while (bytestream2_get_bytes_left(&gb) > 8) {
7
char chunk_str[5] = { 0 };
8
9
chunk_type = bytestream2_get_le32(&gb);
10
ffmpeg-2.7.1.tar.bz2/libavcodec/wmalosslessdec.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/wmalosslessdec.c
Changed
18
1
2
if ((1 << cbits) < s->cdlms[c][i].scaling + 1)
3
cbits++;
4
5
- s->cdlms[c][i].bitsend = get_bits(&s->gb, cbits) + 2;
6
+ s->cdlms[c][i].bitsend = (cbits ? get_bits(&s->gb, cbits) : 0) + 2;
7
shift_l = 32 - s->cdlms[c][i].bitsend;
8
shift_r = 32 - s->cdlms[c][i].scaling - 2;
9
for (j = 0; j < s->cdlms[c][i].coefsend; j++)
10
11
if ((ret = ff_get_buffer(s->avctx, s->frame, 0)) < 0) {
12
/* return an error if no frame could be decoded at all */
13
s->packet_loss = 1;
14
+ s->frame->nb_samples = 0;
15
return ret;
16
}
17
for (i = 0; i < s->num_channels; i++) {
18
ffmpeg-2.7.1.tar.bz2/libavcodec/wmavoice.c -> ffmpeg-2.7.2.tar.bz2/libavcodec/wmavoice.c
Changed
33
1
2
*got_frame_ptr) {
3
cnt += s->spillover_nbits;
4
s->skip_bits_next = cnt & 7;
5
- return cnt >> 3;
6
+ res = cnt >> 3;
7
+ if (res > avpkt->size) {
8
+ av_log(ctx, AV_LOG_ERROR,
9
+ "Trying to skip %d bytes in packet of size %d\n",
10
+ res, avpkt->size);
11
+ return AVERROR_INVALIDDATA;
12
+ }
13
+ return res;
14
} else
15
skip_bits_long (gb, s->spillover_nbits - cnt +
16
get_bits_count(gb)); // resync
17
18
} else if (*got_frame_ptr) {
19
int cnt = get_bits_count(gb);
20
s->skip_bits_next = cnt & 7;
21
- return cnt >> 3;
22
+ res = cnt >> 3;
23
+ if (res > avpkt->size) {
24
+ av_log(ctx, AV_LOG_ERROR,
25
+ "Trying to skip %d bytes in packet of size %d\n",
26
+ res, avpkt->size);
27
+ return AVERROR_INVALIDDATA;
28
+ }
29
+ return res;
30
} else if ((s->sframe_cache_size = pos) > 0) {
31
/* rewind bit reader to start of last (incomplete) superframe... */
32
init_get_bits(gb, avpkt->data, size << 3);
33
ffmpeg-2.7.1.tar.bz2/libavfilter/af_aresample.c -> ffmpeg-2.7.2.tar.bz2/libavfilter/af_aresample.c
Changed
32
1
2
AVFilterLink *inlink = ctx->inputs[0];
3
AVFilterLink *outlink = ctx->outputs[0];
4
5
- AVFilterFormats *in_formats = ff_all_formats(AVMEDIA_TYPE_AUDIO);
6
- AVFilterFormats *out_formats;
7
- AVFilterFormats *in_samplerates = ff_all_samplerates();
8
- AVFilterFormats *out_samplerates;
9
- AVFilterChannelLayouts *in_layouts = ff_all_channel_counts();
10
- AVFilterChannelLayouts *out_layouts;
11
+ AVFilterFormats *in_formats, *out_formats;
12
+ AVFilterFormats *in_samplerates, *out_samplerates;
13
+ AVFilterChannelLayouts *in_layouts, *out_layouts;
14
15
+
16
+ in_formats = ff_all_formats(AVMEDIA_TYPE_AUDIO);
17
+ if (!in_formats)
18
+ return AVERROR(ENOMEM);
19
ff_formats_ref (in_formats, &inlink->out_formats);
20
+
21
+ in_samplerates = ff_all_samplerates();
22
+ if (!in_samplerates)
23
+ return AVERROR(ENOMEM);
24
ff_formats_ref (in_samplerates, &inlink->out_samplerates);
25
+
26
+ in_layouts = ff_all_channel_counts();
27
+ if (!in_layouts)
28
+ return AVERROR(ENOMEM);
29
ff_channel_layouts_ref(in_layouts, &inlink->out_channel_layouts);
30
31
if(out_rate > 0) {
32
ffmpeg-2.7.1.tar.bz2/libavfilter/vf_transpose.c -> ffmpeg-2.7.2.tar.bz2/libavfilter/vf_transpose.c
Changed
10
1
2
int hsub = plane == 1 || plane == 2 ? trans->hsub : 0;
3
int vsub = plane == 1 || plane == 2 ? trans->vsub : 0;
4
int pixstep = trans->pixsteps[plane];
5
- int inh = in->height >> vsub;
6
+ int inh = FF_CEIL_RSHIFT(in->height, vsub);
7
int outw = FF_CEIL_RSHIFT(out->width, hsub);
8
int outh = FF_CEIL_RSHIFT(out->height, vsub);
9
int start = (outh * jobnr ) / nb_jobs;
10
ffmpeg-2.7.1.tar.bz2/libavformat/mov.c -> ffmpeg-2.7.2.tar.bz2/libavformat/mov.c
Changed
11
1
2
AVStream *st = s->streams[i];
3
MOVStreamContext *sc = st->priv_data;
4
5
+ if (!sc)
6
+ continue;
7
+
8
av_freep(&sc->ctts_data);
9
for (j = 0; j < sc->drefs_count; j++) {
10
av_freep(&sc->drefs[j].path);
11
ffmpeg-2.7.1.tar.bz2/libavformat/nutdec.c -> ffmpeg-2.7.2.tar.bz2/libavformat/nutdec.c
Changed
11
1
2
AV_WL32(dst+4, skip_end);
3
}
4
5
+ if (avio_tell(bc) >= maxpos)
6
+ return AVERROR_INVALIDDATA;
7
+
8
return 0;
9
}
10
11
ffmpeg-2.7.1.tar.bz2/libavformat/oggparsedirac.c -> ffmpeg-2.7.2.tar.bz2/libavformat/oggparsedirac.c
Changed
24
1
2
AVStream *st = s->streams[idx];
3
dirac_source_params source;
4
GetBitContext gb;
5
+ int ret;
6
7
// already parsed the header
8
if (st->codec->codec_id == AV_CODEC_ID_DIRAC)
9
return 0;
10
11
- init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8);
12
- if (avpriv_dirac_parse_sequence_header(st->codec, &gb, &source) < 0)
13
- return -1;
14
+ ret = init_get_bits8(&gb, os->buf + os->pstart + 13, (os->psize - 13));
15
+ if (ret < 0)
16
+ return ret;
17
+
18
+ ret = avpriv_dirac_parse_sequence_header(st->codec, &gb, &source);
19
+ if (ret < 0)
20
+ return ret;
21
22
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
23
st->codec->codec_id = AV_CODEC_ID_DIRAC;
24
ffmpeg-2.7.1.tar.bz2/libavformat/swfdec.c -> ffmpeg-2.7.2.tar.bz2/libavformat/swfdec.c
Changed
14
1
2
}
3
if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) {
4
av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n");
5
- res = AVERROR_PATCHWELCOME;
6
- goto bitmap_end;
7
- }
8
- st->codec->pix_fmt = pix_fmt;
9
+ }else
10
+ st->codec->pix_fmt = pix_fmt;
11
12
if (linesize * height > pkt->size) {
13
res = AVERROR_INVALIDDATA;
14
ffmpeg-2.7.1.tar.bz2/libavutil/fifo.c -> ffmpeg-2.7.2.tar.bz2/libavutil/fifo.c
Changed
11
1
2
do {
3
int len = FFMIN(f->end - wptr, size);
4
if (func) {
5
- if (func(src, wptr, len) <= 0)
6
+ len = func(src, wptr, len);
7
+ if (len <= 0)
8
break;
9
} else {
10
memcpy(wptr, src, len);
11
ffmpeg-2.7.1.tar.bz2/libavutil/internal.h -> ffmpeg-2.7.2.tar.bz2/libavutil/internal.h
Changed
12
1
2
#if HAVE_LIBC_MSVCRT
3
#include <crtversion.h>
4
#if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14
5
-#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")
6
-#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")
7
+#pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_strtod")
8
+#pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf")
9
#endif
10
11
#define avpriv_open ff_open
12
ffmpeg-2.7.1.tar.bz2/library.mak -> ffmpeg-2.7.2.tar.bz2/library.mak
Changed
9
1
2
LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
3
$(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
4
$(TESTOBJS) $(TESTOBJS:.o=.i): CPPFLAGS += -DTEST
5
+$(TESTOBJS) $(TESTOBJS:.o=.i): CFLAGS += -Umain
6
7
$(SUBDIR)$(LIBNAME): $(OBJS)
8
$(RM) $@
9
ffmpeg-2.7.1.tar.bz2/libswresample/options.c -> ffmpeg-2.7.2.tar.bz2/libswresample/options.c
Changed
12
1
2
{"in_sample_fmt" , "set input sample format" , OFFSET( in_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
3
{"osf" , "set output sample format" , OFFSET(out_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
4
{"out_sample_fmt" , "set output sample format" , OFFSET(out_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
5
-{"tsf" , "set internal sample format" , OFFSET(int_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
6
-{"internal_sample_fmt" , "set internal sample format" , OFFSET(int_sample_fmt ), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
7
+{"tsf" , "set internal sample format" , OFFSET(user_int_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
8
+{"internal_sample_fmt" , "set internal sample format" , OFFSET(user_int_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT , {.i64=AV_SAMPLE_FMT_NONE}, -1 , INT_MAX, PARAM},
9
{"icl" , "set input channel layout" , OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0 }, 0 , INT64_MAX , PARAM, "channel_layout"},
10
{"in_channel_layout" , "set input channel layout" , OFFSET(user_in_ch_layout ), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0 }, 0 , INT64_MAX , PARAM, "channel_layout"},
11
{"ocl" , "set output channel layout" , OFFSET(user_out_ch_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=0 }, 0 , INT64_MAX , PARAM, "channel_layout"},
12
ffmpeg-2.7.1.tar.bz2/libswresample/soxr_resample.c -> ffmpeg-2.7.2.tar.bz2/libswresample/soxr_resample.c
Changed
58
1
2
}
3
4
static int flush(struct SwrContext *s){
5
+ s->delayed_samples_fixup = soxr_delay((soxr_t)s->resample);
6
+
7
soxr_process((soxr_t)s->resample, NULL, 0, NULL, NULL, 0, NULL);
8
+
9
+ {
10
+ float f;
11
+ size_t idone, odone;
12
+ soxr_process((soxr_t)s->resample, &f, 0, &idone, &f, 0, &odone);
13
+ s->delayed_samples_fixup -= soxr_delay((soxr_t)s->resample);
14
+ }
15
+
16
return 0;
17
}
18
19
20
}
21
22
static int64_t get_delay(struct SwrContext *s, int64_t base){
23
- double delay_s = soxr_delay((soxr_t)s->resample) / s->out_sample_rate;
24
+ double delayed_samples = soxr_delay((soxr_t)s->resample);
25
+ double delay_s;
26
+
27
+ if (s->flushed)
28
+ delayed_samples += s->delayed_samples_fixup;
29
+
30
+ delay_s = delayed_samples / s->out_sample_rate;
31
+
32
return (int64_t)(delay_s * base + .5);
33
}
34
35
static int invert_initial_buffer(struct ResampleContext *c, AudioData *dst, const AudioData *src,
36
- int in_count, int *out_idx, int *out_sz)
37
-{
38
+ int in_count, int *out_idx, int *out_sz){
39
return 0;
40
}
41
42
+static int64_t get_out_samples(struct SwrContext *s, int in_samples){
43
+ double out_samples = (double)s->out_sample_rate / s->in_sample_rate * in_samples;
44
+ double delayed_samples = soxr_delay((soxr_t)s->resample);
45
+
46
+ if (s->flushed)
47
+ delayed_samples += s->delayed_samples_fixup;
48
+
49
+ return (int64_t)(out_samples + delayed_samples + 1 + .5);
50
+}
51
+
52
struct Resampler const swri_soxr_resampler={
53
create, destroy, process, flush, NULL /* set_compensation */, get_delay,
54
- invert_initial_buffer,
55
+ invert_initial_buffer, get_out_samples
56
};
57
58
ffmpeg-2.7.1.tar.bz2/libswresample/swresample.c -> ffmpeg-2.7.2.tar.bz2/libswresample/swresample.c
Changed
10
1
2
s-> in_ch_layout = s-> user_in_ch_layout;
3
s->out_ch_layout = s->user_out_ch_layout;
4
5
+ s->int_sample_fmt= s->user_int_sample_fmt;
6
+
7
if(av_get_channel_layout_nb_channels(s-> in_ch_layout) > SWR_CH_MAX) {
8
av_log(s, AV_LOG_WARNING, "Input channel layout 0x%"PRIx64" is invalid or unsupported.\n", s-> in_ch_layout);
9
s->in_ch_layout = 0;
10
ffmpeg-2.7.1.tar.bz2/libswresample/swresample_internal.h -> ffmpeg-2.7.2.tar.bz2/libswresample/swresample_internal.h
Changed
17
1
2
int user_used_ch_count; ///< User set used channel count
3
int64_t user_in_ch_layout; ///< User set input channel layout
4
int64_t user_out_ch_layout; ///< User set output channel layout
5
+ enum AVSampleFormat user_int_sample_fmt; ///< User set internal sample format
6
7
struct DitherContext dither;
8
9
10
int64_t outpts; ///< output PTS
11
int64_t firstpts; ///< first PTS
12
int drop_output; ///< number of output samples to drop
13
+ double delayed_samples_fixup; ///< soxr 0.1.1: needed to fixup delayed_samples after flush has been called.
14
15
struct AudioConvert *in_convert; ///< input conversion context
16
struct AudioConvert *out_convert; ///< output conversion context
17
ffmpeg-2.7.1.tar.bz2/libswscale/rgb2rgb.c -> ffmpeg-2.7.2.tar.bz2/libswscale/rgb2rgb.c
Changed
17
1
2
void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size);
3
void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size);
4
5
+void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size);
6
void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
7
8
void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc,
9
10
} \
11
}
12
13
-DEFINE_SHUFFLE_BYTES(0, 3, 2, 1)
14
DEFINE_SHUFFLE_BYTES(1, 2, 3, 0)
15
DEFINE_SHUFFLE_BYTES(3, 0, 1, 2)
16
DEFINE_SHUFFLE_BYTES(3, 2, 1, 0)
17
ffmpeg-2.7.1.tar.bz2/libswscale/rgb2rgb.h -> ffmpeg-2.7.2.tar.bz2/libswscale/rgb2rgb.h
Changed
17
1
2
extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size);
3
extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size);
4
5
+extern void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size);
6
extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size);
7
8
void rgb64tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size);
9
10
void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size);
11
void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size);
12
13
-void shuffle_bytes_0321(const uint8_t *src, uint8_t *dst, int src_size);
14
void shuffle_bytes_1230(const uint8_t *src, uint8_t *dst, int src_size);
15
void shuffle_bytes_3012(const uint8_t *src, uint8_t *dst, int src_size);
16
void shuffle_bytes_3210(const uint8_t *src, uint8_t *dst, int src_size);
17
ffmpeg-2.7.1.tar.bz2/libswscale/rgb2rgb_template.c -> ffmpeg-2.7.2.tar.bz2/libswscale/rgb2rgb_template.c
Changed
43
1
2
uint8_t *d = dst - idx;
3
4
for (; idx < 15; idx += 4) {
5
- register int v = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
6
+ register unsigned v = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
7
v &= 0xff00ff;
8
*(uint32_t *)&d[idx] = (v >> 16) + g + (v << 16);
9
}
10
}
11
12
+static inline void shuffle_bytes_0321_c(const uint8_t *src, uint8_t *dst,
13
+ int src_size)
14
+{
15
+ int idx = 15 - src_size;
16
+ const uint8_t *s = src - idx;
17
+ uint8_t *d = dst - idx;
18
+
19
+ for (; idx < 15; idx += 4) {
20
+ register unsigned v = *(const uint32_t *)&s[idx], g = v & 0x00ff00ff;
21
+ v &= 0xff00ff00;
22
+ *(uint32_t *)&d[idx] = (v >> 16) + g + (v << 16);
23
+ }
24
+}
25
+
26
static inline void rgb24tobgr24_c(const uint8_t *src, uint8_t *dst, int src_size)
27
{
28
unsigned i;
29
30
rgb24to15 = rgb24to15_c;
31
rgb24to16 = rgb24to16_c;
32
rgb24tobgr24 = rgb24tobgr24_c;
33
+#if HAVE_BIGENDIAN
34
+ shuffle_bytes_0321 = shuffle_bytes_2103_c;
35
+ shuffle_bytes_2103 = shuffle_bytes_0321_c;
36
+#else
37
+ shuffle_bytes_0321 = shuffle_bytes_0321_c;
38
shuffle_bytes_2103 = shuffle_bytes_2103_c;
39
+#endif
40
rgb32tobgr16 = rgb32tobgr16_c;
41
rgb32tobgr15 = rgb32tobgr15_c;
42
yv12toyuy2 = yv12toyuy2_c;
43
ffmpeg-2.7.1.tar.bz2/libswscale/swscale_unscaled.c -> ffmpeg-2.7.2.tar.bz2/libswscale/swscale_unscaled.c
Changed
13
1
2
if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
3
return NULL;
4
5
+ // Maintain symmetry between endianness
6
+ if (c->flags & SWS_BITEXACT)
7
+ if ((dstFormat == AV_PIX_FMT_RGB32 || dstFormat == AV_PIX_FMT_BGR32 ) && !isRGBA32(srcFormat) && ALT32_CORR>0)
8
+ return NULL;
9
+
10
return conv;
11
}
12
13
ffmpeg-2.7.1.tar.bz2/libswscale/utils.c -> ffmpeg-2.7.2.tar.bz2/libswscale/utils.c
Changed
14
1
2
3
/* Allocate pixbufs (we use dynamic allocation because otherwise we would
4
* need to allocate several megabytes to handle all possible cases) */
5
- FF_ALLOC_OR_GOTO(c, c->lumPixBuf, c->vLumBufSize * 3 * sizeof(int16_t *), fail);
6
- FF_ALLOC_OR_GOTO(c, c->chrUPixBuf, c->vChrBufSize * 3 * sizeof(int16_t *), fail);
7
- FF_ALLOC_OR_GOTO(c, c->chrVPixBuf, c->vChrBufSize * 3 * sizeof(int16_t *), fail);
8
+ FF_ALLOCZ_OR_GOTO(c, c->lumPixBuf, c->vLumBufSize * 3 * sizeof(int16_t *), fail);
9
+ FF_ALLOCZ_OR_GOTO(c, c->chrUPixBuf, c->vChrBufSize * 3 * sizeof(int16_t *), fail);
10
+ FF_ALLOCZ_OR_GOTO(c, c->chrVPixBuf, c->vChrBufSize * 3 * sizeof(int16_t *), fail);
11
if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat))
12
FF_ALLOCZ_OR_GOTO(c, c->alpPixBuf, c->vLumBufSize * 3 * sizeof(int16_t *), fail);
13
/* Note we need at least one pixel more at the end because of the MMX code
14
ffmpeg-2.7.1.tar.bz2/libswscale/x86/rgb2rgb_template.c -> ffmpeg-2.7.2.tar.bz2/libswscale/x86/rgb2rgb_template.c
Changed
39
1
2
: "r" (s), "r" (d), "m" (mask32b), "m" (mask32r), "m" (mmx_one)
3
: "memory");
4
for (; idx<15; idx+=4) {
5
- register int v = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
6
+ register unsigned v = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
7
v &= 0xff00ff;
8
*(uint32_t *)&d[idx] = (v>>16) + g + (v<<16);
9
}
10
11
"cmp %3, %%"REG_a" \n\t"
12
" jb 1b \n\t"
13
::"r"(dest), "r"(src1), "r"(src2), "r" ((x86_reg)width-15)
14
- : "memory", "%"REG_a""
15
+ : "memory", XMM_CLOBBERS("xmm0", "xmm1", "xmm2",) "%"REG_a
16
);
17
#else
18
__asm__(
19
20
src2 += src2Stride;
21
}
22
__asm__(
23
+#if !COMPILE_TEMPLATE_SSE2
24
EMMS" \n\t"
25
+#endif
26
SFENCE" \n\t"
27
::: "memory"
28
);
29
30
dst2 += dst2Stride;
31
}
32
__asm__(
33
+#if !COMPILE_TEMPLATE_SSE2
34
EMMS" \n\t"
35
+#endif
36
SFENCE" \n\t"
37
::: "memory"
38
);
39
Refresh
No build results available
Refresh
No rpmlint results available
Login required, please
login
or
signup
in order to comment
Request History
enzokiel created request almost 10 years ago
- update internal ffmpeg to version 2.7.2
enzokiel accepted request almost 10 years ago
Please add a comment