From 103e79653b40000f8cdb481d9732f98f188be966 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Sat, 25 Dec 2010 00:55:14 +0300 Subject: [PATCH] Write --crop-rect and --frame-packing options to x264 SEI --- common/common.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/common/common.c b/common/common.c index 84258658..f92dc259 100644 --- a/common/common.c +++ b/common/common.c @@ -1287,6 +1287,15 @@ char *x264_param2string( x264_param_t *p, int b_res ) } else if( p->rc.i_rc_method == X264_RC_CQP ) s += sprintf( s, " qp=%d", p->rc.i_qp_constant ); + + if( p->rc.i_vbv_buffer_size ) + s += sprintf( s, " nal_hrd=%s", x264_nal_hrd_names[p->i_nal_hrd] ); + if( p->crop_rect.i_left | p->crop_rect.i_top | p->crop_rect.i_right | p->crop_rect.i_bottom ) + s += sprintf( s, " crop_rect=%u,%u,%u,%u", p->crop_rect.i_left, p->crop_rect.i_top, + p->crop_rect.i_right, p->crop_rect.i_bottom ); + if( p->i_frame_packing >= 0 ) + s += sprintf( s, " frame-packing=%d", p->i_frame_packing ); + if( !(p->rc.i_rc_method == X264_RC_CQP && p->rc.i_qp_constant == 0) ) { s += sprintf( s, " ip_ratio=%.2f", p->rc.f_ip_factor ); @@ -1301,8 +1310,6 @@ char *x264_param2string( x264_param_t *p, int b_res ) s += sprintf( s, " zones" ); } - if( p->rc.i_vbv_buffer_size ) - s += sprintf( s, " nal_hrd=%s", x264_nal_hrd_names[p->i_nal_hrd] ); return buf; } -- 2.47.3