Commit fcc67cf1 authored by michael's avatar michael

rv10/obmc fixes


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2768 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f1767683
...@@ -3866,8 +3866,15 @@ int ff_h263_decode_mb(MpegEncContext *s, ...@@ -3866,8 +3866,15 @@ int ff_h263_decode_mb(MpegEncContext *s,
} }
} }
/* decode each block */
for (i = 0; i < 6; i++) {
if (h263_decode_block(s, block[i], i, cbp&32) < 0)
return -1;
cbp+=cbp;
}
if(s->obmc){ if(s->obmc){
if(s->pict_type == P_TYPE && s->mb_x+1<s->mb_width) if(s->pict_type == P_TYPE && s->mb_x+1<s->mb_width && s->mb_num_left != 1)
preview_obmc(s); preview_obmc(s);
} }
} else if(s->pict_type==B_TYPE) { } else if(s->pict_type==B_TYPE) {
...@@ -3957,6 +3964,13 @@ int ff_h263_decode_mb(MpegEncContext *s, ...@@ -3957,6 +3964,13 @@ int ff_h263_decode_mb(MpegEncContext *s,
} }
s->current_picture.mb_type[xy]= mb_type; s->current_picture.mb_type[xy]= mb_type;
/* decode each block */
for (i = 0; i < 6; i++) {
if (h263_decode_block(s, block[i], i, cbp&32) < 0)
return -1;
cbp+=cbp;
}
} else { /* I-Frame */ } else { /* I-Frame */
do{ do{
cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2); cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2);
...@@ -3989,13 +4003,13 @@ intra: ...@@ -3989,13 +4003,13 @@ intra:
if (dquant) { if (dquant) {
h263_decode_dquant(s); h263_decode_dquant(s);
} }
}
/* decode each block */ /* decode each block */
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
if (h263_decode_block(s, block[i], i, cbp&32) < 0) if (h263_decode_block(s, block[i], i, cbp&32) < 0)
return -1; return -1;
cbp+=cbp; cbp+=cbp;
}
} }
end: end:
......
...@@ -449,6 +449,12 @@ static int rv10_decode_init(AVCodecContext *avctx) ...@@ -449,6 +449,12 @@ static int rv10_decode_init(AVCodecContext *avctx)
s->h263_long_vectors=0; s->h263_long_vectors=0;
s->low_delay=1; s->low_delay=1;
break; break;
case 0x10002000:
s->rv10_version= 3;
s->h263_long_vectors=1;
s->low_delay=1;
s->obmc=1;
break;
case 0x10003000: case 0x10003000:
s->rv10_version= 3; s->rv10_version= 3;
s->h263_long_vectors=1; s->h263_long_vectors=1;
...@@ -586,13 +592,14 @@ static int rv10_decode_packet(AVCodecContext *avctx, ...@@ -586,13 +592,14 @@ static int rv10_decode_packet(AVCodecContext *avctx,
s->block_wrap[5]= s->mb_width + 2; s->block_wrap[5]= s->mb_width + 2;
ff_init_block_index(s); ff_init_block_index(s);
/* decode each macroblock */ /* decode each macroblock */
for(i=0;i<mb_count;i++) {
for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) {
int ret; int ret;
ff_update_block_index(s); ff_update_block_index(s);
#ifdef DEBUG #ifdef DEBUG
printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y); printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y);
#endif #endif
s->dsp.clear_blocks(s->block[0]); s->dsp.clear_blocks(s->block[0]);
s->mv_dir = MV_DIR_FORWARD; s->mv_dir = MV_DIR_FORWARD;
s->mv_type = MV_TYPE_16X16; s->mv_type = MV_TYPE_16X16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment