]> git.videolan.org Git - x264.git/commitdiff
Write --crop-rect and --frame-packing options to x264 SEI
authorAnton Mitrofanov <BugMaster@narod.ru>
Fri, 24 Dec 2010 21:55:14 +0000 (00:55 +0300)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 10 Jan 2011 19:38:45 +0000 (11:38 -0800)
common/common.c

index 8425865843588758d477489d370ac6f63141f0b4..f92dc2597711f27ba9ffb8574d3217cac45b30a6 100644 (file)
@@ -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;
 }