# HG changeset patch # User ranma # Date 1066995288 0 # Node ID 837bca3ae69f4a11743a6c60506a9c43c1118aa3 # Parent bed47a358d05a1957ae97becd49ae5e615932ba5 constant qscale was broken due to libavcodec changes, fix taken from ve_lavc.c diff -r bed47a358d05 -r 837bca3ae69f libmpcodecs/vf_lavc.c --- 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;