Mercurial > libavcodec.hg
comparison libmp3lame.c @ 12495:fac8063ed1e7 libavcodec
Allow float values for libmp3lame quality.
Patch by James Darnley, james D darnley A gmail
author | cehoyos |
---|---|
date | Wed, 15 Sep 2010 22:10:13 +0000 |
parents | fe105c6d28c7 |
children | d9b601af5e5e |
comparison
equal
deleted
inserted
replaced
12494:94eaea836bf4 | 12495:fac8063ed1e7 |
---|---|
59 lame_set_mode(s->gfp, JOINT_STEREO); | 59 lame_set_mode(s->gfp, JOINT_STEREO); |
60 lame_set_brate(s->gfp, avctx->bit_rate/1000); | 60 lame_set_brate(s->gfp, avctx->bit_rate/1000); |
61 if(avctx->flags & CODEC_FLAG_QSCALE) { | 61 if(avctx->flags & CODEC_FLAG_QSCALE) { |
62 lame_set_brate(s->gfp, 0); | 62 lame_set_brate(s->gfp, 0); |
63 lame_set_VBR(s->gfp, vbr_default); | 63 lame_set_VBR(s->gfp, vbr_default); |
64 lame_set_VBR_q(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA); | 64 /* requires lame 3.98 or later */ |
65 lame_set_VBR_quality(s->gfp, avctx->global_quality/(float)FF_QP2LAMBDA); | |
65 } | 66 } |
66 lame_set_bWriteVbrTag(s->gfp,0); | 67 lame_set_bWriteVbrTag(s->gfp,0); |
67 lame_set_disable_reservoir(s->gfp, avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR ? 0 : 1); | 68 lame_set_disable_reservoir(s->gfp, avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR ? 0 : 1); |
68 if (lame_init_params(s->gfp) < 0) | 69 if (lame_init_params(s->gfp) < 0) |
69 goto err_close; | 70 goto err_close; |