Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
959ab06c68 | ||
![]() |
46db3121c6 | ||
![]() |
c96c755320 | ||
![]() |
9f8cdd520b | ||
![]() |
f5631d23e0 | ||
![]() |
50f4543c6b | ||
![]() |
1344e91f33 | ||
![]() |
f13e6ec7a6 | ||
![]() |
bf2c9e1ad4 | ||
![]() |
0663aab1d9 | ||
![]() |
e911f125fc | ||
![]() |
5aead5ee05 | ||
![]() |
3a5b749d7c | ||
![]() |
4b4d0b0290 | ||
![]() |
c9b25252cb | ||
![]() |
4400385d5f | ||
![]() |
d85e25fe0b | ||
![]() |
3d1972d182 | ||
![]() |
71b1abe638 | ||
![]() |
991ef3a67e | ||
![]() |
b850b01533 | ||
![]() |
23a17b4a3d | ||
![]() |
3a8ad4b878 | ||
![]() |
b85a939633 | ||
![]() |
7e130ca5b4 | ||
![]() |
f295f9488a | ||
![]() |
2c01dd2ea5 | ||
![]() |
5e26152ee4 | ||
![]() |
135c733125 | ||
![]() |
3b3a3c3d44 | ||
![]() |
13244abcd3 | ||
![]() |
9783d5bfda | ||
![]() |
0e4efad93c | ||
![]() |
0103bc67fd | ||
![]() |
d5af3fb1c5 | ||
![]() |
6ec5a199ea | ||
![]() |
f7b5366657 | ||
![]() |
542332e523 | ||
![]() |
aa24dd487f | ||
![]() |
3bcd1daad7 | ||
![]() |
91f88eab32 | ||
![]() |
aac467ae17 | ||
![]() |
968e733b2e | ||
![]() |
192d46e6d1 | ||
![]() |
bb8614cb7b | ||
![]() |
d9bdf7d9ae | ||
![]() |
a588e1e560 | ||
![]() |
36e7385d0e | ||
![]() |
5108323aa9 |
38
Changelog
38
Changelog
@@ -1,7 +1,41 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>:
|
||||
version 2.5.2:
|
||||
- avcodec/indeo3: ensure offsets are non negative
|
||||
- avcodec/h264: Check *log2_weight_denom
|
||||
- avcodec/hevc_ps: Check diff_cu_qp_delta_depth
|
||||
- avcodec/h264: Clear delayed_pic on deallocation
|
||||
- avcodec/hevc: clear filter_slice_edges() on allocation
|
||||
- avcodec/dcadec: Check that the added xch channel isnt already there
|
||||
- avcodec/indeo3: use signed variables to avoid underflow
|
||||
- swscale: increase yuv2rgb table headroom
|
||||
- avformat/mov: fix integer overflow of size
|
||||
- avformat/mov: check atom nesting depth
|
||||
- avcodec/utvideodec: Fix handling of slice_height=0
|
||||
- avcodec/xface: correct the XFACE_MAX_* values
|
||||
- avcodec/vmdvideo: Check len before using it in method 3
|
||||
- configure: create the tests directory like the doc directory
|
||||
- mmvideo: check frame dimensions
|
||||
- jvdec: check frame dimensions
|
||||
|
||||
version 2.5.1:
|
||||
- lavu/frame: fix malloc error path in av_frame_copy_props()
|
||||
- avformat/aviobuf: Check that avio_seek() target is non negative
|
||||
- swresample/soxr_resample: fix error handling
|
||||
- avformat/flvdec: fix potential use of uninitialized variables
|
||||
- avformat/crypto: fix key vs iv typo
|
||||
- configure: use use_pkg_config() instead of check_pkg_config() for libsmbclient
|
||||
- avcodec/ppc/vp3dsp_altivec: POWER LE support to vp3_idct_add_altivec()
|
||||
- avformat/matroskadec: fix handling of recursive SeekHead elements
|
||||
- doc/examples/filtering_video: fix frame rate
|
||||
- avcodec/mpegaudiodec_template: only allocate fdsp when its used
|
||||
- doc/examples/transcoding: check encoder before using it
|
||||
- update MAINTAINERS file
|
||||
- POWER LE support in put_vp8_epel_h_altivec_core() put_vp8_epel_v_altivec_core() put_vp8_pixels16_altivec()
|
||||
- POWER LE support in vc1_inv_trans_8x4_altivec()
|
||||
|
||||
version 2.5:
|
||||
- HEVC/H.265 RTP payload format (draft v6) packetizer
|
||||
- SUP/PGS subtitle demuxer
|
||||
- ffprobe -show_pixel_formats option
|
||||
@@ -16,7 +50,7 @@ version <next>:
|
||||
- creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
|
||||
- WebP muxer with animated WebP support
|
||||
- zygoaudio decoding support
|
||||
- APNG demuxer
|
||||
- APNG decoder and demuxer
|
||||
- postproc visualization support
|
||||
|
||||
|
||||
|
@@ -537,6 +537,7 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
2.5 Michael Niedermayer
|
||||
2.4 Michael Niedermayer
|
||||
2.2 Michael Niedermayer
|
||||
1.2 Michael Niedermayer
|
||||
|
2
Makefile
2
Makefile
@@ -112,7 +112,7 @@ endef
|
||||
|
||||
$(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=))))
|
||||
|
||||
ffprobe.o cmdutils.o : libavutil/ffversion.h
|
||||
ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
|
||||
|
||||
$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
||||
$(CP) $< $@
|
||||
|
@@ -2,9 +2,13 @@
|
||||
│ RELEASE NOTES for FFmpeg 2.5 "Bohr" │
|
||||
└────────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 2.5 "Bohr", just 2.5 months
|
||||
after the release of 2.4. Since this wasn't a long time ago, the Changelog
|
||||
is a bit short this time.
|
||||
The FFmpeg Project proudly presents FFmpeg 2.5 "Bohr", 2.5 months after the
|
||||
release of 2.4.
|
||||
|
||||
The most important new features are AVFoundation screen-grabbing support,
|
||||
animated WebP decoding support, and Animated PNG support. In addition, many
|
||||
exciting features for video streaming are also implemented, including MPEG-
|
||||
DASH fragmenting muxer, HEVC RTP payload muxer, and UDP Lite support.
|
||||
|
||||
As usual, if you have any question on this release or any FFmpeg related
|
||||
topic, feel free to join us on the #ffmpeg IRC channel (on
|
||||
@@ -56,6 +60,7 @@
|
||||
• libutvideo YUV 4:2:2 10bit support
|
||||
• animated WebP decoding support
|
||||
• zygoaudio decoding support
|
||||
• APNG decoder
|
||||
|
||||
┌────────────────────────────┐
|
||||
│ libavdevice │
|
||||
@@ -72,7 +77,8 @@
|
||||
• SUP/PGS subtitle demuxer
|
||||
• STL subtitle demuxer
|
||||
• UDP-Lite support (RFC 3828)
|
||||
• creating DASH compatible fragmented MP4, MPEG-DASH segmenting muxer
|
||||
• MPEG-DASH segmenting muxer, which allows creating DASH compatible
|
||||
fragmented MP4
|
||||
• WebP muxer
|
||||
• APNG demuxer
|
||||
|
||||
@@ -93,7 +99,3 @@
|
||||
└────────────────────────────┘
|
||||
|
||||
• visualization support
|
||||
|
||||
┌────────────────────────────┐
|
||||
│ ⚠ Behaviour changes │
|
||||
└────────────────────────────┘
|
||||
|
3
configure
vendored
3
configure
vendored
@@ -4883,7 +4883,7 @@ enabled libquvi && require_pkg_config libquvi quvi/quvi.h quvi_init
|
||||
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
|
||||
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
|
||||
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer
|
||||
enabled libsmbclient && { check_pkg_config smbclient libsmbclient.h smbc_init ||
|
||||
enabled libsmbclient && { use_pkg_config smbclient libsmbclient.h smbc_init ||
|
||||
require smbclient libsmbclient.h smbc_init -lsmbclient; }
|
||||
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
|
||||
enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init
|
||||
@@ -5706,6 +5706,7 @@ enabled getenv || echo "#define getenv(x) NULL" >> $TMPH
|
||||
|
||||
|
||||
mkdir -p doc
|
||||
mkdir -p tests
|
||||
echo "@c auto-generated by configure" > doc/config.texi
|
||||
|
||||
print_config ARCH_ "$config_files" $ARCH_LIST
|
||||
|
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 2.5.2
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
@@ -90,6 +90,7 @@ static int init_filters(const char *filters_descr)
|
||||
AVFilter *buffersink = avfilter_get_by_name("buffersink");
|
||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
||||
AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base;
|
||||
enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
|
||||
|
||||
filter_graph = avfilter_graph_alloc();
|
||||
@@ -102,7 +103,7 @@ static int init_filters(const char *filters_descr)
|
||||
snprintf(args, sizeof(args),
|
||||
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
|
||||
dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
|
||||
dec_ctx->time_base.num, dec_ctx->time_base.den,
|
||||
time_base.num, time_base.den,
|
||||
dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);
|
||||
|
||||
ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in",
|
||||
|
@@ -116,6 +116,10 @@ static int open_output_file(const char *filename)
|
||||
|| dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
/* in this example, we choose transcoding to same codec */
|
||||
encoder = avcodec_find_encoder(dec_ctx->codec_id);
|
||||
if (!encoder) {
|
||||
av_log(NULL, AV_LOG_FATAL, "Neccessary encoder not found\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* In this example, we transcode to same properties (picture size,
|
||||
* sample rate etc.). These properties can be changed for output
|
||||
|
@@ -2780,7 +2780,7 @@ static void spectral_to_sample(AACContext *ac)
|
||||
apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, apply_independent_coupling);
|
||||
che->present = 0;
|
||||
} else if (che) {
|
||||
av_log(ac->avctx, AV_LOG_WARNING, "ChannelElement %d.%d missing \n", type, i);
|
||||
av_log(ac->avctx, AV_LOG_VERBOSE, "ChannelElement %d.%d missing \n", type, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2360,6 +2360,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#else
|
||||
if (s->xch_present && !s->xch_disable) {
|
||||
#endif
|
||||
if (avctx->channel_layout & AV_CH_BACK_CENTER) {
|
||||
avpriv_request_sample(avctx, "XCh with Back center channel");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
avctx->channel_layout |= AV_CH_BACK_CENTER;
|
||||
if (s->lfe) {
|
||||
avctx->channel_layout |= AV_CH_LOW_FREQUENCY;
|
||||
|
@@ -391,6 +391,7 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
|
||||
if (free_rbsp && h->DPB) {
|
||||
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
|
||||
ff_h264_unref_picture(h, &h->DPB[i]);
|
||||
memset(h->delayed_pic, 0, sizeof(h->delayed_pic));
|
||||
av_freep(&h->DPB);
|
||||
} else if (h->DPB) {
|
||||
for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
|
||||
@@ -990,6 +991,16 @@ int ff_pred_weight_table(H264Context *h)
|
||||
h->luma_log2_weight_denom = get_ue_golomb(&h->gb);
|
||||
if (h->sps.chroma_format_idc)
|
||||
h->chroma_log2_weight_denom = get_ue_golomb(&h->gb);
|
||||
|
||||
if (h->luma_log2_weight_denom > 7U) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is out of range\n", h->luma_log2_weight_denom);
|
||||
h->luma_log2_weight_denom = 0;
|
||||
}
|
||||
if (h->chroma_log2_weight_denom > 7U) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "chroma_log2_weight_denom %d is out of range\n", h->chroma_log2_weight_denom);
|
||||
h->chroma_log2_weight_denom = 0;
|
||||
}
|
||||
|
||||
luma_def = 1 << h->luma_log2_weight_denom;
|
||||
chroma_def = 1 << h->chroma_log2_weight_denom;
|
||||
|
||||
|
@@ -338,6 +338,7 @@ typedef struct H264Picture {
|
||||
* H264Context
|
||||
*/
|
||||
typedef struct H264Context {
|
||||
AVClass *av_class;
|
||||
AVCodecContext *avctx;
|
||||
MECmpContext mecc;
|
||||
VideoDSPContext vdsp;
|
||||
|
@@ -108,7 +108,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
|
||||
if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)
|
||||
goto fail;
|
||||
|
||||
s->filter_slice_edges = av_malloc(ctb_count);
|
||||
s->filter_slice_edges = av_mallocz(ctb_count);
|
||||
s->tab_slice_address = av_malloc_array(pic_size_in_ctb,
|
||||
sizeof(*s->tab_slice_address));
|
||||
s->qp_y_tab = av_malloc_array(pic_size_in_ctb,
|
||||
|
@@ -1255,6 +1255,14 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
|
||||
if (pps->cu_qp_delta_enabled_flag)
|
||||
pps->diff_cu_qp_delta_depth = get_ue_golomb_long(gb);
|
||||
|
||||
if (pps->diff_cu_qp_delta_depth < 0 ||
|
||||
pps->diff_cu_qp_delta_depth > sps->log2_diff_max_min_coding_block_size) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "diff_cu_qp_delta_depth %d is invalid\n",
|
||||
pps->diff_cu_qp_delta_depth);
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto err;
|
||||
}
|
||||
|
||||
pps->cb_qp_offset = get_se_golomb(gb);
|
||||
if (pps->cb_qp_offset < -12 || pps->cb_qp_offset > 12) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "pps_cb_qp_offset out of range: %d\n",
|
||||
|
@@ -94,7 +94,7 @@ typedef struct Indeo3DecodeContext {
|
||||
|
||||
int16_t width, height;
|
||||
uint32_t frame_num; ///< current frame number (zero-based)
|
||||
uint32_t data_size; ///< size of the frame data in bytes
|
||||
int data_size; ///< size of the frame data in bytes
|
||||
uint16_t frame_flags; ///< frame properties
|
||||
uint8_t cb_offset; ///< needed for selecting VQ tables
|
||||
uint8_t buf_sel; ///< active frame buffer: 0 - primary, 1 -secondary
|
||||
@@ -899,7 +899,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
||||
GetByteContext gb;
|
||||
const uint8_t *bs_hdr;
|
||||
uint32_t frame_num, word2, check_sum, data_size;
|
||||
uint32_t y_offset, u_offset, v_offset, starts[3], ends[3];
|
||||
int y_offset, u_offset, v_offset;
|
||||
uint32_t starts[3], ends[3];
|
||||
uint16_t height, width;
|
||||
int i, j;
|
||||
|
||||
@@ -981,7 +982,8 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
||||
ctx->y_data_size = ends[0] - starts[0];
|
||||
ctx->v_data_size = ends[1] - starts[1];
|
||||
ctx->u_data_size = ends[2] - starts[2];
|
||||
if (FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
|
||||
if (FFMIN3(y_offset, v_offset, u_offset) < 0 ||
|
||||
FFMAX3(y_offset, v_offset, u_offset) >= ctx->data_size - 16 ||
|
||||
FFMIN3(y_offset, v_offset, u_offset) < gb.buffer - bs_hdr + 16 ||
|
||||
FFMIN3(ctx->y_data_size, ctx->v_data_size, ctx->u_data_size) <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "One of the y/u/v offsets is invalid\n");
|
||||
|
@@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
JvContext *s = avctx->priv_data;
|
||||
|
||||
if (!avctx->width || !avctx->height ||
|
||||
(avctx->width & 7) || (avctx->height & 7)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
|
||||
avctx->width, avctx->height);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
s->frame = av_frame_alloc();
|
||||
if (!s->frame)
|
||||
return AVERROR(ENOMEM);
|
||||
|
@@ -61,6 +61,13 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
|
||||
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
|
||||
if (!avctx->width || !avctx->height ||
|
||||
(avctx->width & 1) || (avctx->height & 1)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
|
||||
avctx->width, avctx->height);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
s->frame = av_frame_alloc();
|
||||
if (!s->frame)
|
||||
return AVERROR(ENOMEM);
|
||||
|
@@ -428,9 +428,11 @@ static av_cold int decode_init(AVCodecContext * avctx)
|
||||
|
||||
s->avctx = avctx;
|
||||
|
||||
#if USE_FLOATS
|
||||
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
|
||||
if (!s->fdsp)
|
||||
return AVERROR(ENOMEM);
|
||||
#endif
|
||||
|
||||
ff_mpadsp_init(&s->mpadsp);
|
||||
|
||||
|
@@ -304,16 +304,23 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, int16_t *block)
|
||||
src2 = vec_pack(s2, sA);
|
||||
src3 = vec_pack(s3, sB);
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
p0 = vec_lvsl (0, dest);
|
||||
p1 = vec_lvsl (stride, dest);
|
||||
p = vec_splat_u8 (-1);
|
||||
perm0 = vec_mergeh (p, p0);
|
||||
perm1 = vec_mergeh (p, p1);
|
||||
#define GET_TMP2(dst, p) \
|
||||
tmp = vec_ld (0, dest); \
|
||||
tmp2 = (vector signed short)vec_perm (tmp, vec_splat_u8(0), p);
|
||||
#else
|
||||
#define GET_TMP2(dst,p) \
|
||||
tmp = vec_vsx_ld (0, dst); \
|
||||
tmp2 = (vector signed short)vec_mergeh (tmp, vec_splat_u8(0));
|
||||
#endif
|
||||
|
||||
#define ADD(dest,src,perm) \
|
||||
/* *(uint64_t *)&tmp = *(uint64_t *)dest; */ \
|
||||
tmp = vec_ld (0, dest); \
|
||||
tmp2 = (vector signed short)vec_perm (tmp, vec_splat_u8(0), perm); \
|
||||
GET_TMP2(dest, perm); \
|
||||
tmp3 = vec_adds (tmp2, src); \
|
||||
tmp = vec_packsu (tmp3, tmp3); \
|
||||
vec_ste ((vector unsigned int)tmp, 0, (unsigned int *)dest); \
|
||||
|
@@ -32,8 +32,13 @@
|
||||
|
||||
static const vec_s16 constants =
|
||||
{0, 64277, 60547, 54491, 46341, 36410, 25080, 12785};
|
||||
#if HAVE_BIGENDIAN
|
||||
static const vec_u8 interleave_high =
|
||||
{0, 1, 16, 17, 4, 5, 20, 21, 8, 9, 24, 25, 12, 13, 28, 29};
|
||||
#else
|
||||
static const vec_u8 interleave_high =
|
||||
{2, 3, 18, 19, 6, 7, 22, 23, 10, 11, 26, 27, 14, 15, 30, 31};
|
||||
#endif
|
||||
|
||||
#define IDCT_START \
|
||||
vec_s16 A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H;\
|
||||
@@ -156,9 +161,18 @@ static void vp3_idct_add_altivec(uint8_t *dst, int stride, int16_t block[64])
|
||||
TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);
|
||||
IDCT_1D(ADD8, SHIFT4)
|
||||
|
||||
#define ADD(a)\
|
||||
#if HAVE_BIGENDIAN
|
||||
#define GET_VDST16\
|
||||
vdst = vec_ld(0, dst);\
|
||||
vdst_16 = (vec_s16)vec_perm(vdst, zero_u8v, vdst_mask);\
|
||||
vdst_16 = (vec_s16)vec_perm(vdst, zero_u8v, vdst_mask);
|
||||
#else
|
||||
#define GET_VDST16\
|
||||
vdst = vec_vsx_ld(0,dst);\
|
||||
vdst_16 = (vec_s16)vec_mergeh(vdst, zero_u8v);
|
||||
#endif
|
||||
|
||||
#define ADD(a)\
|
||||
GET_VDST16;\
|
||||
vdst_16 = vec_adds(a, vdst_16);\
|
||||
t = vec_packsu(vdst_16, vdst_16);\
|
||||
vec_ste((vec_u32)t, 0, (unsigned int *)dst);\
|
||||
|
@@ -59,17 +59,30 @@ static const vec_s8 h_subpel_filters_outer[3] =
|
||||
vec_s8 filter_outerh = h_subpel_filters_outer[(i)>>1]; \
|
||||
vec_s8 filter_outerl = vec_sld(filter_outerh, filter_outerh, 2)
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
#define GET_PIXHL(offset) \
|
||||
a = vec_ld((offset)-is6tap-1, src); \
|
||||
b = vec_ld((offset)-is6tap-1+15, src); \
|
||||
pixh = vec_perm(a, b, permh##offset); \
|
||||
pixl = vec_perm(a, b, perml##offset)
|
||||
|
||||
#define GET_OUTER(offset) outer = vec_perm(a, b, perm_6tap##offset)
|
||||
#else
|
||||
#define GET_PIXHL(offset) \
|
||||
a = vec_vsx_ld((offset)-is6tap-1, src); \
|
||||
pixh = vec_perm(a, a, perm_inner); \
|
||||
pixl = vec_perm(a, a, vec_add(perm_inner, vec_splat_u8(4)))
|
||||
|
||||
#define GET_OUTER(offset) outer = vec_perm(a, a, perm_outer)
|
||||
#endif
|
||||
|
||||
#define FILTER_H(dstv, off) \
|
||||
a = vec_ld((off)-is6tap-1, src); \
|
||||
b = vec_ld((off)-is6tap-1+15, src); \
|
||||
\
|
||||
pixh = vec_perm(a, b, permh##off); \
|
||||
pixl = vec_perm(a, b, perml##off); \
|
||||
GET_PIXHL(off); \
|
||||
filth = vec_msum(filter_inner, pixh, c64); \
|
||||
filtl = vec_msum(filter_inner, pixl, c64); \
|
||||
\
|
||||
if (is6tap) { \
|
||||
outer = vec_perm(a, b, perm_6tap##off); \
|
||||
GET_OUTER(off); \
|
||||
filth = vec_msum(filter_outerh, outer, filth); \
|
||||
filtl = vec_msum(filter_outerl, outer, filtl); \
|
||||
} \
|
||||
@@ -84,9 +97,12 @@ void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
int h, int mx, int w, int is6tap)
|
||||
{
|
||||
LOAD_H_SUBPEL_FILTER(mx-1);
|
||||
vec_u8 align_vec0, align_vec8, permh0, permh8, filt;
|
||||
#if HAVE_BIGENDIAN
|
||||
vec_u8 align_vec0, align_vec8, permh0, permh8;
|
||||
vec_u8 perm_6tap0, perm_6tap8, perml0, perml8;
|
||||
vec_u8 a, b, pixh, pixl, outer;
|
||||
vec_u8 b;
|
||||
#endif
|
||||
vec_u8 filt, a, pixh, pixl, outer;
|
||||
vec_s16 f16h, f16l;
|
||||
vec_s32 filth, filtl;
|
||||
|
||||
@@ -97,6 +113,7 @@ void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
vec_s32 c64 = vec_sl(vec_splat_s32(1), vec_splat_u32(6));
|
||||
vec_u16 c7 = vec_splat_u16(7);
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
align_vec0 = vec_lvsl( -is6tap-1, src);
|
||||
align_vec8 = vec_lvsl(8-is6tap-1, src);
|
||||
|
||||
@@ -107,6 +124,7 @@ void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
perml8 = vec_perm(align_vec8, align_vec8, perm_inner);
|
||||
perm_6tap0 = vec_perm(align_vec0, align_vec0, perm_outer);
|
||||
perm_6tap8 = vec_perm(align_vec8, align_vec8, perm_outer);
|
||||
#endif
|
||||
|
||||
while (h --> 0) {
|
||||
FILTER_H(f16h, 0);
|
||||
@@ -164,6 +182,12 @@ static const vec_u8 v_subpel_filters[7] =
|
||||
dstv = vec_adds(dstv, c64); \
|
||||
dstv = vec_sra(dstv, c7)
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
#define LOAD_HL(off, s, perm) load_with_perm_vec(off, s, perm)
|
||||
#else
|
||||
#define LOAD_HL(off, s, perm) vec_mergeh(vec_vsx_ld(off,s), vec_vsx_ld(off+8,s))
|
||||
#endif
|
||||
|
||||
static av_always_inline
|
||||
void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
uint8_t *src, ptrdiff_t src_stride,
|
||||
@@ -175,6 +199,7 @@ void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
vec_s16 c64 = vec_sl(vec_splat_s16(1), vec_splat_u16(6));
|
||||
vec_u16 c7 = vec_splat_u16(7);
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
// we want pixels 0-7 to be in the even positions and 8-15 in the odd,
|
||||
// so combine this permute with the alignment permute vector
|
||||
align_vech = vec_lvsl(0, src);
|
||||
@@ -183,22 +208,23 @@ void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride,
|
||||
perm_vec = vec_mergeh(align_vech, align_vecl);
|
||||
else
|
||||
perm_vec = vec_mergeh(align_vech, align_vech);
|
||||
#endif
|
||||
|
||||
if (is6tap)
|
||||
s0 = load_with_perm_vec(-2*src_stride, src, perm_vec);
|
||||
s1 = load_with_perm_vec(-1*src_stride, src, perm_vec);
|
||||
s2 = load_with_perm_vec( 0*src_stride, src, perm_vec);
|
||||
s3 = load_with_perm_vec( 1*src_stride, src, perm_vec);
|
||||
s0 = LOAD_HL(-2*src_stride, src, perm_vec);
|
||||
s1 = LOAD_HL(-1*src_stride, src, perm_vec);
|
||||
s2 = LOAD_HL( 0*src_stride, src, perm_vec);
|
||||
s3 = LOAD_HL( 1*src_stride, src, perm_vec);
|
||||
if (is6tap)
|
||||
s4 = load_with_perm_vec( 2*src_stride, src, perm_vec);
|
||||
s4 = LOAD_HL( 2*src_stride, src, perm_vec);
|
||||
|
||||
src += (2+is6tap)*src_stride;
|
||||
|
||||
while (h --> 0) {
|
||||
if (is6tap)
|
||||
s5 = load_with_perm_vec(0, src, perm_vec);
|
||||
s5 = LOAD_HL(0, src, perm_vec);
|
||||
else
|
||||
s4 = load_with_perm_vec(0, src, perm_vec);
|
||||
s4 = LOAD_HL(0, src, perm_vec);
|
||||
|
||||
FILTER_V(f16h, vec_mule);
|
||||
|
||||
@@ -272,39 +298,25 @@ EPEL_HV(4, 4,4)
|
||||
|
||||
static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my)
|
||||
{
|
||||
register vector unsigned char pixelsv1, pixelsv2;
|
||||
register vector unsigned char pixelsv1B, pixelsv2B;
|
||||
register vector unsigned char pixelsv1C, pixelsv2C;
|
||||
register vector unsigned char pixelsv1D, pixelsv2D;
|
||||
|
||||
register vector unsigned char perm = vec_lvsl(0, src);
|
||||
register vector unsigned char perm;
|
||||
int i;
|
||||
register ptrdiff_t dstride2 = dstride << 1, sstride2 = sstride << 1;
|
||||
register ptrdiff_t dstride3 = dstride2 + dstride, sstride3 = sstride + sstride2;
|
||||
register ptrdiff_t dstride4 = dstride << 2, sstride4 = sstride << 2;
|
||||
|
||||
#if HAVE_BIGENDIAN
|
||||
perm = vec_lvsl(0, src);
|
||||
#endif
|
||||
// hand-unrolling the loop by 4 gains about 15%
|
||||
// mininum execution time goes from 74 to 60 cycles
|
||||
// it's faster than -funroll-loops, but using
|
||||
// -funroll-loops w/ this is bad - 74 cycles again.
|
||||
// all this is on a 7450, tuning for the 7450
|
||||
for (i = 0; i < h; i += 4) {
|
||||
pixelsv1 = vec_ld( 0, src);
|
||||
pixelsv2 = vec_ld(15, src);
|
||||
pixelsv1B = vec_ld(sstride, src);
|
||||
pixelsv2B = vec_ld(15 + sstride, src);
|
||||
pixelsv1C = vec_ld(sstride2, src);
|
||||
pixelsv2C = vec_ld(15 + sstride2, src);
|
||||
pixelsv1D = vec_ld(sstride3, src);
|
||||
pixelsv2D = vec_ld(15 + sstride3, src);
|
||||
vec_st(vec_perm(pixelsv1, pixelsv2, perm),
|
||||
0, (unsigned char*)dst);
|
||||
vec_st(vec_perm(pixelsv1B, pixelsv2B, perm),
|
||||
dstride, (unsigned char*)dst);
|
||||
vec_st(vec_perm(pixelsv1C, pixelsv2C, perm),
|
||||
dstride2, (unsigned char*)dst);
|
||||
vec_st(vec_perm(pixelsv1D, pixelsv2D, perm),
|
||||
dstride3, (unsigned char*)dst);
|
||||
vec_st(load_with_perm_vec(0, src, perm), 0, dst);
|
||||
vec_st(load_with_perm_vec(sstride, src, perm), dstride, dst);
|
||||
vec_st(load_with_perm_vec(sstride2, src, perm), dstride2, dst);
|
||||
vec_st(load_with_perm_vec(sstride3, src, perm), dstride3, dst);
|
||||
src += sstride4;
|
||||
dst += dstride4;
|
||||
}
|
||||
|
@@ -66,6 +66,9 @@
|
||||
#include "compat/os2threads.h"
|
||||
#endif
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS
|
||||
static int default_lockmgr_cb(void **arg, enum AVLockOp op)
|
||||
{
|
||||
|
@@ -215,6 +215,8 @@ static void restore_median(uint8_t *src, int step, int stride,
|
||||
slice_height = ((((slice + 1) * height) / slices) & cmask) -
|
||||
slice_start;
|
||||
|
||||
if (!slice_height)
|
||||
continue;
|
||||
bsrc = src + slice_start * stride;
|
||||
|
||||
// first line - left neighbour prediction
|
||||
@@ -270,6 +272,8 @@ static void restore_median_il(uint8_t *src, int step, int stride,
|
||||
slice_height = ((((slice + 1) * height) / slices) & cmask) -
|
||||
slice_start;
|
||||
slice_height >>= 1;
|
||||
if (!slice_height)
|
||||
continue;
|
||||
|
||||
bsrc = src + slice_start * stride;
|
||||
|
||||
|
@@ -339,6 +339,9 @@ static int vmd_decode(VmdVideoContext *s, AVFrame *frame)
|
||||
ofs += slen;
|
||||
bytestream2_skip(&gb, len);
|
||||
} else {
|
||||
if (ofs + len > frame_width ||
|
||||
bytestream2_get_bytes_left(&gb) < len)
|
||||
return AVERROR_INVALIDDATA;
|
||||
bytestream2_get_buffer(&gb, &dp[ofs], len);
|
||||
ofs += len;
|
||||
}
|
||||
|
@@ -24,6 +24,8 @@
|
||||
* X-Face common data and utilities definition.
|
||||
*/
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
|
||||
#include "xface.h"
|
||||
|
||||
void ff_big_add(BigInt *b, uint8_t a)
|
||||
@@ -43,6 +45,7 @@ void ff_big_add(BigInt *b, uint8_t a)
|
||||
c >>= XFACE_BITSPERWORD;
|
||||
}
|
||||
if (i == b->nb_words && c) {
|
||||
av_assert0(b->nb_words < XFACE_MAX_WORDS);
|
||||
b->nb_words++;
|
||||
*w = c & XFACE_WORDMASK;
|
||||
}
|
||||
@@ -98,6 +101,7 @@ void ff_big_mul(BigInt *b, uint8_t a)
|
||||
return;
|
||||
if (a == 0) {
|
||||
/* treat this as a == WORDCARRY and just shift everything left a WORD */
|
||||
av_assert0(b->nb_words < XFACE_MAX_WORDS);
|
||||
i = b->nb_words++;
|
||||
w = b->words + i;
|
||||
while (i--) {
|
||||
@@ -116,6 +120,7 @@ void ff_big_mul(BigInt *b, uint8_t a)
|
||||
c >>= XFACE_BITSPERWORD;
|
||||
}
|
||||
if (c) {
|
||||
av_assert0(b->nb_words < XFACE_MAX_WORDS);
|
||||
b->nb_words++;
|
||||
*w = c & XFACE_WORDMASK;
|
||||
}
|
||||
|
@@ -41,17 +41,17 @@
|
||||
/*
|
||||
* Image is encoded as a big integer, using characters from '~' to
|
||||
* '!', for a total of 94 symbols. In order to express
|
||||
* 48x48*2=8*XFACE_MAX_WORDS=4608
|
||||
* bits, we need a total of 704 digits, as given by:
|
||||
* ceil(lg_94(2^4608)) = 704
|
||||
* 48x48 pixels with the worst case encoding 666 symbols should
|
||||
* be sufficient.
|
||||
*/
|
||||
#define XFACE_MAX_DIGITS 704
|
||||
#define XFACE_MAX_DIGITS 666
|
||||
|
||||
#define XFACE_BITSPERWORD 8
|
||||
#define XFACE_WORDCARRY (1 << XFACE_BITSPERWORD)
|
||||
#define XFACE_WORDMASK (XFACE_WORDCARRY - 1)
|
||||
|
||||
#define XFACE_MAX_WORDS ((XFACE_PIXELS * 2 + XFACE_BITSPERWORD - 1) / XFACE_BITSPERWORD)
|
||||
// This must be larger or equal to log256(94^XFACE_MAX_DIGITS)
|
||||
#define XFACE_MAX_WORDS 546
|
||||
|
||||
/* Portable, very large unsigned integer arithmetic is needed.
|
||||
* Implementation uses arrays of WORDs. */
|
||||
|
@@ -23,6 +23,9 @@
|
||||
#include "avdevice.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
#define E AV_OPT_FLAG_ENCODING_PARAM
|
||||
#define D AV_OPT_FLAG_DECODING_PARAM
|
||||
#define A AV_OPT_FLAG_AUDIO_PARAM
|
||||
|
@@ -350,7 +350,7 @@ static int iec61883_read_header(AVFormatContext *context)
|
||||
if (!dv->max_packets)
|
||||
dv->max_packets = 100;
|
||||
|
||||
if (dv->type == IEC61883_HDV) {
|
||||
if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
|
||||
|
||||
/* Init HDV receive */
|
||||
|
||||
@@ -444,7 +444,7 @@ static int iec61883_close(AVFormatContext *context)
|
||||
pthread_mutex_destroy(&dv->mutex);
|
||||
#endif
|
||||
|
||||
if (dv->type == IEC61883_HDV) {
|
||||
if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
|
||||
iec61883_mpeg2_recv_stop(dv->iec61883_mpeg2);
|
||||
iec61883_mpeg2_close(dv->iec61883_mpeg2);
|
||||
avpriv_mpegts_parse_close(dv->mpeg_demux);
|
||||
|
@@ -37,6 +37,9 @@
|
||||
#include "formats.h"
|
||||
#include "internal.h"
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame);
|
||||
|
||||
void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
|
||||
|
@@ -519,6 +519,9 @@ OBJS-$(CONFIG_UNIX_PROTOCOL) += unix.o
|
||||
|
||||
OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
|
||||
|
||||
# libavdevice dependencies
|
||||
OBJS-$(CONFIG_IEC61883_INDEV) += dv.o
|
||||
|
||||
# Windows resource file
|
||||
SLIBOBJS-$(HAVE_GNU_WINDRES) += avformatres.o
|
||||
|
||||
|
@@ -404,7 +404,7 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return 0;
|
||||
default:
|
||||
{
|
||||
char tag_buf[5];
|
||||
char tag_buf[32];
|
||||
|
||||
av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
|
||||
avpriv_request_sample(s, "In-stream tag=%s (0x%08X) len=%"PRIu32, tag_buf, tag, len);
|
||||
|
@@ -223,6 +223,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
return offset1;
|
||||
offset += offset1;
|
||||
}
|
||||
if (offset < 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
offset1 = offset - pos;
|
||||
if (!s->must_flush && (!s->direct || !s->seek) &&
|
||||
offset1 >= 0 && offset1 <= buffer_size) {
|
||||
|
@@ -122,7 +122,7 @@ static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary
|
||||
c->key, c->keylen, "decryption key")) < 0)
|
||||
goto err;
|
||||
if ((ret = set_aes_arg(c, &c->decrypt_iv, &c->decrypt_ivlen,
|
||||
c->key, c->keylen, "decryption IV")) < 0)
|
||||
c->iv, c->ivlen, "decryption IV")) < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
if ((ret = set_aes_arg(c, &c->encrypt_iv, &c->encrypt_ivlen,
|
||||
c->key, c->keylen, "encryption IV")) < 0)
|
||||
c->iv, c->ivlen, "encryption IV")) < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@@ -459,11 +459,11 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
|
||||
}
|
||||
|
||||
if (key) {
|
||||
acodec = astream ? astream->codec : NULL;
|
||||
vcodec = vstream ? vstream->codec : NULL;
|
||||
|
||||
// stream info doesn't live any deeper than the first object
|
||||
if (depth == 1) {
|
||||
acodec = astream ? astream->codec : NULL;
|
||||
vcodec = vstream ? vstream->codec : NULL;
|
||||
|
||||
if (amf_type == AMF_DATA_TYPE_NUMBER ||
|
||||
amf_type == AMF_DATA_TYPE_BOOL) {
|
||||
if (!strcmp(key, "duration"))
|
||||
@@ -623,7 +623,7 @@ static int flv_read_close(AVFormatContext *s)
|
||||
|
||||
static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size)
|
||||
{
|
||||
av_free(st->codec->extradata);
|
||||
av_freep(&st->codec->extradata);
|
||||
if (ff_get_extradata(st->codec, s->pb, size) < 0)
|
||||
return AVERROR(ENOMEM);
|
||||
return 0;
|
||||
|
@@ -145,15 +145,15 @@ static void hds_free(AVFormatContext *s)
|
||||
if (os->ctx && os->ctx_inited)
|
||||
av_write_trailer(os->ctx);
|
||||
if (os->ctx && os->ctx->pb)
|
||||
av_free(os->ctx->pb);
|
||||
av_freep(&os->ctx->pb);
|
||||
if (os->ctx)
|
||||
avformat_free_context(os->ctx);
|
||||
av_free(os->metadata);
|
||||
av_freep(&os->metadata);
|
||||
for (j = 0; j < os->nb_extra_packets; j++)
|
||||
av_free(os->extra_packets[j]);
|
||||
av_freep(&os->extra_packets[j]);
|
||||
for (j = 0; j < os->nb_fragments; j++)
|
||||
av_free(os->fragments[j]);
|
||||
av_free(os->fragments);
|
||||
av_freep(&os->fragments[j]);
|
||||
av_freep(&os->fragments);
|
||||
}
|
||||
av_freep(&c->streams);
|
||||
}
|
||||
@@ -499,7 +499,7 @@ static int hds_flush(AVFormatContext *s, OutputStream *os, int final,
|
||||
if (remove > 0) {
|
||||
for (i = 0; i < remove; i++) {
|
||||
unlink(os->fragments[i]->file);
|
||||
av_free(os->fragments[i]);
|
||||
av_freep(&os->fragments[i]);
|
||||
}
|
||||
os->nb_fragments -= remove;
|
||||
memmove(os->fragments, os->fragments + remove,
|
||||
|
@@ -189,6 +189,7 @@ typedef struct MOVContext {
|
||||
int has_looked_for_mfra;
|
||||
MOVFragmentIndex** fragment_index_data;
|
||||
unsigned fragment_index_count;
|
||||
int atom_depth;
|
||||
} MOVContext;
|
||||
|
||||
int ff_mp4_read_descr_len(AVIOContext *pb);
|
||||
|
@@ -1414,13 +1414,17 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
|
||||
EbmlList *seekhead_list = &matroska->seekhead;
|
||||
int64_t before_pos = avio_tell(matroska->ctx->pb);
|
||||
int i;
|
||||
int nb_elem;
|
||||
|
||||
// we should not do any seeking in the streaming case
|
||||
if (!matroska->ctx->pb->seekable ||
|
||||
(matroska->ctx->flags & AVFMT_FLAG_IGNIDX))
|
||||
return;
|
||||
|
||||
for (i = 0; i < seekhead_list->nb_elem; i++) {
|
||||
// do not read entries that are added while parsing seekhead entries
|
||||
nb_elem = seekhead_list->nb_elem;
|
||||
|
||||
for (i = 0; i < nb_elem; i++) {
|
||||
MatroskaSeekhead *seekhead = seekhead_list->elem;
|
||||
if (seekhead[i].pos <= before_pos)
|
||||
continue;
|
||||
|
@@ -1550,7 +1550,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
|
||||
|
||||
static void mov_parse_stsd_subtitle(MOVContext *c, AVIOContext *pb,
|
||||
AVStream *st, MOVStreamContext *sc,
|
||||
int size)
|
||||
int64_t size)
|
||||
{
|
||||
// ttxt stsd contains display flags, justification, background
|
||||
// color, fonts, and default styles, so fake an atom to read it
|
||||
@@ -1615,10 +1615,10 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st)
|
||||
|
||||
static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb,
|
||||
AVStream *st, MOVStreamContext *sc,
|
||||
int size)
|
||||
int64_t size)
|
||||
{
|
||||
if (st->codec->codec_tag == MKTAG('t','m','c','d')) {
|
||||
if (ff_get_extradata(st->codec, pb, size) < 0)
|
||||
if ((int)size != size || ff_get_extradata(st->codec, pb, size) < 0)
|
||||
return AVERROR(ENOMEM);
|
||||
if (size > 16) {
|
||||
MOVStreamContext *tmcd_ctx = st->priv_data;
|
||||
@@ -3388,6 +3388,12 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
MOVAtom a;
|
||||
int i;
|
||||
|
||||
if (c->atom_depth > 10) {
|
||||
av_log(c->fc, AV_LOG_ERROR, "Atoms too deeply nested\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
c->atom_depth ++;
|
||||
|
||||
if (atom.size < 0)
|
||||
atom.size = INT64_MAX;
|
||||
while (total_size + 8 <= atom.size && !avio_feof(pb)) {
|
||||
@@ -3417,6 +3423,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
{
|
||||
av_log(c->fc, AV_LOG_ERROR, "Broken file, trak/mdat not at top-level\n");
|
||||
avio_skip(pb, -8);
|
||||
c->atom_depth --;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -3453,13 +3460,16 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
int64_t start_pos = avio_tell(pb);
|
||||
int64_t left;
|
||||
int err = parse(c, pb, a);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
c->atom_depth --;
|
||||
return err;
|
||||
}
|
||||
if (c->found_moov && c->found_mdat &&
|
||||
((!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX) ||
|
||||
start_pos + a.size == avio_size(pb))) {
|
||||
if (!pb->seekable || c->fc->flags & AVFMT_FLAG_IGNIDX)
|
||||
c->next_root_atom = start_pos + a.size;
|
||||
c->atom_depth --;
|
||||
return 0;
|
||||
}
|
||||
left = a.size - avio_tell(pb) + start_pos;
|
||||
@@ -3479,6 +3489,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
if (total_size < atom.size && atom.size < 0x7ffff)
|
||||
avio_skip(pb, atom.size - total_size);
|
||||
|
||||
c->atom_depth --;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -70,7 +70,7 @@ static int rsd_read_header(AVFormatContext *s)
|
||||
codec->codec_tag = avio_rl32(pb);
|
||||
codec->codec_id = ff_codec_get_id(rsd_tags, codec->codec_tag);
|
||||
if (!codec->codec_id) {
|
||||
char tag_buf[5];
|
||||
char tag_buf[32];
|
||||
|
||||
av_get_codec_tag_string(tag_buf, sizeof(tag_buf), codec->codec_tag);
|
||||
for (i=0; i < FF_ARRAY_ELEMS(rsd_unsupported_tags); i++) {
|
||||
|
@@ -53,6 +53,9 @@
|
||||
#include "riff.h"
|
||||
#include "url.h"
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* various utility functions for use within FFmpeg
|
||||
@@ -594,6 +597,8 @@ static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_in
|
||||
int default_stream_index = av_find_default_stream_index(s);
|
||||
if (s->streams[default_stream_index]->pts_wrap_reference == AV_NOPTS_VALUE) {
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
if (av_find_program_from_stream(s, NULL, i))
|
||||
continue;
|
||||
s->streams[i]->pts_wrap_reference = pts_wrap_reference;
|
||||
s->streams[i]->pts_wrap_behavior = pts_wrap_behavior;
|
||||
}
|
||||
|
@@ -503,6 +503,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
|
||||
free_side_data(&dst->side_data[i]);
|
||||
}
|
||||
av_freep(&dst->side_data);
|
||||
dst->nb_side_data = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
memcpy(sd_dst->data, sd_src->data, sd_src->size);
|
||||
|
@@ -27,6 +27,9 @@
|
||||
* various utility functions
|
||||
*/
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
unsigned avutil_version(void)
|
||||
{
|
||||
static int checks_done;
|
||||
|
@@ -89,6 +89,9 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
|
||||
#include "postprocess_internal.h"
|
||||
#include "libavutil/avstring.h"
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char postproc_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
unsigned postproc_version(void)
|
||||
{
|
||||
av_assert0(LIBPOSTPROC_VERSION_MICRO >= 100);
|
||||
|
@@ -76,8 +76,12 @@ static int process(
|
||||
AudioData *src, int src_size, int *consumed){
|
||||
size_t idone, odone;
|
||||
soxr_error_t error = soxr_set_error((soxr_t)c, soxr_set_num_channels((soxr_t)c, src->ch_count));
|
||||
error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
|
||||
&idone, dst->ch, (size_t)dst_size, &odone);
|
||||
if (!error)
|
||||
error = soxr_process((soxr_t)c, src->ch, (size_t)src_size,
|
||||
&idone, dst->ch, (size_t)dst_size, &odone);
|
||||
else
|
||||
idone = 0;
|
||||
|
||||
*consumed = (int)idone;
|
||||
return error? -1 : odone;
|
||||
}
|
||||
|
@@ -28,6 +28,9 @@
|
||||
|
||||
#define ALIGN 32
|
||||
|
||||
#include "libavutil/ffversion.h"
|
||||
const char swr_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
|
||||
|
||||
unsigned swresample_version(void)
|
||||
{
|
||||
av_assert0(LIBSWRESAMPLE_VERSION_MICRO >= 100);
|
||||
|
@@ -39,7 +39,7 @@
|
||||
|
||||
#define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long
|
||||
|
||||
#define YUVRGB_TABLE_HEADROOM 128
|
||||
#define YUVRGB_TABLE_HEADROOM 256
|
||||
|
||||
#define MAX_FILTER_SIZE SWS_MAX_FILTER_SIZE
|
||||
|
||||
|
Reference in New Issue
Block a user