Rockbox

Tasklist

FS#12443 - Multichannel downmix for flac

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Sunday, 11 December 2011, 00:00 GMT
Last edited by Andree Buschmann (Buschel) - Wednesday, 14 December 2011, 19:18 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The attached patch implements multichannel-to-stereo downmixing for flac. For this all channels need to be decoded and saved in a dedicated sample buffer. For each channel configuration (3.0, 4.0, 5.0, 5.1) there is a matrix for the downmixing defined and applied.

The following file very clearly proves and shows the effect of the downmixing: http://download.linnrecords.com/test/flac/surround88.aspx
This task depends upon

Closed by  Andree Buschmann (Buschel)
Wednesday, 14 December 2011, 19:18 GMT
Reason for closing:  Accepted
Additional comments about closing:  Submitted with r31253
Comment by Andree Buschmann (Buschel) - Sunday, 11 December 2011, 10:14 GMT
Next version:
- Moved donwmix to an own function
- Moved scaling into downmixing to improve performance
- Avoid divisisions to improve performance

A sample file (5.1, 88.2 kHz, 24 bit) on iPod Video needs:
svn -> 96.8 MHz (no downmix, left/right only)
v02 -> 101.9 MHz (5.1-downmix)
Comment by Andree Buschmann (Buschel) - Sunday, 11 December 2011, 12:04 GMT
Now with manual changes as well.

ToDo's (maybe after the patch is in): A little more tweaking with IRAM allows a speed up of ~3 MHz on PP5022.
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Sunday, 11 December 2011, 15:13 GMT
this is working on my device. (fuze+)
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Sunday, 11 December 2011, 15:23 GMT
tested: patch v04 on both test file and a regular song, stereo flac still plays
Comment by MichaelGiacomelli (saratoga) - Sunday, 11 December 2011, 21:26 GMT
FWIW if you're concerned about speed, the rounding probably isn't needed for 32 bit samples.
Comment by Andree Buschmann (Buschel) - Monday, 12 December 2011, 05:57 GMT
You are talking about sections like "(b + (b<<2))>>5"? This is equal to b*(1+4)/32 = b*5/32 ~= 1/6, but avoids multiplication or division.

Loading...