Ticket #230 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Multichannel output doesn't work with formats other than 5.0/5.1

Reported by: dconrad Assigned to:
Priority: normal Milestone:
Component: Perian-Main Version:
Severity: normal Keywords:
Cc:

Description

The only multichannel formats that ProcessFloats/Process?16BitSignedInts/Process32BitSignedInts interleave correctly are 5.0 and 5.1. This means that 3.1 and 4.0 formats can't be played when the preference for multichannel output is set. Two examples of such audio are http://samples.mplayerhq.hu/A-codecs/AC3-samples/3.1-buggy/amelie-ac3-3f%2blfe.avi and http://umbc.edu/~dconrad1/Byousoku_5cm.mov

Attached are a series of patches to simplify and generalize the sample interleaving code to handle these files.

Attachments

0001-Use-a-single-templated-function-to-interleave-and-co.patch (14.8 kB) - added by dconrad on 08/05/07 02:16:45.
Use a single templated function to interleave and convert samples
0002-Move-getting-the-channel-count-to-its-own-function.patch (5.9 kB) - added by dconrad on 08/05/07 02:17:14.
Move getting the channel count to its own function
0003-Simplify-and-generalize-interleaving-channels.patch (4.1 kB) - added by dconrad on 08/05/07 02:17:41.
Simplify and generalize interleaving channels
0004-Don-t-set-a52_flags-based-on-number-of-channels-we.patch (1.5 kB) - added by dconrad on 08/05/07 02:17:59.
Don't set a52_flags based on number of channels; we can handle whatever the stream is

Change History

08/05/07 02:16:45 changed by dconrad

  • attachment 0001-Use-a-single-templated-function-to-interleave-and-co.patch added.

Use a single templated function to interleave and convert samples

08/05/07 02:17:14 changed by dconrad

  • attachment 0002-Move-getting-the-channel-count-to-its-own-function.patch added.

Move getting the channel count to its own function

08/05/07 02:17:41 changed by dconrad

  • attachment 0003-Simplify-and-generalize-interleaving-channels.patch added.

Simplify and generalize interleaving channels

08/05/07 02:17:59 changed by dconrad

  • attachment 0004-Don-t-set-a52_flags-based-on-number-of-channels-we.patch added.

Don't set a52_flags based on number of channels; we can handle whatever the stream is

08/05/07 10:08:04 changed by gbooker

  • status changed from new to closed.
  • resolution set to fixed.

Comments: 0001: Changed comment about float cast to SInt32 because this is standard procedure documented in liba52's docs. It avoids the whole using FP registers to convert to ints. The integers are signed, not unsigned! See the value of kIntPCMOutFormatFlag

0002: Cleaned up the function (yeah, it was this way originally, but it wasn't my code).

0003: Channel mapping can be done in a more elegant way. Init the map to {0, 1, 2, 3, 4, 5} and the rear channels are always correct. Then, just need to layout the front and LFE channels.

0004: Need to check for mono as well. Also, the channel count *must* match, so check for that.

Committed in changeset 60