[FFmpeg-cvslog] avcodec/wmv2enc: Collect statistics for 2 pass encoding
Michael Niedermayer
git at videolan.org
Fri Nov 1 00:49:47 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 1 00:40:33 2013 +0100| [ec5e02d49573975ee4bc73be173a2fad76d808ff] | committer: Michael Niedermayer
avcodec/wmv2enc: Collect statistics for 2 pass encoding
Fixes Ticket3053
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec5e02d49573975ee4bc73be173a2fad76d808ff
---
libavcodec/wmv2enc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index ab5e085..6aeee59 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -169,10 +169,12 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][1],
ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][0]);
+ s->misc_bits += get_bits_diff(s);
/* motion vector */
ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
ff_msmpeg4_encode_motion(s, motion_x - pred_x,
motion_y - pred_y);
+ s->mv_bits += get_bits_diff(s);
} else {
/* compute cbp */
cbp = 0;
@@ -203,11 +205,16 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
s->h263_aic_dir=0;
put_bits(&s->pb, ff_table_inter_intra[s->h263_aic_dir][1], ff_table_inter_intra[s->h263_aic_dir][0]);
}
+ s->misc_bits += get_bits_diff(s);
}
for (i = 0; i < 6; i++) {
ff_msmpeg4_encode_block(s, block[i], i);
}
+ if (s->mb_intra)
+ s->i_tex_bits += get_bits_diff(s);
+ else
+ s->p_tex_bits += get_bits_diff(s);
}
AVCodec ff_wmv2_encoder = {
More information about the ffmpeg-cvslog
mailing list