Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1370:45d761c387cd libavcodec
default for slices is display order again
optional support for field slices & slices in coded order
and single component slices for svq1 (unfinished)
author | michaelni |
---|---|
date | Sun, 20 Jul 2003 14:48:05 +0000 |
parents | 8a150a66d2d9 |
children | b47a402bbe7f |
comparison
equal
deleted
inserted
replaced
1369:8a150a66d2d9 | 1370:45d761c387cd |
---|---|
2724 * | 2724 * |
2725 * @param h is the normal height, this will be reduced automatically if needed for the last row | 2725 * @param h is the normal height, this will be reduced automatically if needed for the last row |
2726 */ | 2726 */ |
2727 void ff_draw_horiz_band(MpegEncContext *s, int y, int h){ | 2727 void ff_draw_horiz_band(MpegEncContext *s, int y, int h){ |
2728 if (s->avctx->draw_horiz_band) { | 2728 if (s->avctx->draw_horiz_band) { |
2729 AVFrame *src; | |
2729 uint8_t *src_ptr[3]; | 2730 uint8_t *src_ptr[3]; |
2730 int offset[4]; | 2731 int offset[4]; |
2732 | |
2733 if(s->picture_structure != PICT_FRAME){ | |
2734 h <<= 1; | |
2735 y <<= 1; | |
2736 if(s->first_field && !(s->avctx->slice_flags&SLICE_FLAG_ALLOW_FIELD)) return; | |
2737 } | |
2738 | |
2731 h= FFMIN(h, s->height - y); | 2739 h= FFMIN(h, s->height - y); |
2732 | 2740 |
2741 if(s->pict_type==B_TYPE || s->low_delay || (s->avctx->slice_flags&SLICE_FLAG_CODED_ORDER)) | |
2742 src= (AVFrame*)s->current_picture_ptr; | |
2743 else if(s->last_picture_ptr) | |
2744 src= (AVFrame*)s->last_picture_ptr; | |
2745 else | |
2746 return; | |
2747 | |
2733 if(s->pict_type==B_TYPE && s->picture_structure == PICT_FRAME && s->out_format != FMT_H264){ | 2748 if(s->pict_type==B_TYPE && s->picture_structure == PICT_FRAME && s->out_format != FMT_H264){ |
2734 offset[0]= | 2749 offset[0]= |
2735 offset[1]= | 2750 offset[1]= |
2736 offset[2]= | 2751 offset[2]= |
2737 offset[3]= 0; | 2752 offset[3]= 0; |
2742 offset[3]= 0; | 2757 offset[3]= 0; |
2743 } | 2758 } |
2744 | 2759 |
2745 emms_c(); | 2760 emms_c(); |
2746 | 2761 |
2747 s->avctx->draw_horiz_band(s->avctx, (AVFrame*)s->current_picture_ptr, offset, | 2762 s->avctx->draw_horiz_band(s->avctx, src, offset, |
2748 y, s->width, h); | 2763 y, s->picture_structure, h); |
2749 } | 2764 } |
2750 } | 2765 } |
2751 | 2766 |
2752 #ifdef CONFIG_ENCODERS | 2767 #ifdef CONFIG_ENCODERS |
2753 | 2768 |