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.

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • NLP词向量和句向量方法总结及实现

    NLP词向量和句向量方法总结及实现目录一、Word2Vec1、Word2Vec介绍2、Gensim实现Word2Vec3、基于Word2Vec的句向量4、基于加权Word2Vec的句向量5、基于Word2Vec的文本向量化实现二、GloVe1、GloVe介绍2、基于源码的GloVe词向量生成(Linux下实现)3、Gensim加载GloVe训练的词向量三、Doc2Vec1、Doc2V…

  • python激活码2021【2021.8最新】

    (python激活码2021)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。https://javaforall.cn/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~S32PGH0SQB-eyJsaWNlbnNlSWQiOi…

  • Java基础入门笔记05——面向对象,创建对象的内存分析,继承,封装,多态,object类,this&&super,方法重写,引用类型的强制转换,instanceof,抽象类,内部类,接口,异常。[通俗易懂]

    Java基础入门笔记05——面向对象,创建对象的内存分析,继承,封装,多态,object类,this&&super,方法重写,引用类型的强制转换,instanceof,抽象类,内部类,接口,异常。[通俗易懂]面向对象OOP——(Object-Oriented Programming)面向对象程序设计面向过程——线性思维面向对象——分类思维:大事化小,分而治之面向对象的本质:以类的方式组织代码,以对象的形式组织(封装)数据三大特征封装继承多态在认识角度:先有对象,后有类。在代码运行角度:向有类,后有对象。类是对象的模板,对象是类的实例。方法回顾public class Demo01 { //main 方法 public static void main(String[

  • 混合开发hybrid原理_unity引擎开源吗

    混合开发hybrid原理_unity引擎开源吗首先,我们先来罗列一下当前市面上,移动端的各种开发方法1.NativeApp纯原生的app开发模式,android(Java)或者ios(Swift,Oc)优点:有最好的性能,有最好的体验缺点:开发和发布的成本极高,两端需要不同的技术人员来维护,原生开发人员非常的稀缺2.WebApp移动端运行在浏览器上的网站,我们一般称之为H5应用,就是泛指我们经常开发的spa,map页面语言:js,vue,react,angular等优点:1.开发和发布非常方便2.用户看到的页面,会随着开发人

  • shell脚本编程100例pdf_linux基础命令表

    shell脚本编程100例pdf_linux基础命令表https://blog.csdn.net/yugemengjing/article/details/82469785https://blog.csdn.net/yugemengjing/article/details/824697851、编写helloworld脚本#!/bin/bash#编写helloworld脚本echo”HelloWorld!”2、通过位置变…

  • st7789 旋转_有没有人调过 ST7789V驱动的显示屏啊「建议收藏」

    本帖最后由quanhengwen于2019-9-511:15编辑可以在显示命令之前,手工进行全屏清屏操作,可以避免初始化花屏现象。自己部分代码SPI控制的分辨率为320*240横屏显示/******************************************************************************函数说明:LCD初始化函数入口数据:无返回…

发表回复

您的电子邮箱地址不会被公开。

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