diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-26 21:46:01 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-26 21:46:01 +0000 |
commit | ae4b7d5947c0c5ae68141c9d9fe0588a554fad94 (patch) | |
tree | a556ca768b9d453e373353151e70e891b0a87709 /libavcodec | |
parent | db7a2e0d1747bbbc0bf619cf1bdb7ae4332aedbd (diff) | |
download | ffmpeg-ae4b7d5947c0c5ae68141c9d9fe0588a554fad94.tar.gz |
H.263 MCBPC fix
Originally committed as revision 3077 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h263.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 2e9cadd88e..21185dc586 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -496,6 +496,17 @@ void ff_clean_h263_qscales(MpegEncContext *s){ 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; i<s->mb_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 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s){ ff_clean_h263_qscales(s); - for(i=1; i<s->mb_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 |