1226048Sobrien 2226048Sobrien#------------------------------------------------------------------------------ 3267843Sdelphij# $File: dolby,v 1.7 2014/01/08 22:37:23 christos Exp $ 4103373Sobrien# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at> 5103373Sobrien# from http://www.atsc.org/standards/a_52a.pdf 6103373Sobrien# corrections, additions, etc. are always welcome! 7103373Sobrien# 8103373Sobrien# syncword 9267843Sdelphij0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream, 10267843Sdelphij# Proposed audio/ac3 RFC/4184 11267843Sdelphij!:mime audio/vnd.dolby.dd-raw 12103373Sobrien# fscod 13267843Sdelphij>4 byte&0xc0 = 0x00 48 kHz, 14267843Sdelphij>4 byte&0xc0 = 0x40 44.1 kHz, 15267843Sdelphij>4 byte&0xc0 = 0x80 32 kHz, 16103373Sobrien# is this one used for 96 kHz? 17267843Sdelphij>4 byte&0xc0 = 0xc0 reserved frequency, 18103373Sobrien# 19267843Sdelphij>5 byte&0x07 = 0x00 \b, complete main (CM) 20267843Sdelphij>5 byte&0x07 = 0x01 \b, music and effects (ME) 21267843Sdelphij>5 byte&0x07 = 0x02 \b, visually impaired (VI) 22267843Sdelphij>5 byte&0x07 = 0x03 \b, hearing impaired (HI) 23267843Sdelphij>5 byte&0x07 = 0x04 \b, dialogue (D) 24267843Sdelphij>5 byte&0x07 = 0x05 \b, commentary (C) 25267843Sdelphij>5 byte&0x07 = 0x06 \b, emergency (E) 26267843Sdelphij>5 beshort&0x07e0 0x0720 \b, voiceover (VO) 27267843Sdelphij>5 beshort&0x07e0 >0x0720 \b, karaoke 28103373Sobrien# acmod 29267843Sdelphij>6 byte&0xe0 = 0x00 1+1 front, 30267843Sdelphij>>6 byte&0x10 = 0x10 LFE on, 31267843Sdelphij>6 byte&0xe0 = 0x20 1 front/0 rear, 32267843Sdelphij>>6 byte&0x10 = 0x10 LFE on, 33267843Sdelphij>6 byte&0xe0 = 0x40 2 front/0 rear, 34267843Sdelphij# dsurmod (for stereo only) 35267843Sdelphij>>6 byte&0x18 = 0x00 Dolby Surround not indicated 36267843Sdelphij>>6 byte&0x18 = 0x08 not Dolby Surround encoded 37267843Sdelphij>>6 byte&0x18 = 0x10 Dolby Surround encoded 38267843Sdelphij>>6 byte&0x18 = 0x18 reserved Dolby Surround mode 39267843Sdelphij>>6 byte&0x04 = 0x04 LFE on, 40267843Sdelphij>6 byte&0xe0 = 0x60 3 front/0 rear, 41267843Sdelphij>>6 byte&0x04 = 0x04 LFE on, 42267843Sdelphij>6 byte&0xe0 = 0x80 2 front/1 rear, 43267843Sdelphij>>6 byte&0x04 = 0x04 LFE on, 44267843Sdelphij>6 byte&0xe0 = 0xa0 3 front/1 rear, 45267843Sdelphij>>6 byte&0x01 = 0x01 LFE on, 46267843Sdelphij>6 byte&0xe0 = 0xc0 2 front/2 rear, 47267843Sdelphij>>6 byte&0x04 = 0x04 LFE on, 48267843Sdelphij>6 byte&0xe0 = 0xe0 3 front/2 rear, 49267843Sdelphij>>6 byte&0x01 = 0x01 LFE on, 50103373Sobrien# 51103373Sobrien>4 byte&0x3e = 0x00 \b, 32 kbit/s 52267843Sdelphij>4 byte&0x3e = 0x02 \b, 40 kbit/s 53267843Sdelphij>4 byte&0x3e = 0x04 \b, 48 kbit/s 54267843Sdelphij>4 byte&0x3e = 0x06 \b, 56 kbit/s 55267843Sdelphij>4 byte&0x3e = 0x08 \b, 64 kbit/s 56267843Sdelphij>4 byte&0x3e = 0x0a \b, 80 kbit/s 57267843Sdelphij>4 byte&0x3e = 0x0c \b, 96 kbit/s 58267843Sdelphij>4 byte&0x3e = 0x0e \b, 112 kbit/s 59267843Sdelphij>4 byte&0x3e = 0x10 \b, 128 kbit/s 60267843Sdelphij>4 byte&0x3e = 0x12 \b, 160 kbit/s 61267843Sdelphij>4 byte&0x3e = 0x14 \b, 192 kbit/s 62267843Sdelphij>4 byte&0x3e = 0x16 \b, 224 kbit/s 63267843Sdelphij>4 byte&0x3e = 0x18 \b, 256 kbit/s 64267843Sdelphij>4 byte&0x3e = 0x1a \b, 320 kbit/s 65267843Sdelphij>4 byte&0x3e = 0x1c \b, 384 kbit/s 66267843Sdelphij>4 byte&0x3e = 0x1e \b, 448 kbit/s 67267843Sdelphij>4 byte&0x3e = 0x20 \b, 512 kbit/s 68267843Sdelphij>4 byte&0x3e = 0x22 \b, 576 kbit/s 69267843Sdelphij>4 byte&0x3e = 0x24 \b, 640 kbit/s 70