# HG changeset patch # User michael # Date 1074394741 0 # Node ID 8336c5e147654a18ec8053e7952029a5cc3194ca # Parent 8cfd36bfe504e00aa8b21d176fdf3addd61bdf21 rv20 mv prediction in b frames fix diff -r 8cfd36bfe504 -r 8336c5e14765 rv10.c --- a/rv10.c Thu Jan 15 01:29:26 2004 +0000 +++ b/rv10.c Sun Jan 18 02:59:01 2004 +0000 @@ -547,6 +547,10 @@ return -1; } + if(s->pict_type == B_TYPE){ //FIXME remove after cleaning mottion_val indexing + memset(s->current_picture.motion_val[0], 0, sizeof(int16_t)*2*(s->mb_width*2+2)*(s->mb_height*2+2)); + } + #ifdef DEBUG printf("qscale=%d\n", s->qscale); #endif @@ -575,7 +579,7 @@ s->rv10_first_dc_coded[0] = 0; s->rv10_first_dc_coded[1] = 0; s->rv10_first_dc_coded[2] = 0; - +//printf("%d %X %X\n", s->pict_type, s->current_picture.motion_val[0], s->current_picture.motion_val[1]); s->block_wrap[0]= s->block_wrap[1]= s->block_wrap[2]= @@ -600,7 +604,8 @@ av_log(s->avctx, AV_LOG_ERROR, "ERROR at MB %d %d\n", s->mb_x, s->mb_y); return -1; } - ff_h263_update_motion_val(s); + if(s->pict_type != B_TYPE) + ff_h263_update_motion_val(s); MPV_decode_mb(s, s->block); if(s->loop_filter) ff_h263_loop_filter(s); @@ -635,7 +640,7 @@ *data_size = 0; return 0; } - + if(avctx->slice_count){ for(i=0; islice_count; i++){ int offset= avctx->slice_offset[i];