diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-21 18:24:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-23 20:31:05 +0100 |
commit | dca463b728c1d2c228b7b911dac812300bd0258b (patch) | |
tree | 2175fdc4ce66620d6c14262445f1e400b484148a /libavcodec/ratecontrol.c | |
parent | 25b462cab9493e7a50a5fe0602895a3a9554f5a8 (diff) | |
download | ffmpeg-dca463b728c1d2c228b7b911dac812300bd0258b.tar.gz |
avcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit
This avoids a hypothetical integer overflow with very high resolution video
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e92a78a4095d69d876bef189225608a35166dc4a)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 7db248ecf5..31eae5ba89 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -46,7 +46,7 @@ void ff_write_pass1_stats(MpegEncContext *s) { snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d " - "fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", + "fcode:%d bcode:%d mc-var:%"PRId64" var:%"PRId64" icount:%d skipcount:%d hbits:%d;\n", s->current_picture_ptr->f.display_picture_number, s->current_picture_ptr->f.coded_picture_number, s->pict_type, @@ -879,7 +879,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) if (s->avctx->debug & FF_DEBUG_RC) { av_log(s->avctx, AV_LOG_DEBUG, "%c qp:%d<%2.1f<%d %d want:%d total:%d comp:%f st_q:%2.2f " - "size:%d var:%d/%d br:%d fps:%d\n", + "size:%d var:%"PRId64"/%"PRId64" br:%d fps:%d\n", av_get_picture_type_char(pict_type), qmin, q, qmax, picture_number, (int)wanted_bits / 1000, (int)s->total_bits / 1000, |