From 2c340596cab981ac842aff7da89d298025c99304 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 18 Aug 2012 21:53:32 +0200 Subject: [PATCH 1/4] elbg: Fix an assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems the condition was flipped from what was intended. Signed-off-by: Martin Storsjö --- libavcodec/elbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c index 31195f3a9d..0aa8e16165 100644 --- a/libavcodec/elbg.c +++ b/libavcodec/elbg.c @@ -111,7 +111,7 @@ static int get_high_utility_cell(elbg_data *elbg) while (elbg->utility_inc[i] < r) i++; - assert(!elbg->cells[i]); + assert(elbg->cells[i]); return i; } From 19000122a4cc7551cef19ccc6ce4db82d7d290bd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Aug 2012 10:26:04 +0200 Subject: [PATCH 2/4] mpegvideo_enc: remove assert that has become obsolete with the new API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It now just checks uninitialized and unused data. Signed-off-by: Martin Storsjö --- libavcodec/mpegvideo_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index aeafb4d1ef..77b0ab58db 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1608,7 +1608,6 @@ vbv_retry: if (s->mb_info) av_packet_shrink_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, s->mb_info_size); } else { - assert((put_bits_ptr(&s->pb) == s->pb.buf)); s->frame_bits = 0; } assert((s->frame_bits & 7) == 0); From 91672504a403556f63492093b892574234f21dd7 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Aug 2012 16:49:49 +0200 Subject: [PATCH 3/4] mpegvideo: remove last_picture_ptr / h264 assert. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This assert is no longer true since h264 error concealment needs last_picture_ptr to be set. Signed-off-by: Martin Storsjö --- libavcodec/mpegvideo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index e9aff3b316..718df8b63f 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1175,9 +1175,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) Picture *pic; s->mb_skipped = 0; - assert(s->last_picture_ptr == NULL || s->out_format != FMT_H264 || - s->codec_id == AV_CODEC_ID_SVQ3); - /* mark & release old frames */ if (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3) { if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && From 2d7d91f06d6a1d243dc74c96d3389ee237a3b906 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 6 Aug 2012 16:28:13 +0200 Subject: [PATCH 4/4] svq1enc: Set picture_structure correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes assert failures when running in debug mode. Signed-off-by: Martin Storsjö --- libavcodec/svq1enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 3d9055864e..d1a55bdfd6 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -486,6 +486,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) s->avctx= avctx; s->m.avctx= avctx; + s->m.picture_structure = PICT_FRAME; s->m.me.temp = s->m.me.scratchpad= av_mallocz((avctx->width+64)*2*16*2*sizeof(uint8_t)); s->m.me.map = av_mallocz(ME_MAP_SIZE*sizeof(uint32_t));