Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTS:X #37

Closed
madshi opened this issue Nov 2, 2015 · 4 comments
Closed

DTS:X #37

madshi opened this issue Nov 2, 2015 · 4 comments

Comments

@madshi
Copy link

madshi commented Nov 2, 2015

Hi there,

this is supposed to be a DTS:X sample:

http://madshi.net/DTS-X.dts

But I can't see anything special about it. Looks like a normal DTS-MA file to me. Can you see anything out of the ordinary?

@foo86
Copy link
Owner

foo86 commented Nov 6, 2015

There seems to be additional data present after normal frequency band data in each XLL frame. That can be possibly attributed to DTS:X metadata. With the following patch applied you'll see lots of XLL: NNNN bits left [0x2000850] messages where amount of extra bits fluctuates from few hundred to tens of thousands. 0x2000850 signature is the same for all frames (probably a sync word).

diff --git a/libdcadec/xll_decoder.c b/libdcadec/xll_decoder.c
index f0cd2f2..e584d6a 100644
--- a/libdcadec/xll_decoder.c
+++ b/libdcadec/xll_decoder.c
@@ -968,8 +968,9 @@ static int parse_frame(struct xll_decoder *xll, uint8_t *data, size_t size, stru
         return ret;
     if ((ret = parse_band_data(xll)) < 0)
         return ret;
-    if ((ret = bits_seek(&xll->bits, xll->frame_size * 8)) < 0)
-        return ret;
+    bits_align4(&xll->bits);
+    if (xll->frame_size * 8 > xll->bits.index)
+        printf("XLL: %zu bits left [%#x]\n", xll->frame_size * 8 - xll->bits.index, bits_get(&xll->bits, 32));

     return 0;
 }

@madshi
Copy link
Author

madshi commented Nov 6, 2015

Thanks - that's interesting! Is there an easy way for me (in eac3to) to detect this - preferably without having to fully parse the whole band data?

FWIW, reportedly DTS:X is also supported for lossy DTS tracks somehow. Haven't seen such a file yet, though. Too bad it usually takes ages for specs to become available (if they become available at all).

@foo86
Copy link
Owner

foo86 commented Nov 6, 2015

There is no need to fully parse the band data, you just need to get to the NAVI table by parsing/skipping XLL common header and channel set sub-headers (each header contains its size so there is no need to parse all the fields). From NAVI table you can calculate total size of band data and skip over it to DTS:X signature.

@madshi
Copy link
Author

madshi commented Nov 6, 2015

Thanks, will give that a try!

@foo86 foo86 closed this as completed Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants