• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revisionc608033d24c7e170908ae367abcc21454fa2bed8 (tree)
Time2010-10-06 07:51:50
Authorjstebbins <jstebbins@b64f...>
Commiterjstebbins

Log Message

LinGui: fix a problem where I used the wrong aac bitrate cap
wasn't allowing higher bitrate for aac 6ch in some cases.

git-svn-id: svn://localhost/HandBrake/trunk@3574 b64f7644-9d1e-0410-96f1-a4d463321fa5

Change Summary

Incremental Difference

--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -109,7 +109,7 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
109109 ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(bitrate));
110110 if (select_acodec == HB_ACODEC_FAAC)
111111 {
112- gint br, last = 320, first = 0;
112+ gint last = 320, first = 0;
113113
114114 if (mix == HB_AMIXDOWN_6CH)
115115 {
@@ -426,12 +426,13 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
426426 titleindex = ghb_settings_combo_int(ud->settings, "title");
427427 track = ghb_settings_combo_int(ud->settings, "AudioTrack");
428428
429- br = ghb_find_closest_audio_bitrate(acodec_code, br);
429+ mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code);
430+ int channels = HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(mix_code);
431+ br = ghb_get_best_audio_bitrate(acodec_code, br, channels);
430432 ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(br));
431433
432434 sr = ghb_find_closest_audio_rate(sr);
433435 ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(sr));
434- mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code);
435436 ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code));
436437 }
437438 ghb_adjust_audio_rate_combos(ud);
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1614,22 +1614,11 @@ gint
16141614 ghb_find_closest_audio_bitrate(gint codec, gint rate)
16151615 {
16161616 gint ii;
1617- gint low = 32;
1618- gint high = 768;
16191617 gint result;
16201618
1621- if (codec == HB_ACODEC_FAAC)
1622- high = 320;
1623- else if (codec == HB_ACODEC_AC3)
1624- high = 640;
1625-
1626- result = high;
1619+ result = hb_audio_bitrates[hb_audio_bitrates_count-1].rate;
16271620 for (ii = 0; ii < hb_audio_bitrates_count; ii++)
16281621 {
1629- if (hb_audio_bitrates[ii].rate < low)
1630- continue;
1631- if (hb_audio_bitrates[ii].rate > high)
1632- break;
16331622 if (rate <= hb_audio_bitrates[ii].rate)
16341623 {
16351624 result = hb_audio_bitrates[ii].rate;