changeset 11257:837bca3ae69f

constant qscale was broken due to libavcodec changes, fix taken from ve_lavc.c
author ranma
date Fri, 24 Oct 2003 11:34:48 +0000
parents bed47a358d05
children 9627feb8c6fb
files libmpcodecs/vf_lavc.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_lavc.c	Fri Oct 24 07:44:38 2003 +0000
+++ b/libmpcodecs/vf_lavc.c	Fri Oct 24 11:34:48 2003 +0000
@@ -179,7 +179,10 @@
     if(p_quality<32){
 	// fixed qscale
 	lavc_venc_context.flags = CODEC_FLAG_QSCALE;
-	vf->priv->pic->quality = (p_quality<1) ? 1 : p_quality;
+#if LIBAVCODEC_BUILD >= 4668
+	lavc_venc_context.global_quality =
+#endif
+	vf->priv->pic->quality = (int)(FF_QP2LAMBDA * ((p_quality<1) ? 1 : p_quality) + 0.5);
     } else {
 	// fixed bitrate (in kbits)
 	lavc_venc_context.bit_rate = 1000*p_quality;