From: Fiona Glaser Date: Fri, 20 Nov 2009 16:04:28 +0000 (-0800) Subject: Only print weightp stats if there were P-frames X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c86a6de2b4116fd4c83d82cf9e5dec17f2519050;p=libx264 Only print weightp stats if there were P-frames --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 1fc1c7a5..407e4f47 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] );