diff options
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index e24004affd..8b7218e487 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -291,9 +291,7 @@ static inline void svq3_mc_dir_part(SVQ3Context *s, if (mx < 0 || mx >= s->h_edge_pos - width - 1 || my < 0 || my >= s->v_edge_pos - height - 1) { - if ((h->flags & CODEC_FLAG_EMU_EDGE)) - emu = 1; - + emu = 1; mx = av_clip(mx, -16, s->h_edge_pos - width + 15); my = av_clip(my, -16, s->v_edge_pos - height + 15); } @@ -1050,6 +1048,11 @@ static int get_buffer(AVCodecContext *avctx, Picture *pic) pic->f.reference = !(h->pict_type == AV_PICTURE_TYPE_B); ret = ff_get_buffer(avctx, &pic->f); + if (!h->edge_emu_buffer) { + h->edge_emu_buffer = av_mallocz(pic->f.linesize[0] * 17); + if (!h->edge_emu_buffer) + return AVERROR(ENOMEM); + } h->linesize = pic->f.linesize[0]; h->uvlinesize = pic->f.linesize[1]; @@ -1225,8 +1228,8 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, (h->pict_type == AV_PICTURE_TYPE_P && mb_type < 8) ? (mb_type - 1) : -1; } - ff_draw_horiz_band(avctx, &h->dsp, s->cur_pic, s->last_pic->f.data[0] ? s->last_pic : NULL, - 16 * h->mb_y, 16, h->picture_structure, 0, 1, + ff_draw_horiz_band(avctx, NULL, s->cur_pic, s->last_pic->f.data[0] ? s->last_pic : NULL, + 16 * h->mb_y, 16, h->picture_structure, 0, 0, h->low_delay, h->mb_height * 16, h->mb_width * 16); } |