Mercurial > libavcodec.hg
comparison libvorbis.c @ 8781:0960d775e97b libavcodec
libvorbis: Use 0-10 range for audio quality.
Patch by Nicolas George (nicolas george normalesup org)
author | jbr |
---|---|
date | Mon, 09 Feb 2009 22:11:28 +0000 |
parents | e9d9d946f213 |
children | 043574c5c153 |
comparison
equal
deleted
inserted
replaced
8780:56c41adae7d8 | 8781:0960d775e97b |
---|---|
55 | 55 |
56 if(avccontext->flags & CODEC_FLAG_QSCALE) { | 56 if(avccontext->flags & CODEC_FLAG_QSCALE) { |
57 /* variable bitrate */ | 57 /* variable bitrate */ |
58 if(vorbis_encode_setup_vbr(vi, avccontext->channels, | 58 if(vorbis_encode_setup_vbr(vi, avccontext->channels, |
59 avccontext->sample_rate, | 59 avccontext->sample_rate, |
60 avccontext->global_quality / (float)FF_QP2LAMBDA)) | 60 avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0)) |
61 return -1; | 61 return -1; |
62 } else { | 62 } else { |
63 /* constant bitrate */ | 63 /* constant bitrate */ |
64 if(vorbis_encode_setup_managed(vi, avccontext->channels, | 64 if(vorbis_encode_setup_managed(vi, avccontext->channels, |
65 avccontext->sample_rate, -1, avccontext->bit_rate, -1)) | 65 avccontext->sample_rate, -1, avccontext->bit_rate, -1)) |