summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2009-02-05 19:36:31 +0000
committerjbrjake <[email protected]>2009-02-05 19:36:31 +0000
commit3bbedc4c6431540422ad61db04d3fc7c702b5713 (patch)
tree7ae4ed4766fec46a0caeaca506e7a9675b4788e9 /libhb
parent2aa10b785af065063c2120b3d6caad8ecac39532 (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')
-rw-r--r--libhb/deca52.c11
-rw-r--r--libhb/work.c2
2 files changed, 10 insertions, 3 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 */
diff --git a/libhb/work.c b/libhb/work.c
index 4ea0f5ebd..d5d314c25 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -312,7 +312,7 @@ void hb_display_job_info( hb_job_t * job )
}
}
- if ( audio->config.out.dynamic_range_compression > 1 && (audio->config.out.codec != HB_ACODEC_AC3) && (audio->config.out.codec != HB_ACODEC_DCA))
+ if ( audio->config.out.dynamic_range_compression && (audio->config.out.codec != HB_ACODEC_AC3) && (audio->config.out.codec != HB_ACODEC_DCA))
{
hb_log(" + dynamic range compression: %f", audio->config.out.dynamic_range_compression);
}