[MPlayer-dev-eng] -lavcopts=bit_exact patch

Steven M. Schultz sms at 2BSD.COM
Fri Feb 6 23:50:55 CET 2004


Greetings -

	libavcodec has the option "bit_exact".  The comment for that option
	(in libavcodec/opts.c) says "use only bit-exact stuff" - HOWEVER,
	the 'bit_exact' flags also turns off non-standard behaviour which
	causes playback problems with some programs (Apple's Quicktime Player
	for example).

	I think it would be a good idea to expose that part of libavcodec's
	API to mencoder.

	I have attached a small patch which implments "-lavcopts=bit_exact".

	Is this in good format and otherwise acceptable?

	Cheers,
	Steven Schultz
-------------- next part --------------
--- libmpcodecs/ve_lavc.c.dist	Tue Feb  3 20:47:37 2004
+++ libmpcodecs/ve_lavc.c	Fri Feb  6 14:28:24 2004
@@ -120,6 +120,7 @@
 static int lavc_param_dia_size= 0;
 static int lavc_param_qpel= 0;
 static int lavc_param_trell= 0;
+static int lavc_param_bit_exact = 0;
 static int lavc_param_aic= 0;
 static int lavc_param_aiv= 0;
 static int lavc_param_umv= 0;
@@ -230,6 +231,7 @@
 #ifdef FF_CMP_VSAD
         {"ildctcmp", &lavc_param_ildct_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
 #endif
+        {"bit_exact", &lavc_param_bit_exact, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_BITEXACT, NULL},
         {"predia", &lavc_param_pre_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
         {"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
 	{"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
@@ -560,6 +562,7 @@
 #if LIBAVCODEC_BUILD >= 4648
     lavc_venc_context->flags|= lavc_param_trell;
 #endif 
+    lavc_venc_context->flags|= lavc_param_bit_exact;
     lavc_venc_context->flags|= lavc_param_aic;
     lavc_venc_context->flags|= lavc_param_aiv;
     lavc_venc_context->flags|= lavc_param_umv;


More information about the MPlayer-dev-eng mailing list