summaryrefslogtreecommitdiffstats
path: root/test/chmap.c
Commit message (Collapse)AuthorAgeFilesLines
* audio: simplify furtherwm42015-05-091-12/+3
| | | | | | | | Drop mp_chmap_diff() (which is unused too now), and implement mp_chmap_diffn() in a slightly simpler way. (Too bad there is no standard function for counting set bits.) (cherry picked from commit 00130651dac758f90bf98306a9d1e569ed4155ca)
* audio: remove mp_chmap_contains()wm42015-05-091-24/+0
| | | | | | It's unsued now. (cherry picked from commit 8d5924f2c9c7d80b45cd68b44cb9c74e7b0b5a8c)
* chmap_sel: add multichannel fallback heuristicStefano Pigozzi2014-12-291-0/+56
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.