1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*48c779cdSXin LI# $File: dolby,v 1.9 2019/04/19 00:42:27 christos Exp $ 4b6cee71dSXin LI# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at> 5*48c779cdSXin LI# from https://www.atsc.org/standards/a_52a.pdf 6b6cee71dSXin LI# corrections, additions, etc. are always welcome! 7b6cee71dSXin LI# 8b6cee71dSXin LI# syncword 9b6cee71dSXin LI0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream, 10b6cee71dSXin LI# Proposed audio/ac3 RFC/4184 11b6cee71dSXin LI!:mime audio/vnd.dolby.dd-raw 12b6cee71dSXin LI# fscod 13b6cee71dSXin LI>4 byte&0xc0 = 0x00 48 kHz, 14b6cee71dSXin LI>4 byte&0xc0 = 0x40 44.1 kHz, 15b6cee71dSXin LI>4 byte&0xc0 = 0x80 32 kHz, 16b6cee71dSXin LI# is this one used for 96 kHz? 17b6cee71dSXin LI>4 byte&0xc0 = 0xc0 reserved frequency, 18b6cee71dSXin LI# 19b6cee71dSXin LI>5 byte&0x07 = 0x00 \b, complete main (CM) 20b6cee71dSXin LI>5 byte&0x07 = 0x01 \b, music and effects (ME) 21b6cee71dSXin LI>5 byte&0x07 = 0x02 \b, visually impaired (VI) 22b6cee71dSXin LI>5 byte&0x07 = 0x03 \b, hearing impaired (HI) 23b6cee71dSXin LI>5 byte&0x07 = 0x04 \b, dialogue (D) 24b6cee71dSXin LI>5 byte&0x07 = 0x05 \b, commentary (C) 25b6cee71dSXin LI>5 byte&0x07 = 0x06 \b, emergency (E) 26b6cee71dSXin LI>5 beshort&0x07e0 0x0720 \b, voiceover (VO) 27b6cee71dSXin LI>5 beshort&0x07e0 >0x0720 \b, karaoke 28b6cee71dSXin LI# acmod 29b6cee71dSXin LI>6 byte&0xe0 = 0x00 1+1 front, 30b6cee71dSXin LI>>6 byte&0x10 = 0x10 LFE on, 31b6cee71dSXin LI>6 byte&0xe0 = 0x20 1 front/0 rear, 32b6cee71dSXin LI>>6 byte&0x10 = 0x10 LFE on, 33b6cee71dSXin LI>6 byte&0xe0 = 0x40 2 front/0 rear, 34b6cee71dSXin LI# dsurmod (for stereo only) 35b6cee71dSXin LI>>6 byte&0x18 = 0x00 Dolby Surround not indicated 36b6cee71dSXin LI>>6 byte&0x18 = 0x08 not Dolby Surround encoded 37b6cee71dSXin LI>>6 byte&0x18 = 0x10 Dolby Surround encoded 38b6cee71dSXin LI>>6 byte&0x18 = 0x18 reserved Dolby Surround mode 39b6cee71dSXin LI>>6 byte&0x04 = 0x04 LFE on, 40b6cee71dSXin LI>6 byte&0xe0 = 0x60 3 front/0 rear, 41b6cee71dSXin LI>>6 byte&0x04 = 0x04 LFE on, 42b6cee71dSXin LI>6 byte&0xe0 = 0x80 2 front/1 rear, 43b6cee71dSXin LI>>6 byte&0x04 = 0x04 LFE on, 44b6cee71dSXin LI>6 byte&0xe0 = 0xa0 3 front/1 rear, 45b6cee71dSXin LI>>6 byte&0x01 = 0x01 LFE on, 46b6cee71dSXin LI>6 byte&0xe0 = 0xc0 2 front/2 rear, 47b6cee71dSXin LI>>6 byte&0x04 = 0x04 LFE on, 48b6cee71dSXin LI>6 byte&0xe0 = 0xe0 3 front/2 rear, 49b6cee71dSXin LI>>6 byte&0x01 = 0x01 LFE on, 50b6cee71dSXin LI# 51b6cee71dSXin LI>4 byte&0x3e = 0x00 \b, 32 kbit/s 52b6cee71dSXin LI>4 byte&0x3e = 0x02 \b, 40 kbit/s 53b6cee71dSXin LI>4 byte&0x3e = 0x04 \b, 48 kbit/s 54b6cee71dSXin LI>4 byte&0x3e = 0x06 \b, 56 kbit/s 55b6cee71dSXin LI>4 byte&0x3e = 0x08 \b, 64 kbit/s 56b6cee71dSXin LI>4 byte&0x3e = 0x0a \b, 80 kbit/s 57b6cee71dSXin LI>4 byte&0x3e = 0x0c \b, 96 kbit/s 58b6cee71dSXin LI>4 byte&0x3e = 0x0e \b, 112 kbit/s 59b6cee71dSXin LI>4 byte&0x3e = 0x10 \b, 128 kbit/s 60b6cee71dSXin LI>4 byte&0x3e = 0x12 \b, 160 kbit/s 61b6cee71dSXin LI>4 byte&0x3e = 0x14 \b, 192 kbit/s 62b6cee71dSXin LI>4 byte&0x3e = 0x16 \b, 224 kbit/s 63b6cee71dSXin LI>4 byte&0x3e = 0x18 \b, 256 kbit/s 64b6cee71dSXin LI>4 byte&0x3e = 0x1a \b, 320 kbit/s 65b6cee71dSXin LI>4 byte&0x3e = 0x1c \b, 384 kbit/s 66b6cee71dSXin LI>4 byte&0x3e = 0x1e \b, 448 kbit/s 67b6cee71dSXin LI>4 byte&0x3e = 0x20 \b, 512 kbit/s 68b6cee71dSXin LI>4 byte&0x3e = 0x22 \b, 576 kbit/s 69b6cee71dSXin LI>4 byte&0x3e = 0x24 \b, 640 kbit/s 70