comparison mpegvideo.c @ 1098:b7f267d168b7 libavcodec

mpeg2 field pictures + sliced mode (doesnt work with mplayer though, dunno why)
author michaelni
date Wed, 05 Mar 2003 20:03:15 +0000
parents 5e6e505d8997
children 988b180afd31
comparison
equal deleted inserted replaced
1097:7104c8561512 1098:b7f267d168b7
2049 *mbskip_ptr = 0; /* not skipped */ 2049 *mbskip_ptr = 0; /* not skipped */
2050 } 2050 }
2051 }else 2051 }else
2052 s->mb_skiped= 0; 2052 s->mb_skiped= 0;
2053 2053
2054 if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band){ 2054 if(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME){ //FIXME precalc
2055 dest_y = s->current_picture.data[0] + mb_x * 16; 2055 dest_y = s->current_picture.data[0] + mb_x * 16;
2056 dest_cb = s->current_picture.data[1] + mb_x * 8; 2056 dest_cb = s->current_picture.data[1] + mb_x * 8;
2057 dest_cr = s->current_picture.data[2] + mb_x * 8; 2057 dest_cr = s->current_picture.data[2] + mb_x * 8;
2058 }else{ 2058 }else{
2059 dest_y = s->current_picture.data[0] + (mb_y * 16* s->linesize ) + mb_x * 16; 2059 dest_y = s->current_picture.data[0] + (mb_y * 16* s->linesize ) + mb_x * 16;
2354 2354
2355 #endif 2355 #endif
2356 2356
2357 #endif //CONFIG_ENCODERS 2357 #endif //CONFIG_ENCODERS
2358 2358
2359 void ff_draw_horiz_band(MpegEncContext *s){ 2359 /**
2360 *
2361 * @param h is the normal height, this will be reduced automatically if needed for the last row
2362 */
2363 void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2360 if ( s->avctx->draw_horiz_band 2364 if ( s->avctx->draw_horiz_band
2361 && (s->last_picture.data[0] || s->low_delay) ) { 2365 && (s->last_picture.data[0] || s->low_delay) ) {
2362 uint8_t *src_ptr[3]; 2366 uint8_t *src_ptr[3];
2363 int y, h, offset; 2367 int offset;
2364 y = s->mb_y * 16; 2368 h= FFMIN(h, s->height - y);
2365 h = s->height - y; 2369
2366 if (h > 16) 2370 if(s->pict_type==B_TYPE && s->picture_structure == PICT_FRAME)
2367 h = 16;
2368
2369 if(s->pict_type==B_TYPE)
2370 offset = 0; 2371 offset = 0;
2371 else 2372 else
2372 offset = y * s->linesize; 2373 offset = y * s->linesize;
2373 2374
2374 if(s->pict_type==B_TYPE || s->low_delay){ 2375 if(s->pict_type==B_TYPE || s->low_delay){