AVC1与H264的差别

AVC1与H264的差别

大家好,又见面了,我是全栈君,祝每个程序员都可以多学几门语言。

今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。

H.264 Video Types

The following media subtypes are defined for H.264 video.

Subtype FOURCC Description
MEDIASUBTYPE_AVC1 ‘AVC1’ H.264 bitstream without start codes.
MEDIASUBTYPE_H264 ‘H264’ H.264 bitstream with start codes.
MEDIASUBTYPE_h264 ‘h264’ Equivalent to MEDIASUBTYPE_H264, with a different FOURCC.
MEDIASUBTYPE_X264 ‘X264’ Equivalent to MEDIASUBTYPE_H264, with a different FOURCC.
MEDIASUBTYPE_x264 ‘x264’ Equivalent to MEDIASUBTYPE_H264, with a different FOURCC.

The main difference between these media types is the presence of startcodes in the bitstream. If the subtype is MEDIASUBTYPE_AVC1, thebitstream does not contain start codes.

H.264 Bitstream Without Start Codes

The MP4 container format stores H.264 data without start codes.Instead, each NALU is prefixed by a length field, which gives thelength of the NALU in bytes. The size of the length field can vary, butis typically 1, 2, or 4 bytes.

When start codes are not present in the bitstream, the following media type is used.

Major type MEDIATYPE_Video
Subtype MEDIASUBTYPE_AVC1
Format type FORMAT_MPEG2Video

 

The format block is an MPEG2VIDEOINFO structure. This structure should be filled in as follows:

  • hdr: A VIDEOINFOHEADER2 structure that describes the bitstream. No color table is present after the BITMAPINFOHEADER portion of the structure, and biClrUsed must be zero.
  • dwStartTimeCode: Not used. Set to zero.
  • cbSequenceHeader: The length of the dwSequenceHeader array in bytes.
  • dwProfile: Specifies the H.264 profile.
  • dwLevel: Specifies the H.264 level.
  • dwFlags: The number of bytes used for the length field that appears before each NALU. The length field indicates the size of the following NALU in bytes. For example, if dwFlags is 4, each NALU is preceded by a 4-byte length field. The valid values are 1, 2, and 4.
  • dwSequenceHeader: A byte array that may contain sequence parameter set (SPS) and picture parameter set (PPS) NALUs.

The MP4 container might contain sequence parameter sets (SPS) orpicture parameter sets (PPS) as special NAL units in file headers or ina separate stream (distinct from the video stream). When the format isestablished, the media type can specify SPS and PPS NAL units in the dwSequenceHeader array. If cbSequenceHeader is greater than zero, dwSequenceHeaderis the start of a byte array containing SPS and PPS NALUs, delimited by2-byte length fields, all in network byte order (big-endian). It ispossible to have both SPS and PPS, only one of these types, or none.The actual type of each NALU can be determined by examining thenal_unit_type field of the NALU itself.

When this media type is used, each media sample starts at thebeginning of a NALU, and NAL units do not span samples. This enablesthe decoder to recover from data corruption or dropped samples.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/118812.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • python实现word文档批量转成自定义格式的excel文档

    python实现word文档批量转成自定义格式的excel文档

    2022年2月13日
    34
  • Python 数组截取

    Python 数组截取#数据源names=[‘a’,’b’,’c’,’d’,’e’,’f’]#正常获取print(names[1])#b#截取print(names[0:3])#[‘a’,’b’,’c’]print(names[3:10])#[‘d’,’e’,’f’]#截取:从指定开始直接到指定结尾print(names[3:])#[‘d’,’e’,’f’]print(names[:3])#[‘a’,’b’,’c’]#倒着切print(na

    2022年6月10日
    73
  • 下拉列表框DropDownList绑定Dictionary泛型类

    下拉列表框DropDownList绑定Dictionary泛型类DropDownList绑定Dictionary泛型类定义一个Dictionary泛型类///<summary>   ///产品类型   ///</summary>   ///<returns></returns>   publicDictionary<string,string>productType() …

    2022年10月8日
    3
  • idea设置热部署

    idea设置热部署其实,idea和eclipse设置热部署都很简单,但是很多人都会忽略掉一点,那就是:一定要在debug模式下才有用!!(配置文件什么的还是要重启的)(不像myeclipse直接star也可以热部署,对于我这种用惯了myeclipse的来说,基本没用debug启动过,所以老觉得配置没用)idea部署方法:(转自https://www.cnblogs.com/1024zy/p

    2022年6月12日
    41
  • 微信塔防小游戏开发教程,唤境引擎制作塔防游戏分享

    微信塔防小游戏开发教程,唤境引擎制作塔防游戏分享今天带来的是塔防游戏制作攻略!点击这里来下载工程文件,点击这里可以下载工程中所用的素材哦~预览状态时敌人会从四个生成点随机生成,并且会自动寻路绕过黑色墙体走向红色终点。点击黑色墙体可以创建炮塔,炮塔会自动攻击敌人。废话不多说,快打开唤境燥起来~!1.新建项目首先,打开唤境,点击欢迎页左上角的新建项目按钮。在弹出的项目设置中,选择窗口尺寸为800*600。命名为“塔防…

    2022年5月10日
    158
  • 物联网开发_物联网是不是一种骗局

    物联网开发_物联网是不是一种骗局物联网期末大作业—睡眠质量检测系统

    2022年10月9日
    3

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号