lavc/libmp3lame: add comments about CBR/VBR modes
authorTimothy Gu <timothygu99@gmail.com>
Thu, 24 Oct 2013 03:57:36 +0000 (20:57 -0700)
committerStefano Sabatini <stefasab@gmail.com>
Thu, 24 Oct 2013 09:32:56 +0000 (11:32 +0200)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
libavcodec/libmp3lame.c

index 6402d3e..0fb9c6a 100644 (file)
@@ -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);
     }