OSDN Git Service

tweak audio bitrate limits
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 11 Nov 2010 05:11:22 +0000 (05:11 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 11 Nov 2010 05:11:22 +0000 (05:11 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@3672 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.c

index 776d0a7..f1926e9 100644 (file)
@@ -188,13 +188,15 @@ void hb_get_audio_bitrate_limits(uint32_t codec, int samplerate, int mixdown, in
             if (samplerate > 24000)
             {
                 *high = 160 * channels;
+                if (*high > 768)
+                    *high = 768;
             }
             else
             {
-                *high = 128 * channels;
+                *high = 96 * channels;
+                if (*high > 480)
+                    *high = 480;
             }
-            if (*high > 768)
-                *high = 768;
             break;
 
         case HB_ACODEC_VORBIS:
@@ -226,6 +228,14 @@ void hb_get_audio_bitrate_limits(uint32_t codec, int samplerate, int mixdown, in
             }
             break;
 
+        case HB_ACODEC_LAME:
+            *low = hb_audio_bitrates[0].rate;
+            if (samplerate > 24000)
+                *high = 320;
+            else
+                *high = 160;
+            break;
+        
         default:
             *low = hb_audio_bitrates[0].rate;
             *high = hb_audio_bitrates[hb_audio_bitrates_count-1].rate;