[pulseaudio-discuss] Making Pulseaudio the perfect digital-everywhere sound transport

Alexander E. Patrakov patrakov at gmail.com
Tue Feb 12 03:53:11 PST 2008


Erich Boleyn wrote:
>   --  Issue:  Digital compressed stream transport.
> 
>       Example:  Dolby 5.1, DTS, etc.
> 
>     --  Potential solution:  Sent it compressed unless it needs mixing, then
>         blow out to uncompressed.  Recompress at digital output.
> 
>         I saw a passing comment in the last month's email archives that
>         the compressed audio did not have defined latency characteristics
>         so would probably not work well.  I don't understand the Dolby/DTS
>         formats well at all, so it could be I'm just confused on this front
>         in thinking it's easy.
> 
>         Being able to recompress also brings up where to get the
>         recompression code from (and which sub-format of the myriad
>         Dolby 5.1/DTS extensions to support).  That's probably a whole
>         discussion in and of itself.  I saw one comment saying there
>         was support in one of the open-source libs for it, but none
>         about what the overhead or latency issues involved would be.

The issue is that once you have switched to the recompressed stream, you can't 
switch back to passthrough easily without getting a click, at least for DTS. The 
following pieces of the DTS specification reqire maintaining the history:

1) ADPCM prediction (typically used in one or two subbands at a time).

2) Subband synthesis (required all the time).

Another problem is that the DTS specification omits certain key parts. E.g., it 
talks about 192 kHz sample rate only in the introduction, specifies only the 
extension header for 96 kHz, and provides long FIR tables for a 32-band 
quadrature mirror filter (used at 32 .. 48 kHz) in such a way that one cannot 
guess how to construct a 64-band filter required for 96 kHz.

As for the latency, this is not an issue for DTS, where the precise decoding 
algorithms for 8 .. 48 kHz are specified (and thus the latency of 
encoder+decoder chain is known to be 512 samples for sampling frequencies of 32 
.. 48 kHz).

Note: there is no open-source DTS encoder yet, but I am writing one. The key 
piece (deobfuscating and undoing actions in section C.6 of the specification) is 
already done for the "non-perfect reconstruction filter" case, and a tarball 
with proof-of-concept code (only capable to encode CD-quality stereo wav files 
to 1411 kbps DTS - i.e., useless encoding without any compression) is available 
from me on request, if you either prove that you have the required DTS patent 
license, or demonstrate that you don't need it.

-- 
Alexander E. Patrakov




More information about the pulseaudio-discuss mailing list