[x264-devel] commit: Only print weightp stats if there were P-frames ( Jason Garrett-Glaser )

git version control git at videolan.org
Mon Nov 23 15:17:19 CET 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Fri Nov 20 08:04:28 2009 -0800| [ed0467756f5a842249d86fb9622006f3939c72a2] | committer: Jason Garrett-Glaser 

Only print weightp stats if there were P-frames

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ed0467756f5a842249d86fb9622006f3939c72a2
---

 encoder/encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index 0b4117e..8523d15 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] );
 



More information about the x264-devel mailing list