Mercurial > libavcodec.hg
changeset 9093:e9ba8210d495 libavcodec
Factor out block decoding in ff_h263_decode_mb()
author | kostya |
---|---|
date | Mon, 02 Mar 2009 17:18:49 +0000 |
parents | 65f47b345904 |
children | 39425084bd5c |
files | h263.c |
diffstat | 1 files changed, 12 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/h263.c Mon Mar 02 15:13:58 2009 +0000 +++ b/h263.c Mon Mar 02 17:18:49 2009 +0000 @@ -4005,18 +4005,6 @@ mot_val[1] = my; } } - - /* 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->pict_type == FF_P_TYPE && s->mb_x+1<s->mb_width && s->mb_num_left != 1) - preview_obmc(s); - } } else if(s->pict_type==FF_B_TYPE) { int mb_type; const int stride= s->b8_stride; @@ -4105,13 +4093,6 @@ } 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 */ do{ cbpc = get_vlc2(&s->gb, intra_MCBPC_vlc.table, INTRA_MCBPC_VLC_BITS, 2); @@ -4146,13 +4127,18 @@ if (dquant) { h263_decode_dquant(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; - } + } + + /* 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 && !s->mb_intra){ + if(s->pict_type == FF_P_TYPE && s->mb_x+1<s->mb_width && s->mb_num_left != 1) + preview_obmc(s); } end: