summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-08 19:33:17 +0200
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-05-09 21:14:15 +0900
commit015a7638fb1454a4a97550116a68252a9987c084 (patch)
tree908a1176c67d1acdaa7cb48f6363610917be70c5 /sub
parent1f4e087e6fc4d9499f5aabb6080428c4813ee046 (diff)
downloadmpv-015a7638fb1454a4a97550116a68252a9987c084.tar.bz2
mpv-015a7638fb1454a4a97550116a68252a9987c084.tar.xz
audio: redo channel map fallback selection
Instead of somehow having 4 different cases with each their own weight, do it with a single function that decides which channel layout is the better fallback. This is simpler, and also introduces new (fixed) semantics. The new test added to test/chmap_sel.c actually works now. This is a mixed case with no perfect upmix or downmix, but the better choice is the one which loses the least channels from the original layout. One test also changes. If the input is 7.1(wide-side), and the available layouts are 7.1 and 5.1(side), the latter is now chosen instead of the former. This makes sense: both layouts contain 6 out of 8 channels from the original layout, but the 5.1(side) one is smaller. This follows the general logic. The 7.1 layout has FLC/RLC speakers instead of BL/BR, and judging by the names, "front left center" is completely different from "back left". If these should be exchangeable, a separate exception would have to be added. (cherry picked from commit 3560a50029e160f0606d0cdc6aa1da662bbcace8)
Diffstat (limited to 'sub')
0 files changed, 0 insertions, 0 deletions