DTS: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
m (mirrored doc)
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* Codec ID: 0x2001
* Codec ID: 0x2001 (0x0008 Microsoft DTS)
* Company: [[DTS Inc.]]
* Company: [[DTS Inc.]]


DTS Coherent Acoustics is a perceptual audio codec. The main technique used is a QMF filter together with [[Huffman]], [[PCM#Adaptive DPCM|ADPCM]] and [[Vector Quantization|vector quantization]].
DTS Coherent Acoustics is a perceptual audio codec. The main technique used is a QMF filter together with [[Huffman]], [[PCM#Adaptive DPCM|ADPCM]] and [[Vector Quantization|vector quantization]].


Specification can be found through the [http://pda.etsi.org/pda/queryform.asp ETSI] ([[Mirrored Files|mirrored here]]), search for DTS. Info completing the incomplete specification can be found here: http://webapp.etsi.org/action%5CPU/20021224/ts_102114v010201p.pdf, http://gauss.ffii.org/PatentView/EP864146, and http://ofi.epoline.org/view/GetDossier?dosnum=&pubnum=EP864146&lang=EN# .
Specification can be found [http://webapp.etsi.org/WorkProgram/Report_WorkItem.asp?WKI_ID=35781 here], [http://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.03.01_60/ts_102114v010301p.pdf direct link] (v1.3.1, 2011-08-09); [[Mirrored Files|mirrored locally]].


The [[VideoLAN]] project has created [http://developers.videolan.org/libdca.html libdts/libdca] an open source implementation of DTS. Unfortunately libdts was pushed underground through patent scare tactics for a while.
The [[VideoLAN]] project has created [http://developers.videolan.org/libdca.html libdts/libdca] an open source implementation of DTS. Unfortunately libdts was pushed underground through patent scare tactics for a while.
Line 12: Line 12:


=== Raw bitstream coding ===
=== Raw bitstream coding ===
Raw bitstream is packed into 16-bit words with possible little- or big-endian.
Raw bitstream is packed into 16-bit words with possible little- or big-endian. The native file formats, compact (.cpt) and padded (.dts), are all coded in big-endian byte order.


=== 14-bit words ===
=== 14-bit words ===
This kind of bitstream is packed into 16-bit words where high two bits contain some auxiliary information (parity?). This coding is used in many DTS-in-[[WAV]] files.
This kind of bitstream is packed into 16-bit sample words so that the amplitude is reduced by 12 dB in the event that the data is inadvertently  interpreted as uncompressed audio samples. The upper two bits are basically sign bit extension, as defined by twos-complement format. This coding is used in many DTS-in-[[WAV]] files.  It is also found on DTS Music CD, where the potential of 1411.2 kbps is reduced to 1234.8 kbps in a tradeoff to reduce speaker damage.


=== How to distinguish different versions ===
=== How to distinguish different versions ===
Line 32: Line 32:
|}
|}


The native file formats, compact (.cpt) and padded (.dts), are all coded in big-endian byte order. Wave and CD are big-endian formats, so DTS will (usually) be big-endian when found there.
DTS is natively big-endian byte order. Wave and CD are little-endian formats, so DTS will (usually) be little-endian when found in those media containers.


== Frame format ==
== Frame format ==

Revision as of 23:50, 11 January 2012

  • Codec ID: 0x2001 (0x0008 Microsoft DTS)
  • Company: DTS Inc.

DTS Coherent Acoustics is a perceptual audio codec. The main technique used is a QMF filter together with Huffman, ADPCM and vector quantization.

Specification can be found here, direct link (v1.3.1, 2011-08-09); mirrored locally.

The VideoLAN project has created libdts/libdca an open source implementation of DTS. Unfortunately libdts was pushed underground through patent scare tactics for a while.

Bitstream coding

There are four different bitstream formats -- little- or big-endian and 16 or 14 bits per word.

Raw bitstream coding

Raw bitstream is packed into 16-bit words with possible little- or big-endian. The native file formats, compact (.cpt) and padded (.dts), are all coded in big-endian byte order.

14-bit words

This kind of bitstream is packed into 16-bit sample words so that the amplitude is reduced by 12 dB in the event that the data is inadvertently interpreted as uncompressed audio samples. The upper two bits are basically sign bit extension, as defined by twos-complement format. This coding is used in many DTS-in-WAV files. It is also found on DTS Music CD, where the potential of 1411.2 kbps is reduced to 1234.8 kbps in a tradeoff to reduce speaker damage.

How to distinguish different versions

Every frame in DTS starts with 32-bit syncword which can be used to distinguish current bitstream encoding:

Sequence Bitstream type
7F FE 80 01 raw big-endian
FE 7F 01 80 raw little-endian
1F FF E8 00 07 Fx 14-bit big-endian
FF 1F 00 E8 Fx 07 14-bit little-endian

DTS is natively big-endian byte order. Wave and CD are little-endian formats, so DTS will (usually) be little-endian when found in those media containers.

Frame format

Size Explanation Value
32 bits Sync marker 0x7FFE8001
1 bit Frame type (or last frame) 0 - termination frame, 1 - normal frame
5 bits Deficit sample count number of samples in block - 1 (should be 31 for normal frame)
1 bit CRC present
7 bits Number of blocks 5-127
14 bits Frame size in bytes - 1 95-16383
6 bits Channel configuration values 0-15 are standard, 16-63 are user-defined
4 bits Sample frequency See table below
5 bits Bitrate See table below
1 bit Down mix
1 bit Dynamic range
1 bit Time stamp
1 bit Auxiliary data
1 bit HDCD
3 bits External descr
1 bit External coding
1 bit ASPF
2 bits LFE
1 bit Predictor history
16 bits Header CRC if CRC present above is set
1 bit Multirate inter
4 bits Version
2 bits Copy history
3 bits Source PCM resolution
1 bit Front sum
1 bit Surround sum
4 bits Dialog normalization dB of recovery
""SUBFRAMES"" TODO