diff options
author | wm4 <wm4@nowhere> | 2015-06-12 19:23:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-12 19:23:46 +0200 |
commit | afdc060bb3d2558130e48a76a0a342be034e294c (patch) | |
tree | 6e03432533fae076d61983918345d7f097693e76 /test/chmap_sel.c | |
parent | 55624a70eeac79d6a5a208a078458f1fe07b833a (diff) | |
download | mpv-afdc060bb3d2558130e48a76a0a342be034e294c.tar.bz2 mpv-afdc060bb3d2558130e48a76a0a342be034e294c.tar.xz |
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.
Diffstat (limited to 'test/chmap_sel.c')
-rw-r--r-- | test/chmap_sel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/chmap_sel.c b/test/chmap_sel.c index 914e00368f..928320058c 100644 --- a/test/chmap_sel.c +++ b/test/chmap_sel.c @@ -87,6 +87,20 @@ static void test_mp_chmap_sel_fallback_reject_unknown(void **state) { assert_string_equal(mp_chmap_to_str(&b), "5.1"); } +static void test_mp_chmap_sel_fallback_more_replacements(void **state) { + test_sel("quad", "quad(side)", LAYOUTS("quad(side)", "stereo")); + test_sel("quad", "7.0", LAYOUTS("quad(side)", "7.0")); + test_sel("quad", "7.0", LAYOUTS("7.0", "quad(side)")); + test_sel("quad", "7.1(wide-side)", LAYOUTS("7.1(wide-side)", "stereo")); + test_sel("quad", "7.1(wide-side)", LAYOUTS("stereo", "7.1(wide-side)")); + test_sel("quad", "fl-fr-fc-bl-br", + LAYOUTS("fl-fr-fc-bl-br", "fl-fr-sl-sr")); + test_sel("quad", "fl-fr-bl-br-na-na-na-na", + LAYOUTS("fl-fr-bl-br-na-na-na-na", "quad(side)", "stereo")); + test_sel("quad", "fl-fr-bl-br-na-na-na-na", + LAYOUTS("stereo", "quad(side)", "fl-fr-bl-br-na-na-na-na")); +} + int main(void) { const UnitTest tests[] = { unit_test(test_mp_chmap_sel_fallback_upmix), @@ -101,6 +115,7 @@ int main(void) { unit_test(test_mp_chmap_sel_fallback_no_downmix), unit_test(test_mp_chmap_sel_fallback_minimal_downmix), unit_test(test_mp_chmap_sel_fallback_reject_unknown), + unit_test(test_mp_chmap_sel_fallback_more_replacements), }; return run_tests(tests); } |