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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 奥的斯3100电气图纸_OTIS奥的斯XIOTIS西子奥的斯ACD3 Gen2 MRL电气原理图纸DAA21311BB.pdf…「建议收藏」

    奥的斯3100电气图纸_OTIS奥的斯XIOTIS西子奥的斯ACD3 Gen2 MRL电气原理图纸DAA21311BB.pdf…「建议收藏」12345678AABBCCDDEEWiringDiagramDAA21311BBACD3YAOXINLIUWEIYAOZHIYONG56CN22919311234567812345678L1*AROW/AROU2*VAC/(3~3c).C1L-1UU11**VACVAC/(3~3c).B1L1*C…

    2022年6月21日
    52
  • 单片机入门到高级开挂学习路径(附教程+工具)[通俗易懂]

    单片机入门到高级开挂学习路径(附教程+工具)[通俗易懂]一、先帮大家解答几个问题:1.单片机是什么?答:单片机就是一个微型CPU,把程序烧录芯片里面,通过控制不同的外围电路实现不同产品的功能。2.学单片机编程对数学英语有要求吗?答:数学会基本的加减乘除就行,英语会认单词a-z就行,很多外行人看到代码里一堆英文就头嗡嗡响,其实不然,只有少数语法是固定的,大多数英文都是工程师自己定义的,比如大神你也可以定义成DaShen(中文缩写)。那很多人此时就开始质疑,当初这么辛苦学数学和英语到底是为毛?数学和英语不是单片机开发的门槛,但却决定你以后能达到的高度,

    2022年6月10日
    61
  • MATLAB 8.1 R2013a license.lic 问题

    MATLAB 8.1 R2013a license.lic 问题MATLAB8.1R2013alicense.lic问题…\MATLAB8.1R2013a\Matlab801\serial\license.lic1.修改系统时间修改系统时间至之前license.lic时间。2.修改license.liclicense.lic内容修改为:INCREMENTAerospace_BlocksetMLM99permanentuncounted\A05070F00D1EB1F923

    2022年7月26日
    14
  • golang 2021最新激活码_通用破解码[通俗易懂]

    golang 2021最新激活码_通用破解码,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月17日
    66
  • Typescript教程_typescript在线运行

    Typescript教程_typescript在线运行前言由于最近在使用vue3写项目,使用vue3的前提就是要学习TypeScript,TypeScript算是JavaScript的升级版,TypeScript包含JavaScript和自己的一些特性

    2022年8月7日
    8
  • VMware 虚拟机无法连接网络解决办法

    VMware 虚拟机无法连接网络解决办法废话不多说,直接上干货1.如果你发现在VMware下运行的虚拟机无法连接网络,那下面的方法也许可以帮到你。(前提是你的物理网络是通的)第一步:在VMware界面下单击“编辑“→”虚拟网络编辑器”第二步:单击”更改设置”获取权限,如果有。则不需要单击第三步:单击左下角的”恢复默认设置“,等待完成,然后确定退出。第四步:刚刚恢复

    2022年5月19日
    112

发表回复

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

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