Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e0465d6fcf | ||
![]() |
65889b62b3 | ||
![]() |
7fc97160c2 | ||
![]() |
c4f0f3c52d | ||
![]() |
4865948d2e | ||
![]() |
891376d261 | ||
![]() |
24a5cd720d | ||
![]() |
75f5fe165c | ||
![]() |
665f70209a | ||
![]() |
12c8e4021c | ||
![]() |
f56095c4d7 | ||
![]() |
76601e4ab8 | ||
![]() |
e90d620cb9 | ||
![]() |
0ffa44340f | ||
![]() |
0bd9b78fb6 | ||
![]() |
997bf49b1c | ||
![]() |
e9d85860d0 | ||
![]() |
2144ce08c1 | ||
![]() |
e28c27e25f | ||
![]() |
9b9048a3dd | ||
![]() |
70dc7bb893 | ||
![]() |
b9b97900c1 | ||
![]() |
d49b57fe0f | ||
![]() |
0f1882b9b2 | ||
![]() |
0fc229450f | ||
![]() |
6f02de4ee8 | ||
![]() |
248a2fca90 | ||
![]() |
1482253790 | ||
![]() |
0f578ea705 | ||
![]() |
48443598ed | ||
![]() |
30ffb80dca | ||
![]() |
0a64e9a029 | ||
![]() |
59b2a9ef95 | ||
![]() |
4ce6d65b6f | ||
![]() |
ab4e54f6f6 | ||
![]() |
18342848f7 | ||
![]() |
61a51598e3 | ||
![]() |
abc1fa7c5a | ||
![]() |
f712d3669e | ||
![]() |
ca232ff9b0 | ||
![]() |
b4632cec74 | ||
![]() |
454f6c622c | ||
![]() |
f70ee7d14f | ||
![]() |
c285db74f6 |
@@ -1,6 +1,14 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version 1.2.8:
|
||||
- proresenc_ks: fix buffer overflow
|
||||
- iff: fix crash
|
||||
- cdgraphics: fix infinite loop
|
||||
- Fix Ticket3804
|
||||
- Fix Ticket3208
|
||||
|
||||
|
||||
version 1.2:
|
||||
|
||||
- VDPAU hardware acceleration through normal hwaccel
|
||||
|
1
configure
vendored
1
configure
vendored
@@ -3750,6 +3750,7 @@ EOF
|
||||
fi
|
||||
|
||||
check_ldflags -Wl,--as-needed
|
||||
check_ldflags -Wl,-z,noexecstack
|
||||
|
||||
if check_func dlopen; then
|
||||
ldl=
|
||||
|
@@ -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 = 1.2.7
|
||||
PROJECT_NUMBER = 1.2.9
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
@@ -34,7 +34,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
int size;
|
||||
union {
|
||||
uint64_t u64;
|
||||
uint8_t u8[8];
|
||||
uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||
} tmp;
|
||||
|
||||
tmp.u64 = av_be2ne64(state);
|
||||
|
@@ -147,7 +147,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
||||
int err;
|
||||
union {
|
||||
uint64_t u64;
|
||||
uint8_t u8[8];
|
||||
uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||
} tmp = { av_be2ne64(state) };
|
||||
AC3HeaderInfo hdr;
|
||||
GetBitContext gbc;
|
||||
|
@@ -260,7 +260,7 @@ static void apply_channel_coupling(AC3EncodeContext *s)
|
||||
energy_cpl = energy[blk][CPL_CH][bnd];
|
||||
energy_ch = energy[blk][ch][bnd];
|
||||
blk1 = blk+1;
|
||||
while (!s->blocks[blk1].new_cpl_coords[ch] && blk1 < s->num_blocks) {
|
||||
while (blk1 < s->num_blocks && !s->blocks[blk1].new_cpl_coords[ch]) {
|
||||
if (s->blocks[blk1].cpl_in_use) {
|
||||
energy_cpl += energy[blk1][CPL_CH][bnd];
|
||||
energy_ch += energy[blk1][ch][bnd];
|
||||
|
@@ -361,11 +361,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
||||
*got_frame = 1;
|
||||
} else {
|
||||
*got_frame = 0;
|
||||
buf_size = 0;
|
||||
}
|
||||
|
||||
*(AVFrame *) data = cc->frame;
|
||||
return buf_size;
|
||||
return avpkt->size;
|
||||
}
|
||||
|
||||
static av_cold int cdg_decode_end(AVCodecContext *avctx)
|
||||
|
@@ -134,7 +134,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
|
||||
const uint8_t *eod = (data + size);
|
||||
uint32_t flag, mask;
|
||||
uint8_t *cb0, *cb1, *cb2, *cb3;
|
||||
unsigned int x, y;
|
||||
int x, y;
|
||||
char *ip0, *ip1, *ip2, *ip3;
|
||||
|
||||
flag = 0;
|
||||
|
@@ -350,11 +350,6 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
|
||||
static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5;
|
||||
static const int mb_area_start[5] = { 1, 6, 21, 43, 64 };
|
||||
|
||||
static inline int put_bits_left(PutBitContext* s)
|
||||
{
|
||||
return (s->buf_end - s->buf) * 8 - put_bits_count(s);
|
||||
}
|
||||
|
||||
#if CONFIG_SMALL
|
||||
/* Converts run and level (where level != 0) pair into VLC, returning bit size */
|
||||
static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc)
|
||||
|
@@ -45,8 +45,11 @@ static int dvdsub_parse(AVCodecParserContext *s,
|
||||
DVDSubParseContext *pc = s->priv_data;
|
||||
|
||||
if (pc->packet_index == 0) {
|
||||
if (buf_size < 2)
|
||||
return 0;
|
||||
if (buf_size < 2 || AV_RB16(buf) && buf_size < 6) {
|
||||
if (buf_size)
|
||||
av_log(avctx, AV_LOG_DEBUG, "Parser input %d too small\n", buf_size);
|
||||
return buf_size;
|
||||
}
|
||||
pc->packet_len = AV_RB16(buf);
|
||||
if (pc->packet_len == 0) /* HD-DVD subpicture packet */
|
||||
pc->packet_len = AV_RB32(buf+2);
|
||||
|
@@ -253,26 +253,21 @@ static int gif_read_image(GifState *s)
|
||||
case 1:
|
||||
y1 += 8;
|
||||
ptr += linesize * 8;
|
||||
if (y1 >= height) {
|
||||
y1 = pass ? 2 : 4;
|
||||
ptr = ptr1 + linesize * y1;
|
||||
pass++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
y1 += 4;
|
||||
ptr += linesize * 4;
|
||||
if (y1 >= height) {
|
||||
y1 = 1;
|
||||
ptr = ptr1 + linesize;
|
||||
pass++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
y1 += 2;
|
||||
ptr += linesize * 2;
|
||||
break;
|
||||
}
|
||||
while (y1 >= height) {
|
||||
y1 = 4 >> pass;
|
||||
ptr = ptr1 + linesize * y1;
|
||||
pass++;
|
||||
}
|
||||
} else {
|
||||
ptr += linesize;
|
||||
}
|
||||
|
@@ -417,18 +417,18 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode, int is_chroma)
|
||||
|
||||
if ((h->left_samples_available & 0x8080) != 0x8080) {
|
||||
mode = left[mode];
|
||||
if (is_chroma && (h->left_samples_available & 0x8080)) {
|
||||
// mad cow disease mode, aka MBAFF + constrained_intra_pred
|
||||
mode = ALZHEIMER_DC_L0T_PRED8x8 +
|
||||
(!(h->left_samples_available & 0x8000)) +
|
||||
2 * (mode == DC_128_PRED8x8);
|
||||
}
|
||||
if (mode < 0) {
|
||||
av_log(h->avctx, AV_LOG_ERROR,
|
||||
"left block unavailable for requested intra mode at %d %d\n",
|
||||
h->mb_x, h->mb_y);
|
||||
return -1;
|
||||
}
|
||||
if (is_chroma && (h->left_samples_available & 0x8080)) {
|
||||
// mad cow disease mode, aka MBAFF + constrained_intra_pred
|
||||
mode = ALZHEIMER_DC_L0T_PRED8x8 +
|
||||
(!(h->left_samples_available & 0x8000)) +
|
||||
2 * (mode == DC_128_PRED8x8);
|
||||
}
|
||||
}
|
||||
|
||||
return mode;
|
||||
|
@@ -832,9 +832,9 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
break;
|
||||
case 4:
|
||||
bytestream2_init(&gb, buf, buf_size);
|
||||
if (avctx->codec_tag == MKTAG('R','G','B','8'))
|
||||
if (avctx->codec_tag == MKTAG('R','G','B','8') && avctx->pix_fmt == AV_PIX_FMT_RGB32)
|
||||
decode_rgb8(&gb, s->frame.data[0], avctx->width, avctx->height, s->frame.linesize[0]);
|
||||
else if (avctx->codec_tag == MKTAG('R','G','B','N'))
|
||||
else if (avctx->codec_tag == MKTAG('R','G','B','N') && avctx->pix_fmt == AV_PIX_FMT_RGB444)
|
||||
decode_rgbn(&gb, s->frame.data[0], avctx->width, avctx->height, s->frame.linesize[0]);
|
||||
else
|
||||
return unsupported(avctx);
|
||||
|
@@ -207,6 +207,11 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, void *
|
||||
x += stride;
|
||||
}
|
||||
|
||||
if (x >= w) {
|
||||
av_log(NULL, AV_LOG_ERROR, "run overflow\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* decode run termination value */
|
||||
Rb = R(last, x);
|
||||
RItype = (FFABS(Ra - Rb) <= state->near) ? 1 : 0;
|
||||
|
@@ -98,8 +98,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return ret;
|
||||
}
|
||||
|
||||
WebRtcIlbcfix_DecodeImpl((WebRtc_Word16*) frame->data[0],
|
||||
(const WebRtc_UWord16*) buf, &s->decoder, 1);
|
||||
WebRtcIlbcfix_DecodeImpl((int16_t *) frame->data[0], (const uint16_t *) buf, &s->decoder, 1);
|
||||
|
||||
*got_frame_ptr = 1;
|
||||
|
||||
@@ -185,7 +184,7 @@ static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, 50)) < 0)
|
||||
return ret;
|
||||
|
||||
WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->data, (const WebRtc_Word16*) frame->data[0], &s->encoder);
|
||||
WebRtcIlbcfix_EncodeImpl((uint16_t *) avpkt->data, (const int16_t *) frame->data[0], &s->encoder);
|
||||
|
||||
avpkt->size = s->encoder.no_of_bytes;
|
||||
*got_packet_ptr = 1;
|
||||
|
@@ -211,7 +211,7 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
|
||||
|
||||
int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
{
|
||||
int len, nb_components, i, width, height, pix_fmt_id;
|
||||
int len, nb_components, i, width, height, bits, pix_fmt_id;
|
||||
int h_count[MAX_COMPONENTS];
|
||||
int v_count[MAX_COMPONENTS];
|
||||
|
||||
@@ -220,14 +220,14 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
|
||||
/* XXX: verify len field validity */
|
||||
len = get_bits(&s->gb, 16);
|
||||
s->bits = get_bits(&s->gb, 8);
|
||||
bits = get_bits(&s->gb, 8);
|
||||
|
||||
if (s->pegasus_rct)
|
||||
s->bits = 9;
|
||||
if (s->bits == 9 && !s->pegasus_rct)
|
||||
bits = 9;
|
||||
if (bits == 9 && !s->pegasus_rct)
|
||||
s->rct = 1; // FIXME ugly
|
||||
|
||||
if (s->bits != 8 && !s->lossless) {
|
||||
if (bits != 8 && !s->lossless) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
if (s->ls && !(s->bits <= 8 || nb_components == 1)) {
|
||||
if (s->ls && !(bits <= 8 || nb_components == 1)) {
|
||||
av_log_missing_feature(s->avctx,
|
||||
"For JPEG-LS anything except <= 8 bits/component"
|
||||
" or 16-bit gray", 0);
|
||||
@@ -301,12 +301,14 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
|
||||
/* if different size, realloc/alloc picture */
|
||||
if ( width != s->width || height != s->height
|
||||
|| bits != s->bits
|
||||
|| memcmp(s->h_count, h_count, sizeof(h_count))
|
||||
|| memcmp(s->v_count, v_count, sizeof(v_count))) {
|
||||
av_freep(&s->qscale_table);
|
||||
|
||||
s->width = width;
|
||||
s->height = height;
|
||||
s->bits = bits;
|
||||
memcpy(s->h_count, h_count, sizeof(h_count));
|
||||
memcpy(s->v_count, v_count, sizeof(v_count));
|
||||
s->interlaced = 0;
|
||||
|
@@ -109,7 +109,7 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
||||
|
||||
if (color) {
|
||||
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
||||
if (half_vert)
|
||||
if (half_vert && y + half_vert < s->avctx->height)
|
||||
memset(s->frame.data[0] + (y+1)*s->frame.linesize[0] + x, color, run_length);
|
||||
}
|
||||
x+= run_length;
|
||||
|
@@ -1086,6 +1086,9 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
|
||||
{
|
||||
int i, err = 0;
|
||||
|
||||
if (!s->context_initialized)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (s->slice_context_count > 1) {
|
||||
for (i = 0; i < s->slice_context_count; i++) {
|
||||
free_duplicate_context(s->thread_context[i]);
|
||||
@@ -1114,8 +1117,8 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
|
||||
s->mb_height = (s->height + 15) / 16;
|
||||
|
||||
if ((s->width || s->height) &&
|
||||
av_image_check_size(s->width, s->height, 0, s->avctx))
|
||||
return AVERROR_INVALIDDATA;
|
||||
(err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
|
||||
goto fail;
|
||||
|
||||
if ((err = init_context_frame(s)))
|
||||
goto fail;
|
||||
@@ -1131,7 +1134,7 @@ int ff_MPV_common_frame_size_change(MpegEncContext *s)
|
||||
}
|
||||
|
||||
for (i = 0; i < nb_slices; i++) {
|
||||
if (init_duplicate_context(s->thread_context[i]) < 0)
|
||||
if ((err = init_duplicate_context(s->thread_context[i])) < 0)
|
||||
goto fail;
|
||||
s->thread_context[i]->start_mb_y =
|
||||
(s->mb_height * (i) + nb_slices / 2) / nb_slices;
|
||||
|
@@ -631,7 +631,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
} else if ((s->bits_per_pixel == 1 || s->bits_per_pixel == 2 || s->bits_per_pixel == 4 || s->bits_per_pixel == 8) &&
|
||||
s->color_type == PNG_COLOR_TYPE_PALETTE) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
} else if (s->bit_depth == 1) {
|
||||
} else if (s->bit_depth == 1 && s->bits_per_pixel == 1) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
|
||||
} else if (s->bit_depth == 8 &&
|
||||
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||
@@ -842,9 +842,10 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
int i, j;
|
||||
uint8_t *pd = s->current_picture->data[0];
|
||||
uint8_t *pd_last = s->last_picture->data[0];
|
||||
int ls = FFMIN(av_image_get_linesize(s->current_picture->format, s->width, 0), s->width * s->bpp);
|
||||
|
||||
for (j = 0; j < s->height; j++) {
|
||||
for (i = 0; i < s->width * s->bpp; i++) {
|
||||
for (i = 0; i < ls; i++) {
|
||||
pd[i] += pd_last[i];
|
||||
}
|
||||
pd += s->image_linesize;
|
||||
|
@@ -456,6 +456,11 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
|
||||
num_cblocks, plane_factor,
|
||||
qmat);
|
||||
total_size += sizes[i];
|
||||
if (put_bits_left(pb) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Serious underevaluation of"
|
||||
"required buffer size");
|
||||
return AVERROR_BUFFER_TOO_SMALL;
|
||||
}
|
||||
}
|
||||
return total_size;
|
||||
}
|
||||
@@ -754,9 +759,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||
avctx->coded_frame->key_frame = 1;
|
||||
|
||||
pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE;
|
||||
pkt_size = ctx->frame_size_upper_bound;
|
||||
|
||||
if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0)
|
||||
if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0)
|
||||
return ret;
|
||||
|
||||
orig_buf = pkt->data;
|
||||
@@ -833,7 +838,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
slice_hdr = buf;
|
||||
buf += slice_hdr_size - 1;
|
||||
init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8);
|
||||
encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice);
|
||||
ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
bytestream_put_byte(&slice_hdr, q);
|
||||
slice_size = slice_hdr_size + sizes[ctx->num_planes - 1];
|
||||
|
@@ -75,6 +75,14 @@ static inline int put_bits_count(PutBitContext *s)
|
||||
return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of bits available in the bitstream.
|
||||
*/
|
||||
static inline int put_bits_left(PutBitContext* s)
|
||||
{
|
||||
return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pad the end of the output stream with zeros.
|
||||
*/
|
||||
|
@@ -163,7 +163,7 @@ static void qpeg_decode_inter(QpegContext *qctx, uint8_t *dst,
|
||||
|
||||
/* check motion vector */
|
||||
if ((me_x + filled < 0) || (me_x + me_w + filled > width) ||
|
||||
(height - me_y - me_h < 0) || (height - me_y > orig_height) ||
|
||||
(height - me_y - me_h < 0) || (height - me_y >= orig_height) ||
|
||||
(filled + me_w > width) || (height - me_h < 0))
|
||||
av_log(NULL, AV_LOG_ERROR, "Bogus motion vector (%i,%i), block size %ix%i at %i,%i\n",
|
||||
me_x, me_y, me_w, me_h, filled, height);
|
||||
|
@@ -34,7 +34,6 @@
|
||||
#include "celp_filters.h"
|
||||
#include "ra144.h"
|
||||
|
||||
|
||||
static av_cold int ra144_encode_close(AVCodecContext *avctx)
|
||||
{
|
||||
RA144Context *ractx = avctx->priv_data;
|
||||
|
@@ -69,7 +69,7 @@ typedef struct SmcContext {
|
||||
row_ptr += stride * 4; \
|
||||
} \
|
||||
total_blocks--; \
|
||||
if (total_blocks < 0) \
|
||||
if (total_blocks < 0 + !!n_blocks) \
|
||||
{ \
|
||||
av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
|
||||
return; \
|
||||
|
@@ -652,7 +652,10 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i
|
||||
if(v){
|
||||
v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1);
|
||||
v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + ff_quant3bA[l&0xFF] + 3*ff_quant3bA[t&0xFF]]);
|
||||
|
||||
if ((uint16_t)v != v) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n");
|
||||
v = 1;
|
||||
}
|
||||
xc->x=x;
|
||||
(xc++)->coeff= v;
|
||||
}
|
||||
@@ -662,6 +665,10 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i
|
||||
else run= INT_MAX;
|
||||
v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1);
|
||||
v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]);
|
||||
if ((uint16_t)v != v) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n");
|
||||
v = 1;
|
||||
}
|
||||
|
||||
xc->x=x;
|
||||
(xc++)->coeff= v;
|
||||
|
@@ -716,13 +716,13 @@ static int tiff_decode_tag(TiffContext *s)
|
||||
s->height = value;
|
||||
break;
|
||||
case TIFF_BPP:
|
||||
s->bppcount = count;
|
||||
if (count > 4) {
|
||||
if (count > 4U) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"This format is not supported (bpp=%d, %d components)\n",
|
||||
s->bpp, count);
|
||||
value, count);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
s->bppcount = count;
|
||||
if (count == 1)
|
||||
s->bpp = value;
|
||||
else {
|
||||
@@ -743,6 +743,13 @@ static int tiff_decode_tag(TiffContext *s)
|
||||
s->bpp = -1;
|
||||
}
|
||||
}
|
||||
if (s->bpp > 64U) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"This format is not supported (bpp=%d, %d components)\n",
|
||||
s->bpp, count);
|
||||
s->bpp = 0;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
break;
|
||||
case TIFF_SAMPLES_PER_PIXEL:
|
||||
if (count != 1) {
|
||||
|
@@ -244,6 +244,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
case AV_PIX_FMT_GBRP12BE:
|
||||
case AV_PIX_FMT_GBRP14LE:
|
||||
case AV_PIX_FMT_GBRP14BE:
|
||||
case AV_PIX_FMT_GBRP16LE:
|
||||
case AV_PIX_FMT_GBRP16BE:
|
||||
w_align = 16; //FIXME assume 16 pixel per macroblock
|
||||
h_align = 16 * 2; // interlaced needs 2 macroblocks height
|
||||
break;
|
||||
@@ -272,6 +274,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
w_align = 4;
|
||||
h_align = 4;
|
||||
}
|
||||
if (s->codec_id == AV_CODEC_ID_JV) {
|
||||
w_align = 8;
|
||||
h_align = 8;
|
||||
}
|
||||
break;
|
||||
case AV_PIX_FMT_BGR24:
|
||||
if ((s->codec_id == AV_CODEC_ID_MSZH) ||
|
||||
|
@@ -61,6 +61,9 @@ cglobal scalarproduct_int16, 3,3,3, v1, v2, order
|
||||
%endif
|
||||
paddd m2, m0
|
||||
movd eax, m2
|
||||
%if mmsize == 8
|
||||
emms
|
||||
%endif
|
||||
RET
|
||||
|
||||
; int scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2002 Steve O'Hara-Smith
|
||||
* based on
|
||||
* Linux video grab interface
|
||||
* Copyright (c) 2000,2001 Gerard Lantau
|
||||
* Copyright (c) 2000, 2001 Fabrice Bellard
|
||||
* and
|
||||
* simple_grab.c Copyright (c) 1999 Roger Hardiman
|
||||
*
|
||||
|
@@ -51,8 +51,10 @@ static int ape_tag_read_field(AVFormatContext *s)
|
||||
av_log(s, AV_LOG_WARNING, "Invalid APE tag key '%s'.\n", key);
|
||||
return -1;
|
||||
}
|
||||
if (size >= UINT_MAX)
|
||||
return -1;
|
||||
if (size > INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
|
||||
av_log(s, AV_LOG_ERROR, "APE tag size too large.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (flags & APE_TAG_FLAG_IS_BINARY) {
|
||||
uint8_t filename[1024];
|
||||
enum AVCodecID id;
|
||||
|
@@ -33,13 +33,15 @@ static int mpeg4video_probe(AVProbeData *probe_packet)
|
||||
|
||||
for(i=0; i<probe_packet->buf_size; i++){
|
||||
temp_buffer = (temp_buffer<<8) + probe_packet->buf[i];
|
||||
if ((temp_buffer & 0xffffff00) != 0x100)
|
||||
if (temp_buffer & 0xfffffe00)
|
||||
continue;
|
||||
if (temp_buffer < 2)
|
||||
continue;
|
||||
|
||||
if (temp_buffer == VOP_START_CODE) VOP++;
|
||||
else if (temp_buffer == VISUAL_OBJECT_START_CODE) VISO++;
|
||||
else if (temp_buffer < 0x120) VO++;
|
||||
else if (temp_buffer < 0x130) VOL++;
|
||||
else if (temp_buffer >= 0x100 && temp_buffer < 0x120) VO++;
|
||||
else if (temp_buffer >= 0x120 && temp_buffer < 0x130) VOL++;
|
||||
else if ( !(0x1AF < temp_buffer && temp_buffer < 0x1B7)
|
||||
&& !(0x1B9 < temp_buffer && temp_buffer < 0x1C4)) res++;
|
||||
}
|
||||
|
@@ -1695,7 +1695,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
break;
|
||||
desc_len = get8(&p, desc_list_end);
|
||||
desc_end = p + desc_len;
|
||||
if (desc_end > desc_list_end)
|
||||
if (desc_len < 0 || desc_end > desc_list_end)
|
||||
break;
|
||||
|
||||
av_dlog(ts->stream, "tag: 0x%02x len=%d\n",
|
||||
|
@@ -283,6 +283,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
const int bmp_fmt = avio_r8(pb);
|
||||
const int width = avio_rl16(pb);
|
||||
const int height = avio_rl16(pb);
|
||||
int pix_fmt;
|
||||
|
||||
len -= 2+1+2+2;
|
||||
|
||||
@@ -347,17 +348,21 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
|
||||
st = vst;
|
||||
}
|
||||
st->codec->width = width;
|
||||
st->codec->height = height;
|
||||
|
||||
if ((res = av_new_packet(pkt, out_len - colormapsize * colormapbpp)) < 0)
|
||||
goto bitmap_end;
|
||||
if (!st->codec->width && !st->codec->height) {
|
||||
st->codec->width = width;
|
||||
st->codec->height = height;
|
||||
} else {
|
||||
ff_add_param_change(pkt, 0, 0, 0, width, height);
|
||||
}
|
||||
pkt->pos = pos;
|
||||
pkt->stream_index = st->index;
|
||||
|
||||
switch (bmp_fmt) {
|
||||
case 3:
|
||||
st->codec->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
pix_fmt = AV_PIX_FMT_PAL8;
|
||||
for (i = 0; i < colormapsize; i++)
|
||||
if (alpha_bmp) colormap[i] = buf[3]<<24 | AV_RB24(buf + 4*i);
|
||||
else colormap[i] = 0xffU <<24 | AV_RB24(buf + 3*i);
|
||||
@@ -369,14 +374,20 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
memcpy(pal, colormap, AVPALETTE_SIZE);
|
||||
break;
|
||||
case 4:
|
||||
st->codec->pix_fmt = AV_PIX_FMT_RGB555;
|
||||
pix_fmt = AV_PIX_FMT_RGB555;
|
||||
break;
|
||||
case 5:
|
||||
st->codec->pix_fmt = alpha_bmp ? AV_PIX_FMT_ARGB : AV_PIX_FMT_0RGB;
|
||||
pix_fmt = alpha_bmp ? AV_PIX_FMT_ARGB : AV_PIX_FMT_0RGB;
|
||||
break;
|
||||
default:
|
||||
av_assert0(0);
|
||||
}
|
||||
if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) {
|
||||
av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n");
|
||||
res = AVERROR_PATCHWELCOME;
|
||||
goto bitmap_end;
|
||||
}
|
||||
st->codec->pix_fmt = pix_fmt;
|
||||
|
||||
if (linesize * height > pkt->size) {
|
||||
res = AVERROR_INVALIDDATA;
|
||||
|
@@ -251,7 +251,7 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
|
||||
if ((ret = av_copy_packet(&pkt2, pkt)) < 0 ||
|
||||
(ret = av_dup_packet(&pkt2))< 0)
|
||||
if (!ret_all) {
|
||||
ret = ret_all;
|
||||
ret_all = ret;
|
||||
continue;
|
||||
}
|
||||
tb = avf ->streams[s]->time_base;
|
||||
|
@@ -1533,7 +1533,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
/* read packet from packet buffer, if there is data */
|
||||
if (!(next_pkt->pts == AV_NOPTS_VALUE &&
|
||||
st = s->streams[next_pkt->stream_index];
|
||||
if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < AVDISCARD_ALL &&
|
||||
next_pkt->dts != AV_NOPTS_VALUE && !eof)) {
|
||||
ret = read_from_packet_buffer(&s->packet_buffer,
|
||||
&s->packet_buffer_end, pkt);
|
||||
|
@@ -44,7 +44,7 @@
|
||||
"cpuid \n\t" \
|
||||
"xchg %%"REG_b", %%"REG_S \
|
||||
: "=a" (eax), "=S" (ebx), "=c" (ecx), "=d" (edx) \
|
||||
: "0" (index))
|
||||
: "0" (index), "2"(0))
|
||||
|
||||
#define xgetbv(index, eax, edx) \
|
||||
__asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index))
|
||||
|
@@ -751,6 +751,8 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
|
||||
in_count = 0;
|
||||
if(ret>0) {
|
||||
s->drop_output -= ret;
|
||||
if (!s->drop_output && !out_arg)
|
||||
return 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,11 @@
|
||||
|
||||
# check for git short hash
|
||||
if ! test "$revision"; then
|
||||
revision=$(cd "$1" && git describe --tags --match N 2> /dev/null)
|
||||
if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then
|
||||
revision=$(cd "$1" && git describe --tags --match N 2> /dev/null)
|
||||
else
|
||||
revision=$(cd "$1" && git describe --tags --always 2> /dev/null)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Shallow Git clones (--depth) do not have the N tag:
|
||||
|
Reference in New Issue
Block a user