H.264和HEVC如何正确的丢帧

文章目录


播放器内部逻辑肯定是存在丢帧的逻辑的,只有丢掉不被依赖的帧才不会导致花屏,RFC中有说明。

H.264

具体可以参考rfc3984#section-1.3,也就是nal_ref_idc的值为0时,此帧可以被丢弃(相对来说没那么重要当解码能力不足的时候可以丢弃)。这里的NRI是H.264的NALU的头部信息中的一个字段,可以看看WebRTC之H.264打包RtpPacketizerH264,有好几种type的值会是0。

NRI: 2 bits
      nal_ref_idc.  A value of 00 indicates that the content of the NAL
      unit is not used to reconstruct reference pictures for inter
      picture prediction.  Such NAL units can be discarded without
      risking the integrity of the reference pictures.  Values greater
      than 00 indicate that the decoding of the NAL unit is required to
      maintain the integrity of the reference pictures.

HEVC

具体可以参考rfc7798#section-1.1.2,也就是nal_unit_type类型为RASL_NRASL_R时,此帧可以被丢弃。

There are two
   types of leading pictures: Random Access Decodable Leading (RADL)
   pictures and Random Access Skipped Leading (RASL) pictures.  RADL
   pictures are decodable when the decoding started at the associated
   IRAP picture; RASL pictures are not decodable when the decoding
   started at the associated IRAP picture and are usually discarded.
   HEVC provides mechanisms to enable specifying the conformance of a
   bitstream wherein the originally present RASL pictures have been
   discarded.  Consequently, system components can discard RASL
   pictures, when needed, without worrying about causing the bitstream
   to become non-compliant.
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值