H263/H264Header解析(h264_mp4toannexb_filter)

函数h264_mp4toannexb_filter详解   

 1、ffmpeg中处理h264码流分为两种情况 
  a、没有extradata则直接把packet中的数据交给解码器
  b、如果有extradata,则需要把sps和pps的数据分析出来,连同packet.data一起交给解码器

 2、如何从extradata中分离sps and pps,分两种情况 
  a、sps and pps 都有的情况(假设sps和pps都有2个units,下同)

  
 b、没有sps的情况   

3、如何组合packet.data,假如有2个nal,sps与pps的unit num均为1 
 

H263 Header       
  Bit 1    Always "1", in order to avoid start code emulation. 
  Bit 2    Always "0", for distinction with ITU-T Rec. H.261. 
  Bit 3    Split screen indicator, "0" off, "1" on. 
  Bit 4    Document camera indicator, "0" off, "1" on. 
  Bit 5    Full Picture Freeze Release, "0" off, "1" on. 
  Bits 6-8    Source Format, "000" forbidden, "001" sub-QCIF, "010" QCIF, "011" CIF, "100" 4CIF, "101" 16CIF, "110" reserved, "111" extended PTYPE. If bits 6-8 are not equal to "111", which indicates an extended PTYPE (PLUSPTYPE), the following five bits are also present in PTYPE
  Bit 9    Picture Coding Type, "0" INTRA (I-picture), "1" INTER (P-picture). 
  Bit 10    Optional Unrestricted Motion Vector mode (see Annex D), "0" off, "1" on. 
  Bit 11    Optional Syntax-based Arithmetic Coding mode (see Annex E), "0" off, "1" on. 
  Bit 12    Optional Advanced Prediction mode (see Annex F), "0" off, "1" on. 
  Bit 13    Optional PB-frames mode (see Annex G), "0" normal I- or P-picture, "1" PB-frame. 
 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值