From: Jason Garrett-Glaser Date: Fri, 20 Nov 2009 16:04:28 +0000 (-0800) Subject: Only print weightp stats if there were P-frames X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=ed0467756f5a842249d86fb9622006f3939c72a2;p=x264.git Only print weightp stats if there were P-frames --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 0b4117e7..8523d152 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -2566,7 +2566,7 @@ void x264_encoder_close ( x264_t *h ) fixed_pred_modes[i][8] * 100.0 / sum_pred_modes[i] ); } - if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_SMART ) + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_SMART && h->stat.i_frame_count[SLICE_TYPE_P] > 0 ) x264_log( h, X264_LOG_INFO, "Weighted P-Frames: Y:%.1f%%\n", h->stat.i_wpred[0] * 100.0 / h->stat.i_frame_count[SLICE_TYPE_P] );