Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1632:4c0469b79010 libavcodec
dont read from b frames if draw_horiz_band==NULL
author | michael |
---|---|
date | Thu, 27 Nov 2003 13:38:00 +0000 |
parents | 74685a0ec851 |
children | 27806cccec2a |
comparison
equal
deleted
inserted
replaced
1631:59f2fa833449 | 1632:4c0469b79010 |
---|---|
2569 int dct_linesize, dct_offset; | 2569 int dct_linesize, dct_offset; |
2570 op_pixels_func (*op_pix)[4]; | 2570 op_pixels_func (*op_pix)[4]; |
2571 qpel_mc_func (*op_qpix)[16]; | 2571 qpel_mc_func (*op_qpix)[16]; |
2572 const int linesize= s->current_picture.linesize[0]; //not s->linesize as this woulnd be wrong for field pics | 2572 const int linesize= s->current_picture.linesize[0]; //not s->linesize as this woulnd be wrong for field pics |
2573 const int uvlinesize= s->current_picture.linesize[1]; | 2573 const int uvlinesize= s->current_picture.linesize[1]; |
2574 const int readable= s->pict_type != B_TYPE || s->encoding || s->avctx->draw_horiz_band; | |
2574 | 2575 |
2575 /* avoid copy if macroblock skipped in last frame too */ | 2576 /* avoid copy if macroblock skipped in last frame too */ |
2576 /* skip only during decoding as we might trash the buffers during encoding a bit */ | 2577 /* skip only during decoding as we might trash the buffers during encoding a bit */ |
2577 if(!s->encoding){ | 2578 if(!s->encoding){ |
2578 uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy]; | 2579 uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy]; |
2604 dct_offset = linesize; | 2605 dct_offset = linesize; |
2605 } else { | 2606 } else { |
2606 dct_linesize = linesize; | 2607 dct_linesize = linesize; |
2607 dct_offset = linesize * 8; | 2608 dct_offset = linesize * 8; |
2608 } | 2609 } |
2609 | 2610 if(readable){ |
2610 dest_y= s->dest[0]; | 2611 dest_y= s->dest[0]; |
2611 dest_cb= s->dest[1]; | 2612 dest_cb= s->dest[1]; |
2612 dest_cr= s->dest[2]; | 2613 dest_cr= s->dest[2]; |
2613 | 2614 }else{ |
2615 dest_y = s->edge_emu_buffer+32; //FIXME cleanup scratchpad pointers | |
2616 dest_cb= s->edge_emu_buffer+48; | |
2617 dest_cr= s->edge_emu_buffer+56; | |
2618 } | |
2614 if (!s->mb_intra) { | 2619 if (!s->mb_intra) { |
2615 /* motion handling */ | 2620 /* motion handling */ |
2616 /* decoding or more than one mb_type (MC was allready done otherwise) */ | 2621 /* decoding or more than one mb_type (MC was allready done otherwise) */ |
2617 if(!s->encoding){ | 2622 if(!s->encoding){ |
2618 if ((!s->no_rounding) || s->pict_type==B_TYPE){ | 2623 if ((!s->no_rounding) || s->pict_type==B_TYPE){ |
2685 if(!(s->flags&CODEC_FLAG_GRAY)){ | 2690 if(!(s->flags&CODEC_FLAG_GRAY)){ |
2686 s->dsp.idct_put(dest_cb, uvlinesize, block[4]); | 2691 s->dsp.idct_put(dest_cb, uvlinesize, block[4]); |
2687 s->dsp.idct_put(dest_cr, uvlinesize, block[5]); | 2692 s->dsp.idct_put(dest_cr, uvlinesize, block[5]); |
2688 } | 2693 } |
2689 } | 2694 } |
2695 } | |
2696 if(!readable){ | |
2697 s->dsp.put_pixels_tab[0][0](s->dest[0], dest_y , linesize,16); | |
2698 s->dsp.put_pixels_tab[1][0](s->dest[1], dest_cb, uvlinesize, 8); | |
2699 s->dsp.put_pixels_tab[1][0](s->dest[2], dest_cr, uvlinesize, 8); | |
2690 } | 2700 } |
2691 } | 2701 } |
2692 } | 2702 } |
2693 | 2703 |
2694 #ifdef CONFIG_ENCODERS | 2704 #ifdef CONFIG_ENCODERS |