changeset 9993:6e7f3643bee6

optional automatic aspect encoding based on d_width and d_height
author rfelker
date Sat, 26 Apr 2003 16:47:25 +0000
parents e33317c4d9af
children 275766100443
files libmpcodecs/ve_lavc.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ve_lavc.c	Sat Apr 26 12:27:56 2003 +0000
+++ b/libmpcodecs/ve_lavc.c	Sat Apr 26 16:47:25 2003 +0000
@@ -95,6 +95,7 @@
 static int lavc_param_fdct=0;
 static int lavc_param_idct=0;
 static char* lavc_param_aspect = NULL;
+static int lavc_param_autoaspect = 0;
 static float lavc_param_lumi_masking= 0.0;
 static float lavc_param_dark_masking= 0.0;
 static float lavc_param_temporal_cplx_masking= 0.0;
@@ -171,6 +172,7 @@
 	{"vrc_init_cplx", &lavc_param_rc_initial_cplx, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9999999.0, NULL},
         {"vfdct", &lavc_param_fdct, CONF_TYPE_INT, CONF_RANGE, 0, 10, NULL},
 	{"aspect", &lavc_param_aspect, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"autoaspect", &lavc_param_autoaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"lumi_mask", &lavc_param_lumi_masking, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
 	{"tcplx_mask", &lavc_param_temporal_cplx_masking, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
 	{"scplx_mask", &lavc_param_spatial_cplx_masking, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
@@ -365,6 +367,8 @@
 	    return 0;
 	}
     }
+    else if (lavc_param_autoaspect)
+	lavc_venc_context->aspect_ratio = (float)d_width/d_height;
 
     /* keyframe interval */
     if (lavc_param_keyint >= 0) /* != -1 */