foo86/dcadec

DTS Express

Opened this issue · 26 comments

I'm adding support for DTS Express (extension LBR), and I was wondering if anyone has a sample I could test?

This m2ts clip contains a DTS Express stream. Extracting it didn't work on the first try, so I'll leave that to you. ;)

http://files.1f0.de/samples/amergang.sample.m2ts

Here goes a mono sample, wrapped in a .WAV container. I will share a stereo sample and a 5.1 sample A.S.A.P.

http://www.mediafire.com/download/55m0747oz85tija/moovietrackdtsxwav.zip

It seems the task is much more complicated than I thought.
No E.T.A. then, I'm afraid ^.^;

Yes, it's far more complicated than I thought it would be, and inputting these damn tables is annoying as hell.

the guide is truly horrible, they don't even use the same variables to describe the same functionality from one page to the next.

I do have a question though, on page 192 and 193 of the white paper (version 1.4.1, idk about any other version) there are multiple tables, let's use rsdAmp for example

there's both an A and B section to rsdAmp, but I can't figure out if they're supposed to be two separate tables, or something like a 2d array, using very strange syntax?

Here's a screenshot so you can see what's going on without having to open the pdf
rsdAmp Table

where could i find the pdf? THANQ

Look at the getVariableParam function on page 159, its used to read from this table and explains how A and B are used.

In general it helps to actually check the pseudo-code on how tables are used to determine how to interpret them.

Nevermind, I see it. I was looking at that code the other day, but couldn't concentrate enough to know what the hell was happening

thanks for answering.

Is there any new progress on DTS Express support?
Anyway cool thing you guys are trying!

I kinda got stuck after parsing, I don't really understand how the samples are supposed to come out after you've decoded the frequency bands, and all the other organizational overhead.

Like, I just don't understand how the filter banks work.

Yes, I'm almost done @mstevens83 Just having trouble passing empty tables to the getVaraibleParam function, and need to clean it up a bit more.

I fixed the getVariableParam() issue, the solution is really just a bunch of if loops, but it gets the job done.

Nice work!

Great news indeed THUMBS UP

Maybe the news were not so great, given that the solution found has not been implemented ^.^;

Yeah, I took the wrong approach with decoding it, and kinda messed the source up. I'm in the process of rewriting 70% of it.

foo86 commented

There is experimental LBR decoder in master branch now, so you shouldn't waste more time on the spec (the spec is not particularly helpful for writing a working decoder).

Sorry about that man, I'm just really really bad at big projects for some reason.

Also, I looked over your code and it looked a bit incomplete? maybe I just didn't pay enough attention, but I'll upload my branch with my code and you can peruse it if you want.

it's in the DTS-Express branch

foo86 commented

My code surely lacks some features (support for embedded downmix, 7.1 channels, etc) and is not pretty or optimized in any way yet, but is complete enough to get LBR audio working for most sample files I have.

Yours seems like a copy-paste of the spec pseudo-code, which is not really helpful, sorry. The "spec" just gets too many details wrong, the pseudo-code looks awfully convoluted and the coding style doesn't match the project.

For the notes..... I've just managed to compile the latest zipball with GCC 4.9.2, after learning how to deal with the annoying "make: cc: command not found" error message o.O

Apparently the DTSX decoder is working as it should :-) But I don't understand why it thinks a mono stream is a "strange" thing... [dcadec says: 1ch (???), 48kHz, 16 bit].

Last but not least: many thanks for the good job ^_^

DTS Express is NOT DTS:X, don't mix those up just because Express contains an X :)

Okay, thanks for the correction :-)

When last changes was commit to ffmpeg ??

@Aleksoid1978 ffmpeg 3.0 has more or less the equivalent of dcadec 0.2 as an internal decoder, but you can also use the libdcadec library as an external decoder if you need the latest additions until they are ported to the former.