summaryrefslogtreecommitdiffstats
path: root/test/chmap_sel.c
Commit message (Collapse)AuthorAgeFilesLines
* audio: remove UNKNOWN pseudo speakerswm42015-05-071-3/+1
| | | | | | Reuse MP_SPEAKER_ID_NA for this. If all mp_chmap entries are set to NA, the channel layout has special "unknown channel layout" semantics, which are used to deal with some corner cases.
* audio: avoid downmixing in a certain special-casewm42015-04-271-0/+17
| | | | | | | | As indicated by the added test. In this case, fallback and downmix have the same score, but fallback happens to give better results. So prefer fallback over downmix. (This is probably not a correct solution.)
* chmap_sel: add multichannel fallback heuristicStefano Pigozzi2014-12-291-0/+162
Instead of just failing during channel map selection, try to select a close layout that makes most sense and upmix/downmix to that instead of failing AO initialization. The heuristic is rather simple, and uses the following steps: 1) If mono is required always prefer stereo to a multichannel upmix. 2) Search for an upmix that is an exact superset of the required channel map. 3) Search for a downmix that is the exact subset of the required channel map. 4) Search for either an upmix or downmix that is the closest (minimum difference of channels) to the required channel map.