+
+ if( h->param.i_log_level < X264_LOG_INFO )
+ {
+ h->param.analyse.b_psnr = 0;
+ h->param.analyse.b_ssim = 0;
+ }
+ /* Warn users trying to measure PSNR/SSIM with psy opts on. */
+ if( h->param.analyse.b_psnr || h->param.analyse.b_ssim )
+ {
+ char *s = NULL;
+
+ if( h->param.analyse.b_psy )
+ {
+ s = h->param.analyse.b_psnr ? "psnr" : "ssim";
+ x264_log( h, X264_LOG_WARNING, "--%s used with psy on: results will be invalid!\n", s );
+ }
+ else if( !h->param.rc.i_aq_mode && h->param.analyse.b_ssim )
+ {
+ x264_log( h, X264_LOG_WARNING, "--ssim used with AQ off: results will be invalid!\n" );
+ s = "ssim";
+ }
+ else if( h->param.rc.i_aq_mode && h->param.analyse.b_psnr )
+ {
+ x264_log( h, X264_LOG_WARNING, "--psnr used with AQ on: results will be invalid!\n" );
+ s = "psnr";
+ }
+ if( s )
+ x264_log( h, X264_LOG_WARNING, "--tune %s should be used if attempting to benchmark %s!\n", s, s );
+ }
+