# HG changeset patch # User michael # Date 1083015961 0 # Node ID 1205bf58c420d2bfad13fe7597fe31427d14aaea # Parent 800db77ec7c8e7a5bb1688081d7388ecb72185eb H.263 MCBPC fix diff -r 800db77ec7c8 -r 1205bf58c420 h263.c --- a/h263.c Mon Apr 26 09:43:55 2004 +0000 +++ b/h263.c Mon Apr 26 21:46:01 2004 +0000 @@ -496,6 +496,17 @@ if(qscale_table[ s->mb_index2xy[i] ] - qscale_table[ s->mb_index2xy[i+1] ] >2) qscale_table[ s->mb_index2xy[i] ]= qscale_table[ s->mb_index2xy[i+1] ]+2; } + + if(s->codec_id != CODEC_ID_H263P){ + for(i=1; imb_num; i++){ + int mb_xy= s->mb_index2xy[i]; + + if(qscale_table[mb_xy] != qscale_table[s->mb_index2xy[i-1]] && (s->mb_type[mb_xy]&CANDIDATE_MB_TYPE_INTER4V)){ + s->mb_type[mb_xy]&= ~CANDIDATE_MB_TYPE_INTER4V; + s->mb_type[mb_xy]|= CANDIDATE_MB_TYPE_INTER; + } + } + } } /** @@ -507,15 +518,6 @@ ff_clean_h263_qscales(s); - for(i=1; imb_num; i++){ - int mb_xy= s->mb_index2xy[i]; - - if(qscale_table[mb_xy] != qscale_table[s->mb_index2xy[i-1]] && (s->mb_type[mb_xy]&CANDIDATE_MB_TYPE_INTER4V)){ - s->mb_type[mb_xy]&= ~CANDIDATE_MB_TYPE_INTER4V; - s->mb_type[mb_xy]|= CANDIDATE_MB_TYPE_INTER; - } - } - if(s->pict_type== B_TYPE){ int odd=0; /* ok, come on, this isnt funny anymore, theres more code for handling this mpeg4 mess than