LPCM Header in MPEG2-PS

 ヘッダサイズは固定で7bytes。LPCMデータはビッグエンディアン。

BYTE0BYTE1BYTE2BYTE3BYTE4BYTE5BYTE6
10100DDD NNNNNNNN LLLLLLLL LLLLLLLL EMRNNNNN BBSSRCCC XXXYYYYY
10000DDD(8bits) : sub stream ID 0xA0-A7 (DDD: id)
NNNNNNNN(8bits) : number of frame headers
LLL...(16bits) : first access unit pointer (LPCMデータのフレーム先頭位置)
E : audio emphasis flag (0:off, 1:on)
M : audio mute flag (0:off, 1:on)
R : reserved
NNNNN(5bits) : audio frame number
BB(2bits) : Bits per sample[bits] (0:16, 1:20, 2:24, 3:reserved)
SS(2bits) : Sampling frequency[kHz] (0:48, 1:96, etc:reserved)
CCC(3bits) : number of channels[ch] (CCC + 1)
XXX(3bits) : dynamic range X (linear gain = 2^(4-(X+(Y/30))))
YYYYY(5bits) : dynamic range Y (dB gain = 24.082 - 6.0206 X - 0.2007 Y)