X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fenclame.c;h=a3f4a388282233ef5ffb06757b3e69369f7386e2;hb=3e441ebb595c36a1f2f029e4ce907bb1bffaea50;hp=027aa3add0645a82f98a7e2622f1a30a08181465;hpb=c50e2d26d0e6a700cc2b29db7746f2f2463b8e21;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/enclame.c b/libhb/enclame.c index 027aa3ad..a3f4a388 100644 --- a/libhb/enclame.c +++ b/libhb/enclame.c @@ -48,10 +48,19 @@ int enclameInit( hb_work_object_t * w, hb_job_t * job ) hb_log( "enclame: opening libmp3lame" ); pv->lame = lame_init(); - lame_set_brate( pv->lame, audio->config.out.bitrate ); + // use ABR + lame_set_VBR( pv->lame, vbr_abr ); + lame_set_VBR_mean_bitrate_kbps( pv->lame, audio->config.out.bitrate ); lame_set_in_samplerate( pv->lame, audio->config.out.samplerate ); lame_set_out_samplerate( pv->lame, audio->config.out.samplerate ); lame_init_params( pv->lame ); + // Lame's default encoding mode is JOINT_STEREO. This subtracts signal + // that is "common" to left and right (within some threshold) and encodes + // it separately. This improves quality at low bitrates, but hurts + // imaging (channel separation) at higher bitrates. So if the bitrate + // is suffeciently high, use regular STEREO mode. + if ( audio->config.out.bitrate >= 128 ) + lame_set_mode( pv->lame, STEREO ); pv->input_samples = 1152 * 2; pv->output_bytes = LAME_MAXMP3BUFFER;