xbmc/xbmc — pull request #4933 by popcornmix (2014-06-18 19:11:29+00:00)
Title: [omxplayer] Make use of audio decode fast paths when downmixing

The TrueHD codec actually works in 3 stages.
It decodes the downmixed stereo.
It then decodes the differences required to produce 5.1.
It then decodes the differences required to produce 7.1.

Many users end up downmixing this 7.1 stream back to 2.0.
Much better to tell the codec we only need the 2.0 stream.

When playing a 94s duration video file on an overclocked Pi, the audio decode took:
7.1 channels: 39.6s
5.1 channels: 36.5s
2.0 channels: 23.0s

So, it's almost twice as fast to decode TrueHD when only stereo is required.

It looks like DTS and AC3 deocoders in ffmpeg also have similar fast paths.