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/118605.html原文链接:https://javaforall.net

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


相关推荐

  • django动态路由_路由器和转换器的区别

    django动态路由_路由器和转换器的区别自定义路径转换器有时候上面的内置的url转换器并不能满足我们的需求,因此django给我们提供了一个接口可以让我们自己定义自己的url转换器django内置的路径转换器源码解析在我们自定义路由转

    2022年7月30日
  • 轻松解析excel文件 —-利用MFC读取excel文件

    轻松解析excel文件 —-利用MFC读取excel文件在项目中需要解析excel文件,尝试了很多办法,最后还是利用MFC自带的解析Excel类。网上的资源很多,前面添加类步骤基本差不多,都能成功,但是在自己写类进行封装的时候,抄袭现象很明显,很多错误还是接着一字不差的发上来。最后找了一个错误不是很多的,自己修改封装,先附上一个demo。(1)在Button控件下添加以下代码用于选取需要读取的文件stringpath; path=CT…

    2022年6月28日
  • CIDR的特殊性

    CIDR的特殊性

    2022年3月8日
  • SQL通配符

    SQL通配符通常我们只是用%作为通配符,用来表示任意个字符。但sql中的通配符还有下划线_,用来标识任意一个字符实例SELECT*FROMWebsitesWHEREnameLIKE&#

    2022年7月3日
  • linux如何停掉计划任务,Linux系统的任务计划

    linux如何停掉计划任务,Linux系统的任务计划Linux系统的计划任务Linux系统运维工程师大部分管理工作都是通过定期自动执行某一脚本来完成的。Cron功能很重要,牢记!!!计划功能Crontab:-u:(user)表示指定某个用户,不加-u则为当前用户-e:表示指定计划任务-l:(list)表示列出计划任务-r:(remove)表示删除计划任务#crontab-e011005063echo”ok”>/root/cr…

    2022年7月15日
  • DTW和DBA_电台文本

    DTW和DBA_电台文本DTW(动态时间调整)动态时间调整算法是大多用于检测两条语音的相似程度,由于每次发言,每个字母发音的长短不同,会导致两条语音不会完全的吻合,动态时间调整算法,会对语音进行拉伸或者压缩,使得它们竟可能

    2022年8月3日

发表回复

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

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