Commit f65b3613 authored by benoit's avatar benoit

Use compression level to set mp3lame quality option.

Patch by Nicolas George nicolas george normalesup org
Original thread:
[PATCH] libmp3lame: set noise shaping & psychoacoustic algorithms quality
Date: 07/31/2008 03:53 PM


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14494 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 099468b9
......@@ -50,8 +50,11 @@ static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
lame_set_in_samplerate(s->gfp, avctx->sample_rate);
lame_set_out_samplerate(s->gfp, avctx->sample_rate);
lame_set_num_channels(s->gfp, avctx->channels);
/* lame 3.91 dies on quality != 5 */
lame_set_quality(s->gfp, 5);
if(avctx->compression_level == FF_COMPRESSION_DEFAULT) {
lame_set_quality(s->gfp, 5);
} else {
lame_set_quality(s->gfp, avctx->compression_level);
}
/* lame 3.91 doesn't work in mono */
lame_set_mode(s->gfp, JOINT_STEREO);
lame_set_brate(s->gfp, avctx->bit_rate/1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment