pcm in blue-ray

来源:互联网 发布:广州国投网络批发城 编辑:程序博客网 时间:2024/05/26 02:53

绝大多数传统视频里的pcm数据时raw data. 在视频数据里找到audio包后,直接把数据输出即可。

蓝光格式的pcm数据如下:

PES_packet_payload() {
HDMV_LPCM_audio_data_header()
HDMV_LPCM_audio_data_payload()
}

它多包含了一个个4bytesHDMV_LPCM_audio_data_header() 我们解码时,需去掉这个包头,输出后面的信息。

包头格式如下:

Syntax No. of bits Mnemonics
HDMV_LPCM_audio_data_header() {
audio_data_payload_size                          16 uimsbf
channel_assignment                                  4 bslbf
sampling_frequency                                   4 uimsbf
bits_per_sample                                         2 uimsbf
start_flag                                                    1 bslbf
reserved                                                     5 bslbf
}


对每包audio数据都是240个样本,audio_data_payload_size大小如下:

sampling_frequency                bits_per_sample               number of channels         audio_data_payload_size[bytes]


48 KHz                                      16 bit                                  2                                        960

                                                                                            4                                        1920

                                                                                            6                                        2880

                                                                                            8                                        3840

 


48 KHz                                      20bit / 24bit                        2                                        1440

                                                                                            4                                        2880

                                                                                            6                                        4320

                                                                                            8                                        5760

 


 

96 KHz                                       16 bit                                 2                                        1920

                                                                                            4                                        3840

                                                                                            6                                        5760

                                                                                            8                                        7680

 


 

96 KHz                                      20bit / 24bit                        2                                        2880

                                                                                            4                                        5760

                                                                                            6                                        8640

                                                                                            8                                        11520

 


 

192 KHz                                    16 bit                                  2                                        3840

                                                                                            4                                        7680

                                                                                            6                                        11520

 


 

192 KHz                                    20bit / 24bit                        2                                        5760

                                                                                            4                                        11520

                                                                                            6                                        17280


 


channel_assignment:                                                                                                                                             

value

0:  reserved

1:  2ch, mono

2:  2ch, reserved

3:  2ch, stereo

4:  4ch, L,C,R(3/0)

5:  4ch, L,R,S(2/1)

6:  4ch, L,C,R,S(3/1)

7:  4ch, L,R,LS,RS(2/2)

8:  6ch, L,C,R,LS,RS(3/2)

9:  6ch, L,C,R,LS,RS,lfe(3/2+lfe)
10: 8ch, L,C,R,LS,CS1,CS2,RS(3/4)

11: 8ch, L,C,R,LS,CS1,CS2,RS,lfe(3/4+lfe)

12-15: reserved

 

sampling_frequency:

value

1: 48khz

4: 96khz

5: 192khz

others: reserved


bits_per_sample:

value

0: reserved

1: 16bits/sample

2: 20bits/sample

3: 24bits/sample

 

start_flag:

1-bit flag that indicates "track start" or "index point". The use of this flag is not mandatory,
and it can take over the role of the Q bit from User data defined in IEC 60958-3[49].

 

 

参考资料:System Description Blu-ray Disc Read-Only Format Part 3 Audio Visual Basic Specifications Version 0.99rev2

 

 

原创粉丝点击