diff options
author | jbrjake <[email protected]> | 2009-02-05 19:36:31 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2009-02-05 19:36:31 +0000 |
commit | 3bbedc4c6431540422ad61db04d3fc7c702b5713 (patch) | |
tree | 7ae4ed4766fec46a0caeaca506e7a9675b4788e9 /libhb/deca52.c | |
parent | 2aa10b785af065063c2120b3d6caad8ecac39532 (diff) |
AC3 dynamic range compression changes. 0 now means a null DRC function. 1 remains the same (default DRC) and >1 still boosts soft sounds.
For the moment, presets and interfaces still assume a default of 1, but the notion is to move to having 0 as the default, in the hope it will be louder/clearer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2119 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deca52.c')
-rw-r--r-- | libhb/deca52.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c index f983a6528..db3b56fe5 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -273,9 +273,16 @@ static hb_buffer_t * Decode( hb_work_object_t * w ) /* Feed liba52 */ a52_frame( pv->state, pv->frame, &pv->flags_out, &pv->level, 0 ); - if ( pv->dynamic_range_compression > 1.0 ) + /* If a user specifies strong dynamic range compression (>1), adjust it. + If a user specifies default dynamic range compression (1), leave it alone. + If a user specifies no dynamic range compression (0), call a null function. */ + if( pv->dynamic_range_compression > 1.0 ) { - a52_dynrng( pv->state, dynrng_call, &pv->dynamic_range_compression); + a52_dynrng( pv->state, dynrng_call, &pv->dynamic_range_compression ); + } + else if( !pv->dynamic_range_compression ) + { + a52_dynrng( pv->state, NULL, NULL ); } /* 6 blocks per frame, 256 samples per block, channelsused channels */ |