Your Digital Media Has Never Looked So Good

 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

GetAudioDecodeInfo()'s SAD bytes

Thu Jan 14, 2016 11:03 pm

So i am looking at this interesting function GetAudioDecodeInfo(), it has been around for a while: http://sdkdocs.roku.com/pages/diffpages ... Id=1612031 .

First i note that the edition from Feb 27, 2015 seems to be correctER than the current one, since it says "last two bytes of the SAD" (i.e. SAD2, SAD3) whereas next edition says "<number of channels>:<SAD1>:<SAD2>:<PassThru>" but that's very unlikely since SAD1 is the format and number of channels - which we already have decoded as the AA key "DD+" and <number of channels>=8.

This info seems promicing, has somebody decoded it successfully yet?

Here is what i see. Roku 3, fw7:
AC3: 6:127:640:1:
mp3: 2:
wma: 2:
flac: 2:
lpcm: 2:
aac: 2:

RokuTV, fw7
AC3: 7:31:640:0:
mp3: 2:
wma: 2:
flac: 2:
lpcm: 2:
aac: 2:
DD+: 7:6:0:0:

So trying to decode the SADness: Roku3's reports AC3 (aka DD) as a pass-through with 6 (5+1) channels. 127 seems to be a SAD2 and says "i support 32, 44, 48, 88, 96, 176, 192 kHz (what do i care, i am a passthrough!)". So far so good.

RokuTV reports AC3 and DD+ with 7 channels, where AC3 can play 32, 44, 48, 88, 96 kHz and DD+ can only do 44 and 48 kHz. Seems plausible.

But WTH is 640 (0b1010000000)?! What kind of super-sized byte is that? Not any of the bytes i have met - mine all maxed out at 8bit, i.e. 255 (0b11111111)
 
User avatar
RokuMarkn
Roku Engineering
Posts: 1581
Joined: Mon Jun 09, 2008 9:20 am

Re: GetAudioDecodeInfo()'s SAD bytes

Fri Jan 15, 2016 11:18 am

I'm not very familiar with this, but from reading the code it appears the four fields are supposed to be

number of channels
sampling frequencies
bit rate
pass-through

--Mark
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: GetAudioDecodeInfo()'s SAD bytes

Fri Jan 15, 2016 2:47 pm

Thanks for having a look! Hmm, "640" seems right as the maximum Kbps supported by DD. Then it's 8 * SAD3 (where per wikipedia link, for 640Kbps the SAD3 would be 640/8 = 80, a "bytable" value)

So 2nd number is frequency mask and 3rd one is (normalized? denormalized? ugh) bandwidth. Can you ping doco maintainer to fix?

Who is online

Users browsing this forum: No registered users and 9 guests