-q n switch
Reply #4 – 2004-06-06 12:07:47
The best place to look is in the code itself: From the 3.96 code (libmp3lame/lame.c lines 273 to 401) abbreviated: switch (gfp->quality) { case 9: /* no psymodel, no noise shaping */ gfc->filter_type = 0; gfc->psymodel = 0; gfc->quantization = 0; gfc->noise_shaping = 0; gfc->noise_shaping_amp = 0; gfc->noise_shaping_stop = 0; gfc->use_best_huffman = 0; break; ... case 7: /* use psymodel (for short block and m/s switching), but no noise shapping */ gfc->filter_type = 0; gfc->psymodel = 1; gfc->quantization = 0; gfc->noise_shaping = 0; gfc->noise_shaping_amp = 0; gfc->noise_shaping_stop = 0; gfc->use_best_huffman = 0; break; ... case 2: gfc->filter_type = 0; gfc->psymodel = 1; gfc->quantization = 1; if (gfc->noise_shaping == 0) gfc->noise_shaping = 1; if (gfc->substep_shaping != 0) gfc->substep_shaping = 2; gfc->noise_shaping_amp = 1; gfc->noise_shaping_stop = 1; if (gfc->subblock_gain == -1) gfc->subblock_gain = 1; gfc->use_best_huffman = 1; /* inner loop */ break; ... case 0: gfc->filter_type = 0; /* 1 not yet coded */ gfc->psymodel = 1; gfc->quantization = 1; if (gfc->noise_shaping == 0) gfc->noise_shaping = 1; if (gfc->substep_shaping != 0) gfc->substep_shaping = 2; gfc->noise_shaping_amp = 2; gfc->noise_shaping_stop = 1; if (gfc->subblock_gain == -1) gfc->subblock_gain = 1; gfc->use_best_huffman = 2; break; } I took out a bunch of stuff there to make it shorter, so you should go look at the whole thing yourself. This should give you a good idea of what the -q settings do. For real-world effect on quality, you will have to trust your ears.