[FFmpeg-devel] [RFC] additinal desc_type for dtshd mpeg-ts demuxer

madshi dear
Mon Jun 9 14:56:09 CEST 2008


Benjamin Larsson schrieb:
> madshi wrote:
>   
>> What I meant is this: Does the dts parser correctly identify
>> DTS-HD blocks as such and properly skip them? If it doesn't
>> there's a danger of misidentifying the middle of some DTS-HD
>> data as the beginning of a new DTS core frame, I'd guess.
>>
>> Also does the dts parser properly detect and skip over zero
>> padding?
>>
>> Regards, madshi.
>>   
>>     
>
> Send some samples and I'll be happy to test them. We follow the DTS core 
> specification.
>
> MvH
> Benjamin Larsson
>   

Here is the collection of all "funny" DTS samples I've stored:

http://madshi.net/dts.rar  (385MB)

Please let me know when you've downloaded it. Thanks.

Here's the information about DTS-HD I gathered so far:

DTS-HD contains a normal DTS core. There's always one DTS core
package and then one DTS-HD package. Then again one DTS core
package and then again one DTS-HD package.

The DTS-HD packages begin with the text "dX %", which is in hex
"64 58 20 25". There's a length field in the DTS-HD package which
tells you how long the DTS-HD package is exactly. If you skip this
length, you should end up on the next DTS core package. The
length of the DTS-HD package is stored in the bytes 6-8. The lowest
four bits of the sixth bytes are the most significant bits of the length
field. All 8 bits of the seventh byte are used for the length field. And
the 3 most significant bits of the eightth byte are the least significant
bits of the length field. Finally you need to add 1 to the length field.
So the length calculates like "(sixthByte & 0xf) << 11 + seventhByte
<< 3 + (eightthByte >> 5) & 7 + 1". I hope I translated this
correctly from my Delphi code.

DTS-HD can be either DTS-HD High Resolution (lossy, constant
bit rate) or DTS-HD Master Audio (lossless, variable bit rate).
Obviously DTS-HD High Resolution packages in a specific DTS-HD
stream always have the same size. While DTS-HD Master Audio
packages vary in size. But the size field in the DTS-HD package
is always set correctly, so you don't really need to worry about
High Resolution vs. Master Audio.

I think properly skipping over full DTS-HD packages is much better
than to search for a new sync word because I guess that the sync
word could theoretically also occur inside of a DTS-HD package.

Let me know if there's anything I can help with.

Regards, madshi.




More information about the ffmpeg-devel mailing list