[FFmpeg-cvslog] vorbisenc: fix quality parameter

Justin Ruggles git at videolan.org
Thu Aug 23 14:41:50 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Aug 20 13:30:44 2012 -0400| [890fddd0ea16aa8fe423820ae83ae1f67978921b] | committer: Justin Ruggles

vorbisenc: fix quality parameter

This generates output with bitrates similar to libvorbis for a given quality
value.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=890fddd0ea16aa8fe423820ae83ae1f67978921b
---

 libavcodec/vorbisenc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 4fd8c32..cdb3af0 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1181,9 +1181,9 @@ static av_cold int vorbis_encode_init(AVCodecContext *avccontext)
         goto error;
 
     if (avccontext->flags & CODEC_FLAG_QSCALE)
-        venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;
+        venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA;
     else
-        venc->quality = 0.03;
+        venc->quality = 3.0;
     venc->quality *= venc->quality;
 
     if ((ret = put_main_header(venc, (uint8_t**)&avccontext->extradata)) < 0)



More information about the ffmpeg-cvslog mailing list