summaryrefslogtreecommitdiffstats
path: root/libhb/enclame.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-04-08 16:49:24 +0000
committerjstebbins <[email protected]>2011-04-08 16:49:24 +0000
commitf20621c2d30ad805dfefcab335506f660a133ffe (patch)
tree5d1a3e9e844b94584790b7f002c3fdec39081326 /libhb/enclame.c
parentde122b044e99b0ad1abff0ba51e1a4d9e7d8b020 (diff)
Change internal audio representation range
...from float [-32768...32767] to float [-1.0...1.0] Using the range [-1.0..1.0] requires fewer translations of the range for our various encoders and decoders. This also gets rid of a hacky translation from float to int to float in decavcodec audio decoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3908 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enclame.c')
-rw-r--r--libhb/enclame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/enclame.c b/libhb/enclame.c
index 955aca626..ba05e1fc0 100644
--- a/libhb/enclame.c
+++ b/libhb/enclame.c
@@ -50,6 +50,7 @@ int enclameInit( hb_work_object_t * w, hb_job_t * job )
pv->lame = lame_init();
// use ABR
+ lame_set_scale( pv->lame, 32768.0 );
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 );
@@ -120,7 +121,6 @@ static hb_buffer_t * Encode( hb_work_object_t * w )
hb_list_getbytes( pv->list, pv->buf, pv->input_samples * sizeof( float ),
&pts, &pos);
- memset(samples, 0, 2*1152*sizeof(float));
for( i = 0; i < 1152; i++ )
{
for( j = 0; j < pv->out_discrete_channels; j++ )