diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-04-02 09:57:34 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-04-02 09:57:34 +0000 |
commit | 4d2a48349d6f40a2357bb25b4f360f2a6e669ad4 (patch) | |
tree | 7ff32c6ab3f7e58dd201f2a05093f404cd35908c /libavcodec/h263.c | |
parent | 1f9aea9b91c653c6ad95e84b2ff250738e352eec (diff) | |
download | ffmpeg-4d2a48349d6f40a2357bb25b4f360f2a6e669ad4.tar.gz |
msmpeg4 2pass support & some related cleanup
Originally committed as revision 1724 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 2e7e19e2a9..d6da47ad48 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -544,9 +544,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->misc_bits+= bits - s->last_bits; - s->last_bits=bits; + s->misc_bits+= get_bits_diff(s); } switch(mb_type) @@ -589,9 +587,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->mv_bits+= bits - s->last_bits; - s->last_bits=bits; + s->mv_bits+= get_bits_diff(s); } /* encode each block */ @@ -600,9 +596,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->p_tex_bits+= bits - s->last_bits; - s->last_bits=bits; + s->p_tex_bits+= get_bits_diff(s); } }else{ /* s->pict_type==B_TYPE */ if ((cbp | motion_x | motion_y | s->dquant) == 0 && s->mv_type==MV_TYPE_16X16) { @@ -673,9 +667,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->misc_bits+= bits - s->last_bits; - s->last_bits=bits; + s->misc_bits+= get_bits_diff(s); } /* motion vectors: 16x16 mode */ @@ -698,9 +690,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->misc_bits+= bits - s->last_bits; - s->last_bits=bits; + s->misc_bits+= get_bits_diff(s); } for(i=0; i<4; i++){ @@ -713,9 +703,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->mv_bits+= bits - s->last_bits; - s->last_bits=bits; + s->mv_bits+= get_bits_diff(s); } /* encode each block */ @@ -724,9 +712,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->p_tex_bits+= bits - s->last_bits; - s->last_bits=bits; + s->p_tex_bits+= get_bits_diff(s); } s->f_count++; } @@ -803,9 +789,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->misc_bits+= bits - s->last_bits; - s->last_bits=bits; + s->misc_bits+= get_bits_diff(s); } /* encode each block */ @@ -814,9 +798,7 @@ void mpeg4_encode_mb(MpegEncContext * s, } if(interleaved_stats){ - bits= get_bit_count(&s->pb); - s->i_tex_bits+= bits - s->last_bits; - s->last_bits=bits; + s->i_tex_bits+= get_bits_diff(s); } s->i_count++; |