h264中sps、pps的常用字段

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/glw0223/article/details/88960675

h264中sps、pps的常用字段

SPS

  • profile_idc
    根据profile_idc的值可以确定码流符合哪一种档次。
    profile_idc = 66 → baseline profile;
    profile_idc = 77 → main profile;
    profile_idc = 88 → extended profile;

  • level_idc
    标识当前码流的Level。编码的Level定义了某种条件下的最大视频分辨率、最大视频帧率等参数,码流所遵从的level由level_idc指定

  • seq_parameter_set_id
    表示当前的序列参数集的id。通过该id值,图像参数集pps可以引用其代表的sps中的参数。

  • max_num_ref_frames
    用于表示参考帧的最大数目。

  • pic_width_in_mbs_minus1
    用于计算图像的宽度。单位为宏块个数,因此图像的实际宽度为:
    f r a m e _ w i d t h = 16 × ( p i c _ w i d t h _ i n _ m b s _ m i n u s 1 + 1 ) frame\_width = 16 × (pic\_width\_in\_mbs\_minus1 + 1)

  • pic_height_in_map_units_minus1
    使用PicHeightInMapUnits来度量视频中一帧图像的高度。PicHeightInMapUnits并非图像明确的以像素或宏块为单位的高度,而需要考虑该宏块是帧编码或场编码。PicHeightInMapUnits的计算方式为:
    P i c H e i g h t I n M a p U n i t s = p i c _ h e i g h t _ i n _ m a p _ u n i t s _ m i n u s 1 + 1 ; PicHeightInMapUnits = pic\_height\_in\_map\_units\_minus1 + 1; f r a m e _ h e i g h t = 16 × P i c H e i g h t I n M a p U n i t s frame\_height = 16 × PicHeightInMapUnits

PPS

  • pic_parameter_set_id
    表示当前PPS的id。某个PPS在码流中会被相应的slice引用,slice引用PPS的方式就是在Slice header中保存PPS的id值。该值的取值范围为[0,255]。

  • seq_parameter_set_id
    表示当前PPS所引用的激活的SPS的id。通过这种方式,PPS中也可以取到对应SPS中的参数。该值的取值范围为[0,31]。

猜你喜欢

转载自blog.csdn.net/glw0223/article/details/88960675