All pastes #835893 Raw Edit

Mine

public diff v1 · immutable
#835893 ·published 2007-12-29 02:41 UTC
rendered paste body
Index: HandBrake-vorbis/libhb/encvorbis.c===================================================================--- HandBrake-vorbis/libhb/encvorbis.c	(revision 966)+++ HandBrake-vorbis/libhb/encvorbis.c	(working copy)@@ -56,11 +56,24 @@      hb_log( "encvorbis: opening libvorbis" ); -    /* 28kbps/channel seems to be the minimum for 6ch vorbis. */-    int min_bitrate = 28 * pv->out_discrete_channels;-    if (pv->out_discrete_channels > 2 && job->abitrate < min_bitrate)+    /* Minimum 16kbps/channel */+    int min_bitrate = 16 * pv->out_discrete_channels;+    if (job->arate > 24000)     {-        hb_log( "encvorbis: Selected bitrate (%d kbps) too low for %d channel audio.", job->abitrate, pv->out_discrete_channels);+    	if (pv->out_discrete_channels > 2)+    	{+			/* Vorbis minimum is around 30kbps/ch for 6ch at rates > 24k (32k/44.1k/48k) */+			min_bitrate = 32 * pv->out_discrete_channels;+		}+		else+		{+			/* Allow 24kbps mono and 48kbps stereo at rates > 24k (32k/44.1k/48k) */+			min_bitrate = 24 * pv->out_discrete_channels;+		}+    }+    if (job->abitrate < min_bitrate)+    {+        hb_log( "encvorbis: Selected bitrate (%d kbps) too low for %d channel audio at %d Hz.", job->abitrate, pv->out_discrete_channels, job->arate);         hb_log( "encvorbis: Resetting bitrate to %d kbps", min_bitrate);         job->abitrate = min_bitrate;     }