Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
49fa398858 | ||
![]() |
1ad1723c24 | ||
![]() |
7740b111dd | ||
![]() |
c0ad5f9333 | ||
![]() |
bb7f236c7f | ||
![]() |
0397d43405 | ||
![]() |
ffc66ac0d6 | ||
![]() |
588e7226ed | ||
![]() |
0dc5868f14 | ||
![]() |
723512ac71 | ||
![]() |
963514ea1a | ||
![]() |
c11b3010c2 | ||
![]() |
3301b248b0 | ||
![]() |
7b67ce9ade | ||
![]() |
90a1c5e95c | ||
![]() |
45a529d805 | ||
![]() |
97cbad3d2c | ||
![]() |
6419569a9d | ||
![]() |
67134ad31f | ||
![]() |
d513c6a0ee | ||
![]() |
18f48e05a2 | ||
![]() |
5bf5a35fb5 | ||
![]() |
6598aaea1a | ||
![]() |
a5992a274f | ||
![]() |
aa943bd31f | ||
![]() |
bea14966e2 | ||
![]() |
6be5a3c045 |
@@ -1,6 +1,13 @@
|
|||||||
Entries are sorted chronologically from oldest to youngest within each release,
|
Entries are sorted chronologically from oldest to youngest within each release,
|
||||||
releases are sorted from youngest to oldest.
|
releases are sorted from youngest to oldest.
|
||||||
|
|
||||||
|
version 2.2.7
|
||||||
|
- snow: fix null pointer dereference
|
||||||
|
- iff: fix out of array access
|
||||||
|
- svq1dec: fix input data corruption
|
||||||
|
- proresenc_ks: check buffer size
|
||||||
|
|
||||||
|
|
||||||
version 2.2.6
|
version 2.2.6
|
||||||
- fix infinite loop in dvbsub parser
|
- fix infinite loop in dvbsub parser
|
||||||
- fix some interlaced MPEG-2 videos
|
- fix some interlaced MPEG-2 videos
|
||||||
|
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.2.6
|
PROJECT_NUMBER = 2.2.7
|
||||||
|
|
||||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
# 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
|
# in the documentation. The maximum height of the logo should not exceed 55
|
||||||
|
@@ -1783,7 +1783,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
|
|||||||
/* pick the "best" stream of each type */
|
/* pick the "best" stream of each type */
|
||||||
|
|
||||||
/* video: highest resolution */
|
/* video: highest resolution */
|
||||||
if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
|
if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) {
|
||||||
int area = 0, idx = -1;
|
int area = 0, idx = -1;
|
||||||
int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
|
int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
|
||||||
for (i = 0; i < nb_input_streams; i++) {
|
for (i = 0; i < nb_input_streams; i++) {
|
||||||
@@ -1805,7 +1805,7 @@ static int open_output_file(OptionsContext *o, const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* audio: most channels */
|
/* audio: most channels */
|
||||||
if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) {
|
if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) {
|
||||||
int channels = 0, idx = -1;
|
int channels = 0, idx = -1;
|
||||||
for (i = 0; i < nb_input_streams; i++) {
|
for (i = 0; i < nb_input_streams; i++) {
|
||||||
ist = input_streams[i];
|
ist = input_streams[i];
|
||||||
|
@@ -261,7 +261,7 @@ static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data,
|
|||||||
static int cdg_decode_frame(AVCodecContext *avctx,
|
static int cdg_decode_frame(AVCodecContext *avctx,
|
||||||
void *data, int *got_frame, AVPacket *avpkt)
|
void *data, int *got_frame, AVPacket *avpkt)
|
||||||
{
|
{
|
||||||
const uint8_t *buf = avpkt->data;
|
GetByteContext gb;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
int ret;
|
int ret;
|
||||||
uint8_t command, inst;
|
uint8_t command, inst;
|
||||||
@@ -278,6 +278,8 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bytestream2_init(&gb, avpkt->data, avpkt->size);
|
||||||
|
|
||||||
if ((ret = ff_reget_buffer(avctx, cc->frame)) < 0)
|
if ((ret = ff_reget_buffer(avctx, cc->frame)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (!avctx->frame_number) {
|
if (!avctx->frame_number) {
|
||||||
@@ -285,13 +287,11 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
|||||||
memset(cc->frame->data[1], 0, AVPALETTE_SIZE);
|
memset(cc->frame->data[1], 0, AVPALETTE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
command = bytestream_get_byte(&buf);
|
command = bytestream2_get_byte(&gb);
|
||||||
inst = bytestream_get_byte(&buf);
|
inst = bytestream2_get_byte(&gb);
|
||||||
inst &= CDG_MASK;
|
inst &= CDG_MASK;
|
||||||
buf += 2; /// skipping 2 unneeded bytes
|
bytestream2_skip(&gb, 2);
|
||||||
|
bytestream2_get_buffer(&gb, cdg_data, sizeof(cdg_data));
|
||||||
if (buf_size > CDG_HEADER_SIZE)
|
|
||||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
|
||||||
|
|
||||||
if ((command & CDG_MASK) == CDG_COMMAND) {
|
if ((command & CDG_MASK) == CDG_COMMAND) {
|
||||||
switch (inst) {
|
switch (inst) {
|
||||||
@@ -353,10 +353,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
|||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
} else {
|
} else {
|
||||||
*got_frame = 0;
|
*got_frame = 0;
|
||||||
buf_size = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf_size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_cold int cdg_decode_end(AVCodecContext *avctx)
|
static av_cold int cdg_decode_end(AVCodecContext *avctx)
|
||||||
|
@@ -2142,10 +2142,10 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
|||||||
stereo->type = AV_STEREO3D_CHECKERBOARD;
|
stereo->type = AV_STEREO3D_CHECKERBOARD;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
stereo->type = AV_STEREO3D_LINES;
|
stereo->type = AV_STEREO3D_COLUMNS;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
stereo->type = AV_STEREO3D_COLUMNS;
|
stereo->type = AV_STEREO3D_LINES;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (h->quincunx_subsampling)
|
if (h->quincunx_subsampling)
|
||||||
|
@@ -520,10 +520,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
|
av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && avctx->width%4) {
|
if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P &&
|
||||||
av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 this colorspace and predictor\n");
|
avctx->width % 4) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 "
|
||||||
|
"for this combination of colorspace and predictor type.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = ff_huffyuv_alloc_temp(s)) < 0) {
|
if ((ret = ff_huffyuv_alloc_temp(s)) < 0) {
|
||||||
ff_huffyuv_common_end(s);
|
ff_huffyuv_common_end(s);
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -847,9 +847,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
bytestream2_init(&gb, buf, buf_size);
|
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]);
|
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]);
|
decode_rgbn(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]);
|
||||||
else
|
else
|
||||||
return unsupported(avctx);
|
return unsupported(avctx);
|
||||||
|
@@ -202,10 +202,10 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
|||||||
case AV_STEREO3D_CHECKERBOARD:
|
case AV_STEREO3D_CHECKERBOARD:
|
||||||
fpa_type = 0;
|
fpa_type = 0;
|
||||||
break;
|
break;
|
||||||
case AV_STEREO3D_LINES:
|
case AV_STEREO3D_COLUMNS:
|
||||||
fpa_type = 1;
|
fpa_type = 1;
|
||||||
break;
|
break;
|
||||||
case AV_STEREO3D_COLUMNS:
|
case AV_STEREO3D_LINES:
|
||||||
fpa_type = 2;
|
fpa_type = 2;
|
||||||
break;
|
break;
|
||||||
case AV_STEREO3D_SIDEBYSIDE:
|
case AV_STEREO3D_SIDEBYSIDE:
|
||||||
|
@@ -472,7 +472,6 @@ static void put_alpha_run(PutBitContext *pb, int run)
|
|||||||
|
|
||||||
// todo alpha quantisation for high quants
|
// todo alpha quantisation for high quants
|
||||||
static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb,
|
static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb,
|
||||||
const uint16_t *src, int linesize,
|
|
||||||
int mbs_per_slice, uint16_t *blocks,
|
int mbs_per_slice, uint16_t *blocks,
|
||||||
int quant)
|
int quant)
|
||||||
{
|
{
|
||||||
@@ -567,11 +566,16 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
|
|||||||
get_alpha_data(ctx, src, linesize, xp, yp,
|
get_alpha_data(ctx, src, linesize, xp, yp,
|
||||||
pwidth, avctx->height / ctx->pictures_per_frame,
|
pwidth, avctx->height / ctx->pictures_per_frame,
|
||||||
ctx->blocks[0], mbs_per_slice, ctx->alpha_bits);
|
ctx->blocks[0], mbs_per_slice, ctx->alpha_bits);
|
||||||
sizes[i] = encode_alpha_plane(ctx, pb, src, linesize,
|
sizes[i] = encode_alpha_plane(ctx, pb,
|
||||||
mbs_per_slice, ctx->blocks[0],
|
mbs_per_slice, ctx->blocks[0],
|
||||||
quant);
|
quant);
|
||||||
}
|
}
|
||||||
total_size += sizes[i];
|
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;
|
return total_size;
|
||||||
}
|
}
|
||||||
@@ -942,9 +946,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||||
avctx->coded_frame->key_frame = 1;
|
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;
|
return ret;
|
||||||
|
|
||||||
orig_buf = pkt->data;
|
orig_buf = pkt->data;
|
||||||
@@ -1021,7 +1025,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
slice_hdr = buf;
|
slice_hdr = buf;
|
||||||
buf += slice_hdr_size - 1;
|
buf += slice_hdr_size - 1;
|
||||||
init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8);
|
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);
|
bytestream_put_byte(&slice_hdr, q);
|
||||||
slice_size = slice_hdr_size + sizes[ctx->num_planes - 1];
|
slice_size = slice_hdr_size + sizes[ctx->num_planes - 1];
|
||||||
|
@@ -689,7 +689,7 @@ av_cold void ff_snow_common_end(SnowContext *s)
|
|||||||
for(i=0; i<MAX_REF_FRAMES; i++){
|
for(i=0; i<MAX_REF_FRAMES; i++){
|
||||||
av_freep(&s->ref_mvs[i]);
|
av_freep(&s->ref_mvs[i]);
|
||||||
av_freep(&s->ref_scores[i]);
|
av_freep(&s->ref_scores[i]);
|
||||||
if(s->last_picture[i]->data[0]) {
|
if(s->last_picture[i] && s->last_picture[i]->data[0]) {
|
||||||
av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]);
|
av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]);
|
||||||
}
|
}
|
||||||
av_frame_free(&s->last_picture[i]);
|
av_frame_free(&s->last_picture[i]);
|
||||||
|
@@ -60,6 +60,10 @@ typedef struct SVQ1Context {
|
|||||||
HpelDSPContext hdsp;
|
HpelDSPContext hdsp;
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
AVFrame *prev;
|
AVFrame *prev;
|
||||||
|
|
||||||
|
uint8_t *pkt_swapped;
|
||||||
|
int pkt_swapped_allocated;
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int frame_code;
|
int frame_code;
|
||||||
@@ -624,7 +628,24 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
/* swap some header bytes (why?) */
|
/* swap some header bytes (why?) */
|
||||||
if (s->frame_code != 0x20) {
|
if (s->frame_code != 0x20) {
|
||||||
uint32_t *src = (uint32_t *)(buf + 4);
|
uint32_t *src;
|
||||||
|
|
||||||
|
if (buf_size < 9 * 4) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Input packet too small\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
av_fast_padded_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated,
|
||||||
|
buf_size);
|
||||||
|
if (!s->pkt_swapped)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
memcpy(s->pkt_swapped, buf, buf_size);
|
||||||
|
buf = s->pkt_swapped;
|
||||||
|
init_get_bits(&s->gb, buf, buf_size * 8);
|
||||||
|
skip_bits(&s->gb, 22);
|
||||||
|
|
||||||
|
src = (uint32_t *)(s->pkt_swapped + 4);
|
||||||
|
|
||||||
if (buf_size < 36)
|
if (buf_size < 36)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
@@ -796,6 +817,8 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
|
|||||||
SVQ1Context *s = avctx->priv_data;
|
SVQ1Context *s = avctx->priv_data;
|
||||||
|
|
||||||
av_frame_free(&s->prev);
|
av_frame_free(&s->prev);
|
||||||
|
av_freep(&s->pkt_swapped);
|
||||||
|
s->pkt_swapped_allocated = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -224,6 +224,9 @@ int av_parse_cpu_caps(unsigned *flags, const char *s)
|
|||||||
{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" },
|
{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" },
|
||||||
{ "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" },
|
{ "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 }, .unit = "flags" },
|
||||||
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
|
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
|
||||||
|
#elif ARCH_AARCH64
|
||||||
|
{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON }, .unit = "flags" },
|
||||||
|
{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP }, .unit = "flags" },
|
||||||
#endif
|
#endif
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
@@ -18,6 +18,9 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef AVUTIL_STEREO3D_H
|
||||||
|
#define AVUTIL_STEREO3D_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
@@ -145,3 +148,5 @@ AVStereo3D *av_stereo3d_alloc(void);
|
|||||||
* @return The AVStereo3D structure to be filled by caller.
|
* @return The AVStereo3D structure to be filled by caller.
|
||||||
*/
|
*/
|
||||||
AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);
|
AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame);
|
||||||
|
|
||||||
|
#endif /* AVUTIL_STEREO3D_H */
|
||||||
|
Reference in New Issue
Block a user