OSDN Git Service

AC3 dynamic range compression changes. 0 now means a null DRC function. 1 remains...
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 5 Feb 2009 19:36:31 +0000 (19:36 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 5 Feb 2009 19:36:31 +0000 (19:36 +0000)
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://localhost/HandBrake/trunk@2119 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/deca52.c
libhb/work.c

index f983a65..db3b56f 100644 (file)
@@ -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 */
index 4ea0f5e..d5d314c 100644 (file)
@@ -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);
             }