History

chmap_sel: improve speaker replacement handling

This didn't really work since the last time the channel map fallback code was touched. In some cases, quite bad results were selected.

wm4 committed 11 years ago

Commit afdc0601 parent 55624a72 files · +48 −17Browse files

Showing the changes to test (1 of 2 files). Show all

Unified · Split

test/chmap_sel.c+15−0
@@ -87,6 +87,20 @@ static void test_mp_chmap_sel_fallback_reject_unknown(void **state) { · 86 unmodified lines
8787 assert_string_equal(mp_chmap_to_str(&b), "5.1");
8888 }
8989
90+static void test_mp_chmap_sel_fallback_more_replacements(void **state) {
91+ test_sel("quad", "quad(side)", LAYOUTS("quad(side)", "stereo"));
92+ test_sel("quad", "7.0", LAYOUTS("quad(side)", "7.0"));
93+ test_sel("quad", "7.0", LAYOUTS("7.0", "quad(side)"));
94+ test_sel("quad", "7.1(wide-side)", LAYOUTS("7.1(wide-side)", "stereo"));
95+ test_sel("quad", "7.1(wide-side)", LAYOUTS("stereo", "7.1(wide-side)"));
96+ test_sel("quad", "fl-fr-fc-bl-br",
97+ LAYOUTS("fl-fr-fc-bl-br", "fl-fr-sl-sr"));
98+ test_sel("quad", "fl-fr-bl-br-na-na-na-na",
99+ LAYOUTS("fl-fr-bl-br-na-na-na-na", "quad(side)", "stereo"));
100+ test_sel("quad", "fl-fr-bl-br-na-na-na-na",
101+ LAYOUTS("stereo", "quad(side)", "fl-fr-bl-br-na-na-na-na"));
102+}
103+
90104 int main(void) {
91105 const UnitTest tests[] = {
92106 unit_test(test_mp_chmap_sel_fallback_upmix),
@@ -101,6 +115,7 @@ int main(void) { · 8 unmodified lines
101115 unit_test(test_mp_chmap_sel_fallback_no_downmix),
102116 unit_test(test_mp_chmap_sel_fallback_minimal_downmix),
103117 unit_test(test_mp_chmap_sel_fallback_reject_unknown),
118+ unit_test(test_mp_chmap_sel_fallback_more_replacements),
104119 };
105120 return run_tests(tests);
106121 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t