Commit b68ab260 authored by Michael Niedermayer's avatar Michael Niedermayer

dont read from b frames if draw_horiz_band==NULL

Originally committed as revision 2533 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e15c3302
...@@ -2571,6 +2571,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) ...@@ -2571,6 +2571,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
qpel_mc_func (*op_qpix)[16]; qpel_mc_func (*op_qpix)[16];
const int linesize= s->current_picture.linesize[0]; //not s->linesize as this woulnd be wrong for field pics const int linesize= s->current_picture.linesize[0]; //not s->linesize as this woulnd be wrong for field pics
const int uvlinesize= s->current_picture.linesize[1]; const int uvlinesize= s->current_picture.linesize[1];
const int readable= s->pict_type != B_TYPE || s->encoding || s->avctx->draw_horiz_band;
/* avoid copy if macroblock skipped in last frame too */ /* avoid copy if macroblock skipped in last frame too */
/* skip only during decoding as we might trash the buffers during encoding a bit */ /* skip only during decoding as we might trash the buffers during encoding a bit */
...@@ -2606,11 +2607,15 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) ...@@ -2606,11 +2607,15 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
dct_linesize = linesize; dct_linesize = linesize;
dct_offset = linesize * 8; dct_offset = linesize * 8;
} }
if(readable){
dest_y= s->dest[0]; dest_y= s->dest[0];
dest_cb= s->dest[1]; dest_cb= s->dest[1];
dest_cr= s->dest[2]; dest_cr= s->dest[2];
}else{
dest_y = s->edge_emu_buffer+32; //FIXME cleanup scratchpad pointers
dest_cb= s->edge_emu_buffer+48;
dest_cr= s->edge_emu_buffer+56;
}
if (!s->mb_intra) { if (!s->mb_intra) {
/* motion handling */ /* motion handling */
/* decoding or more than one mb_type (MC was allready done otherwise) */ /* decoding or more than one mb_type (MC was allready done otherwise) */
...@@ -2688,6 +2693,11 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) ...@@ -2688,6 +2693,11 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
} }
} }
} }
if(!readable){
s->dsp.put_pixels_tab[0][0](s->dest[0], dest_y , linesize,16);
s->dsp.put_pixels_tab[1][0](s->dest[1], dest_cb, uvlinesize, 8);
s->dsp.put_pixels_tab[1][0](s->dest[2], dest_cr, uvlinesize, 8);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment