Factor out block decoding in ff_h263_decode_mb()
Originally committed as revision 17734 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7115cbda30
commit
b89e77cff7
@ -4005,18 +4005,6 @@ int ff_h263_decode_mb(MpegEncContext *s,
|
|||||||
mot_val[1] = my;
|
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) {
|
} else if(s->pict_type==FF_B_TYPE) {
|
||||||
int mb_type;
|
int mb_type;
|
||||||
const int stride= s->b8_stride;
|
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;
|
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);
|
||||||
@ -4146,6 +4127,7 @@ 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++) {
|
||||||
@ -4153,6 +4135,10 @@ intra:
|
|||||||
return -1;
|
return -1;
|
||||||
cbp+=cbp;
|
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:
|
end:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user