Skip to content
Snippets Groups Projects
Commit 07e7bc9c authored by Timothy Gu's avatar Timothy Gu Committed by Stefano Sabatini
Browse files

lavc/libmp3lame: add comments about CBR/VBR modes

parent 683d9cb1
No related branches found
No related tags found
No related merge requests found
...@@ -115,11 +115,11 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx) ...@@ -115,11 +115,11 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
lame_set_quality(s->gfp, avctx->compression_level); lame_set_quality(s->gfp, avctx->compression_level);
/* rate control */ /* 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(s->gfp, vbr_default);
lame_set_VBR_quality(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA); lame_set_VBR_quality(s->gfp, avctx->global_quality / (float)FF_QP2LAMBDA);
} else { } else {
if (avctx->bit_rate) if (avctx->bit_rate) // CBR
lame_set_brate(s->gfp, avctx->bit_rate / 1000); lame_set_brate(s->gfp, avctx->bit_rate / 1000);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment