From 5f2972dfd077a26ae2880cf948622b10595247ef Mon Sep 17 00:00:00 2001 From: Alexander Prikhodko Date: Wed, 7 Apr 2010 12:24:22 +0300 Subject: [PATCH] Print encoder settings and more precision for CRF --- common/common.c | 2 +- encoder/encoder.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/common/common.c b/common/common.c index 2d166af..6f287f6 100644 --- a/common/common.c +++ b/common/common.c @@ -1242,7 +1242,7 @@ char *x264_param2string( x264_param_t *p, int b_res ) if( p->rc.i_rc_method == X264_RC_ABR || p->rc.i_rc_method == X264_RC_CRF ) { if( p->rc.i_rc_method == X264_RC_CRF ) - s += sprintf( s, " crf=%.1f", p->rc.f_rf_constant ); + s += sprintf( s, " crf=%.4f", p->rc.f_rf_constant ); else s += sprintf( s, " bitrate=%d ratetol=%.1f", p->rc.i_bitrate, p->rc.f_rate_tolerance ); diff --git a/encoder/encoder.c b/encoder/encoder.c index 66730c3..c194a94 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1058,6 +1058,10 @@ x264_t *x264_encoder_open( x264_param_t *param ) goto fail; } + char *opts = x264_param2string( &h->param, 0 ); + x264_log( h, X264_LOG_INFO, "%s\n", opts ); + x264_free( opts ); + h->out.i_nal = 0; h->out.i_bitstream = X264_MAX( 1000000, h->param.i_width * h->param.i_height * 4 * ( h->param.rc.i_rc_method == X264_RC_ABR ? pow( 0.95, h->param.rc.i_qp_min ) -- 1.7.0.2.msysgit.0