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


相关推荐

  • springboot项目启动原理_相关滤波器的基本原理

    springboot项目启动原理_相关滤波器的基本原理一、springboot启动原理及相关流程概览springboot是基于spring的新型的轻量级框架,最厉害的地方当属自动配置。那我们就可以根据启动流程和相关原理来看看,如何实现传奇的自动配置二、springboot的启动类入口用过springboot的技术人员很显而易见的两者之间的差别就是视觉上很直观的:springboot有自己独立的启动类(独立…

    2022年8月21日
    10
  • QTreeView中finditems查找子项

    QTreeView中finditems查找子项1、QListQStandardItemModel::findItems(constQString&text,Qt::MatchFlagsflags=Qt::MatchExactly,intcolumn=0)const不特殊指定第二个参数的情况下,此函数只会搜索TreeView的顶层元素,不会匹配子元素。第二个参数中加入“Qt::MatchContains|Q

    2022年6月11日
    28
  • 一文看懂半监督学习(Semi-supervised Learning)和自监督学习(Self-Supervised Learning)

    一文看懂半监督学习(Semi-supervised Learning)和自监督学习(Self-Supervised Learning)1.机器学习学习任务1.1监督学习根据输入-输出样本对L={(x1,y1),⋅⋅⋅,(xl,yl)}L=\{(x1,y1),···,(xl,yl)\}L={(x1,y1),⋅⋅⋅,(xl,yl)}学习输入到输出的映射f:X−>Yf:X->Yf:X−>Y,来预测测试样例的输出值。SL包括分类(Classification)和回归(Regression)两类任务,分类中的样例xi∈Rmx_i∈R^mxi​∈Rm(输入空间),类标签yi∈{c1,c2,⋅⋅⋅,cc}y_i∈\{c_1,c

    2022年9月13日
    2
  • 分布式计算概述_分布式计算与处理

    分布式计算概述_分布式计算与处理**分布式计算是当前计算机领域常见的名词,那么到底什么是分布式,什么又是分布式计算呢?今天和大家共同研究一下这个话题。**分布式计算的概念一个分布式系统是由若干通过网络互联的计算机组成的软硬件系统,且这些计算机互相配合以完成一个共同目标(往往这个共同目标称为“项目”)分布式计算的优缺点优点:1.超大规模2.虚拟化3.高可靠性4.通用性5.高伸缩性6.按需服务7….

    2025年8月7日
    1
  • ”周期天王”20大预言,针针见血,看完整个人通透多了

    ”周期天王”20大预言,针针见血,看完整个人通透多了周期天王”20大预言,针针见血,看完整个人通透多了东方财富网、投行大师兄 2017-05-0914:07近期,股市个股乏力、债市毫无起色、商品跌跌不休。一行三会大力推进金融去杠杆,再叠加地产调控持续加码与信贷收缩,市场风险偏好显著下降,股、债、商“三杀”频现。无论是美联储3月暂缓加息的佳音,还是法国大选暂无黑天鹅的捷报,都无法振奋我们的市场丝毫。外盘一

    2025年5月25日
    2
  • idea 2021.12激活-激活码分享

    (idea 2021.12激活)本文适用于JetBrains家族所有ide,包括IntelliJidea,phpstorm,webstorm,pycharm,datagrip等。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年3月30日
    99

发表回复

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

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