aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libmp3lame.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2013-10-23 20:57:36 -0700
committerStefano Sabatini <stefasab@gmail.com>2013-10-24 11:32:56 +0200
commit07e7bc9cbda12921ddf0ae6bbbf9328f29c3c63e (patch)
tree9a693e12bb9c1d91f9bb4e38c62c90e895e0532a /libavcodec/libmp3lame.c
parent683d9cb1f28296ab8350a169146b07fd0adc36dd (diff)
downloadandroid_external_ffmpeg-07e7bc9cbda12921ddf0ae6bbbf9328f29c3c63e.tar.gz
android_external_ffmpeg-07e7bc9cbda12921ddf0ae6bbbf9328f29c3c63e.tar.bz2
android_external_ffmpeg-07e7bc9cbda12921ddf0ae6bbbf9328f29c3c63e.zip
lavc/libmp3lame: add comments about CBR/VBR modes
Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'libavcodec/libmp3lame.c')
-rw-r--r--libavcodec/libmp3lame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 6402d3e0e3..0fb9c6a3b1 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -115,11 +115,11 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
lame_set_quality(s->gfp, avctx->compression_level);
/* rate control */
- if (avctx->flags & CODEC_FLAG_QSCALE) {
+ if (avctx->flags & CODEC_FLAG_QSCALE) { // VBR
lame_set_VBR(s->gfp, vbr_default);
lame_set_VBR_quality(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA);
} else {
- if (avctx->bit_rate)
+ if (avctx->bit_rate) // CBR
lame_set_brate(s->gfp, avctx->bit_rate / 1000);
}