AVC1与H264的区别

AVC1与H264的区别今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。H.264VideoTypesThefollowingmediasubtypesaredefinedforH.264video.SubtypeFOURCCDescri

大家好,又见面了,我是你们的朋友全栈君。

今天上网时偶尔发现这个在我脑海里疑惑的问题的答案。

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

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

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

(0)


相关推荐

  • Linuxstat_linux内核编译的基本流程

    Linuxstat_linux内核编译的基本流程stat函数讲解:表头文件:#include#include定义函数:intstat(constchar*file_name,structstat*buf);函数说明:通过文件名filename获取文件信息,并保存在buf所指的结构体stat中返回值:执行成功则返回0,失败返回-1,错误代码存于errno错误代码:ENOENT参数file_name指定的文件不存在ENOT…

  • 卸载奇安信天擎,流氓软件怎么卸载_奇安信和360天擎

    卸载奇安信天擎,流氓软件怎么卸载_奇安信和360天擎奇安信天擎,很多朋友应该都不陌生,现在很多公司都要求每个员工的电脑上必须安装奇安信天擎这个软件,尤其是稍微大一点的公司,数据需要保密或容易被攻击的公司,奇安信可以有效的防御这些攻击。看到这是不是有朋友在想这不是一个很好的防御软件吗,为什么说是流氓软件呢?这个软件之所以叫它流氓软件,是因为这个软件一旦安装,既无法退出也无法卸载,有些朋友现在会想,这个软件就放那放着就好了啊,反正是防御的软件,我只能说你还没有了解奇安信的缺点。奇安信与一切杀毒软件冲突,公司要求安装奇安信,你就要把电脑之前的杀毒软件卸载,这

  • hikaripool连接保持,HikariPool-1 – 连接不可用,请求超时后[通俗易懂]

    hikaripool连接保持,HikariPool-1 – 连接不可用,请求超时后[通俗易懂]I’musingHikariCP2.4.7forconnectionpool.EverythingisfinejustafterstartingtheapplicationbutaftersometimewithoutinvokinggetConnection()IgetthiserrorwhenI’mtryingtogetConnect…

  • php interface exists,php interface_exists、class_exists、method_exists和propert

    php interface exists,php interface_exists、class_exists、method_exists和propert下面我们一起来看在php中PHP类和对象函数这phpinterface_exists、class_exists、method_exists和property_exists详解,希望文章对各位同学会有所帮助。1.interface_exists、class_exists、method_exists和property_exists:顾名思义,从以上几个函数的命名便可以猜出几分他们的功能。我想这…

  • C语言之-1与0xffffffff[通俗易懂]

    C语言之-1与0xffffffff[通俗易懂]#include<stdio.h>intmain(){ unsignedintuint; inti=-1; uint=i; printf("%x%d\n",uint,i);//输出ffffffff-1 uint=0xffffffff; i=uint; printf("%x%d\n",uint,i);//输…

  • generic host process for win32_hostunreachable怎么解决

    generic host process for win32_hostunreachable怎么解决本人使用的windows2003sp1英文版。昨天开始总是莫明其妙出现GenericHostProcess进程出错提示框,紧跟着svchost内存出错提示框, 之后一些service就停止工作,比如WindowsAudio,必须手动重启才能听音乐;网络连接假死,tcp连接需要重连,不胜其扰。上网搜了些文章,基本上分为三个原因:1,木马病毒。2,系统漏洞。3,硬件驱动问题

    2022年10月10日

发表回复

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

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