[Mplayer-cvslog] CVS: main/libmpcodecs ve_xvid4.c,1.3,1.4
Attila Kinali CVS
attila at mplayerhq.hu
Thu Jan 29 11:41:54 CET 2004
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv28676
Modified Files:
ve_xvid4.c
Log Message:
this patch is for xvid4.
It adds support for lavc's style display aspect ratio (based on xvid's
vfw frontend)
and re-enables the chroma_optimizer option.
patch by Nico <nsabbi at tiscali.it>
Index: ve_xvid4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid4.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ve_xvid4.c 8 Dec 2003 16:56:46 -0000 1.3
+++ ve_xvid4.c 29 Jan 2004 10:41:52 -0000 1.4
@@ -76,6 +76,7 @@
static int xvidenc_cartoon = 0;
static int xvidenc_hqacpred = 1;
static int xvidenc_chromame = 0;
+static int xvidenc_chroma_opt = 0;
static int xvidenc_vhq = 0;
static int xvidenc_motion = 6;
static int xvidenc_stats = 0;
@@ -111,6 +112,7 @@
static char *xvidenc_par = NULL;
static int xvidenc_par_width = 0;
static int xvidenc_par_height = 0;
+static float xvidenc_dar_aspect = NULL;
m_option_t xvidencopts_conf[] =
{
@@ -123,6 +125,7 @@
{"quant_type", &xvidenc_quant_method, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"me_quality", &xvidenc_motion, CONF_TYPE_INT, CONF_RANGE, 0, 6, NULL},
{"chroma_me", &xvidenc_chromame, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ {"chroma_opt", &xvidenc_chroma_opt, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"vhq", &xvidenc_vhq, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL},
{"max_bframes", &xvidenc_max_bframes, CONF_TYPE_INT, CONF_RANGE, 0, 20, NULL},
{"bquant_ratio", &xvidenc_bquant_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 200, NULL},
@@ -172,6 +175,7 @@
{"par", &xvidenc_par, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"par_width", &xvidenc_par_width, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
{"par_height", &xvidenc_par_height, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
+ {"aspect", &xvidenc_dar_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
/* End of the config array */
{NULL, 0, 0, 0, 0, 0, NULL}
@@ -652,6 +656,9 @@
if(xvidenc_hqacpred) {
frame->vop_flags |= XVID_VOP_HQACPRED;
}
+ if(xvidenc_chroma_opt) {
+ frame->vop_flags |= XVID_VOP_CHROMAOPT;
+ }
if(xvidenc_motion > 4) {
frame->vop_flags |= XVID_VOP_INTER4V;
}
@@ -686,6 +693,19 @@
frame->bframe_threshold = xvidenc_bframe_threshold;
frame->par = 0;
+ if(xvidenc_dar_aspect > 0)
+ {
+ int dar_x, dar_y;
+
+ dar_x = xvidenc_dar_aspect * 100;
+ dar_y = 100;
+
+ frame->par = XVID_PAR_EXT;
+ frame->par_width = (100 * mod->mux->bih->biHeight) / dar_y;
+ frame->par_height= (100 * mod->mux->bih->biWidth) / dar_x;
+ }
+ else
+ {
if(xvidenc_par != NULL) {
if(strcasecmp(xvidenc_par, "pal43") == 0)
frame->par = XVID_PAR_43_PAL;
@@ -712,6 +732,7 @@
else
frame->par_height = 1;
}
+ }
return;
}
More information about the MPlayer-cvslog
mailing list