githubのコードからのfolk
Revision | c608033d24c7e170908ae367abcc21454fa2bed8 (tree) |
---|---|
Time | 2010-10-06 07:51:50 |
Author | jstebbins <jstebbins@b64f...> |
Commiter | jstebbins |
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
@@ -109,7 +109,7 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud) | ||
109 | 109 | ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(bitrate)); |
110 | 110 | if (select_acodec == HB_ACODEC_FAAC) |
111 | 111 | { |
112 | - gint br, last = 320, first = 0; | |
112 | + gint last = 320, first = 0; | |
113 | 113 | |
114 | 114 | if (mix == HB_AMIXDOWN_6CH) |
115 | 115 | { |
@@ -426,12 +426,13 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) | ||
426 | 426 | titleindex = ghb_settings_combo_int(ud->settings, "title"); |
427 | 427 | track = ghb_settings_combo_int(ud->settings, "AudioTrack"); |
428 | 428 | |
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); | |
430 | 432 | ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(br)); |
431 | 433 | |
432 | 434 | sr = ghb_find_closest_audio_rate(sr); |
433 | 435 | ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(sr)); |
434 | - mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code); | |
435 | 436 | ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code)); |
436 | 437 | } |
437 | 438 | ghb_adjust_audio_rate_combos(ud); |
@@ -1614,22 +1614,11 @@ gint | ||
1614 | 1614 | ghb_find_closest_audio_bitrate(gint codec, gint rate) |
1615 | 1615 | { |
1616 | 1616 | gint ii; |
1617 | - gint low = 32; | |
1618 | - gint high = 768; | |
1619 | 1617 | gint result; |
1620 | 1618 | |
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; | |
1627 | 1620 | for (ii = 0; ii < hb_audio_bitrates_count; ii++) |
1628 | 1621 | { |
1629 | - if (hb_audio_bitrates[ii].rate < low) | |
1630 | - continue; | |
1631 | - if (hb_audio_bitrates[ii].rate > high) | |
1632 | - break; | |
1633 | 1622 | if (rate <= hb_audio_bitrates[ii].rate) |
1634 | 1623 | { |
1635 | 1624 | result = hb_audio_bitrates[ii].rate; |