diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-02 17:18:49 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-02 17:18:49 +0000 |
commit | b89e77cff724f1ea1cb6e23a57aa7fd80ad59f44 (patch) | |
tree | a935dcb2124e3b203894062c07bc21c21c6e0d35 /libavcodec/h263.c | |
parent | 7115cbda3045d99a9ee8845183368247a8478373 (diff) | |
download | ffmpeg-b89e77cff724f1ea1cb6e23a57aa7fd80ad59f44.tar.gz |
Factor out block decoding in ff_h263_decode_mb()
Originally committed as revision 17734 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 2a25cdae67..f4b1360109 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -4005,18 +4005,6 @@ int ff_h263_decode_mb(MpegEncContext *s, 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 @@ int ff_h263_decode_mb(MpegEncContext *s, } 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 @@ intra: 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: |