H.264 划分帧

access unit: A set of NAL units that are consecutive in decoding order and contain exactly one primary coded
picture. In addition to the primary coded picture, an access unit may also contain one or more redundant coded
pictures, one auxiliary coded picture, or other NAL units not containing slices or slice data partitions of a coded
picture. The decoding of an access unit always results in a decoded picture.

 

上面是H.264标准中对access unit的定义,我们可以简单理解,一个access unit就是帧的概念。

 

通过slice中的参数区分:

一. frame_num不同

二. pic_parameter_set_id不同

三. field_pic_flag不同

四. bottom_field_flag不同

五. pic_order_cnt_type(SPS)都等于零,(且pic_order_cnt_lsb或delta_pic_order_cnt_bottom不同)

六. pic_order_cnt_type(SPS)都等于1,delta_pic_order_always_zero_flag都等于零,(且delta_pic_order_cnt[0]或delta_pic_order_cnt[1]不同)

七. profile(SPS)都不等于66,且前一个slice的first_mb_in_slice>=当前slice的first_mb_in_slice

八. first_mb_in_slice都相同

九. first_mb_in_slice与前一帧的某个slice相同

 

通过Nal单元信息区分:

一. nal_ref_idc不同,且其中一个应该等于零

二. nal_unit_type不同

三. nal_unit_type都等于5,且dir_pic_id不同(slice)

 

四. 读到了一个AUD Unit,注:此时还没有读到一个slice

五. 读到了一个SPS Unit

六. 读到了一个PPS Unit

七. 读到了一个SEI Unit

 

H.264 in MPEG2 ts or ps

 

an elementary stream access point is defined as follows:
• ISO/IEC 11172-2 video and ITU-T Rec. H.262 | ISO/IEC 13818-2 video – The first byte of a video
sequence header.
• ISO/IEC 14496-2 visual – The first byte of the visual object sequence header.
• ITU-T Rec. H.264 | ISO/IEC 14496-10 video – The first byte of an AVC access unit. The SPS and PPS
parameter sets referenced in this and all subsequent AVC access units in the coded video stream shall be
provided after this access point in the byte stream and prior to their activation.
• Audio – The first byte of an audio frame

 

When an ITU-T Rec. H.264 | ISO/IEC 14496-10 stream is carried in an ITU-T Rec. H.222.0 | ISO/IEC 13818-1 stream,
the ITU-T Rec. H.264 | ISO/IEC 14496-10 coded data shall be contained in PES packets. The ITU-T Rec. H.264 |
ISO/IEC 14496-10 coded data shall comply with the byte stream format defined in Annex B of ITU-T Rec. H.264 |
ISO/IEC 14496-10, with the following constraints:
   • Each AVC access unit shall contain an access unit delimiter NAL Unit;
NOTE 2 – ITU-T Rec. H.264 | ISO/IEC 14496-10 requires that an access unit delimiter NAL Unit, if present, is the
first NAL Unit within an AVC access unit. Access unit delimiter NAL Units simplify the ability to detect the
boundary between pictures; they avoid the need to process the content of slice headers, and they are particularly useful
for the Baseline and Extended profiles where slice order can be arbitrary.
    • Each byte stream NAL Unit that carries the access unit delimiter shall contain exactly one zero_byte
syntax element.
NOTE 3 – The syntax and semantics of byte stream NAL units are defined in Annex B of ITU-T Rec. H.264 |
ISO/IEC 14496-10.
    • All Sequence and Picture Parameter Sets (SPS and PPS) necessary for decoding the AVC video stream
shall be present within that AVC video stream.
NOTE 4 – ITU-T Rec. H.264 | ISO/IEC 14496-10 also allows delivery of SPS and PPS by external means. This
Specification does not provide support for such delivery, and therefore requires SPS and PPS to be carried within the
AVC video stream.
    • Each AVC video sequence that contains hrd_parameters() with the low_delay_hrd_flag set to '1', shall
carry VUI parameters in which the timing_info_present_flag shall be set to '1'.
NOTE 5 – If the low_delay_hrd_flag is set to '1', then buffer underflow is allowed to occur in the STD model; see
2.14.3 and 2.14.4. Setting the timing_info_present_flag to '1' ensures that the AVC video stream contains sufficient
information to determine the DPB output time and the CPB removal time of AVC access units, also in case of
underflow.

 

    H.264的分帧在Mpeg2 ts or ps内是有规范定义的,也就是每一帧的开头都要有AUD单元,一个AUD单元包含一个H.264 access unit。因为除非按照H.264分帧策略去分帧,否则没有办法区分帧,因为NAL层最多只能将slice区分,而不能找到frame。

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值