summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-05 20:03:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-05 20:03:15 +0000
commit640950c700ce17fb6e3a135c5717f35c9c8d48ea (patch)
treeb9a8fd9e7ef43e8749860f63b8d83dffda1831f4 /libavcodec/mpegvideo.c
parent1d98dca328c437625b2d33cd2cf46af2671421b3 (diff)
mpeg2 field pictures + sliced mode (doesnt work with mplayer though, dunno why)
Originally committed as revision 1626 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 12385c9646..a0c9e6e50b 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2051,7 +2051,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}else
s->mb_skiped= 0;
- if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band){
+ if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME){ //FIXME precalc
dest_y = s->current_picture.data[0] + mb_x * 16;
dest_cb = s->current_picture.data[1] + mb_x * 8;
dest_cr = s->current_picture.data[2] + mb_x * 8;
@@ -2356,17 +2356,18 @@ static int pix_diff_vcmp16x8(uint8_t *s1, uint8_t*s2, int stride){ //FIXME move
#endif //CONFIG_ENCODERS
-void ff_draw_horiz_band(MpegEncContext *s){
+/**
+ *
+ * @param h is the normal height, this will be reduced automatically if needed for the last row
+ */
+void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
if ( s->avctx->draw_horiz_band
&& (s->last_picture.data[0] || s->low_delay) ) {
uint8_t *src_ptr[3];
- int y, h, offset;
- y = s->mb_y * 16;
- h = s->height - y;
- if (h > 16)
- h = 16;
+ int offset;
+ h= FFMIN(h, s->height - y);
- if(s->pict_type==B_TYPE)
+ if(s->pict_type==B_TYPE && s->picture_structure == PICT_FRAME)
offset = 0;
else
offset = y * s->linesize;