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


相关推荐

  • 各种卷积操作[通俗易懂]

    各种卷积操作[通俗易懂]各种卷积的作用Filter与kernelfilter是多个kernel的串联,每个kernel分配给输入的特定通道。filter总是比kernel大一维。1.常规卷积运算整个过程可以用下图来概括。假设输入层为一个大小为64x64x3(Width=Height=64,Channel=3)的彩色图片。经过一个包含4个filter(每个filter有3个kernel,kernel_size=3×3)的卷积层,最终输出4个特征图(featuremap),且尺寸与输入层相同。因此卷积层的参数数量可以

    2022年5月28日
    47
  • 【C#基础】-Substring截取字符串的方法小结

    【C#基础】-Substring截取字符串的方法小结前言    在公司的图书馆项目中曾经用过截取字符串的方法,项目是java语言的;最近在公司的另一个项目中又需要截取字符串,一种环境是C#语言,一种环境是SQLServer存储过程;先来说一下后台程序中截取字符串的方法。正文c#中截取字符串主要是借助Substring这个函数。stringstring.Substring(intstartIndex,intlength)

    2022年5月10日
    34
  • CAP原理通俗理解「建议收藏」

    CAP原理通俗理解「建议收藏」在分布式系统中,有一个基本原则叫做CAP,consistence,一致性,availability,可用性,partitiontolerance分区容错性。 一致性,在这里指的是分布式系统的各个副本的值要保持同步,这里强的是空间上的一致,注意和数据库中ACID中的一致性相区分,那个一致性指的是事务执行前后的逻辑一致性,比如你转1000块给别人,不能你的账户少了1000块,对方的账户却没有多10…

    2022年5月12日
    44
  • java getclass_Java–getClass()和.Class的区别

    java getclass_Java–getClass()和.Class的区别在程序运行时期动态获得对象类型信息的操作,对比传统编程和反射的区别。传统编程:在编译阶段决定使用的类型反射:动态获得类型每个类都会产生一个对应的Class对象,也就是保存在.class文件。所有类都是在对其第一次使用时,动态加载到JVM的,当程序创建一个对类的静态成员的引用时,就会加载这个类。Class对象仅在需要的时候才会加载。类加载器首先会检查这个类的Class对象是否已被加载过,如果尚未加载…

    2022年6月15日
    23
  • python scipy库_micropython移植

    python scipy库_micropython移植SciPy最新官方文档的说明(20190730):Functionsfromscipy.interpolate(spleval,spline,splmake,andspltopp)andfunctionsfromscipy.misc(bytescale,fromimage,imfilter,imread,imresize,imrotate,imsave,i…

    2022年10月14日
    0
  • js 浮动广告代码

    js 浮动广告代码

    2022年9月20日
    0

发表回复

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

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