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


相关推荐

  • C++使用eigen库做本征分解(eigendecomposition)

    C++使用eigen库做本征分解(eigendecomposition)Eigendecomposition的概念可见https://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix这里贴一段厄米矩阵的代码,见ht

    2022年8月2日
    5
  • SDIO接口_gmac接口是什么意思

    SDIO接口_gmac接口是什么意思文章目录SDIO信号和接口SDIO命令流程SDIO寄存器卡检测卡识别卡常用命令SDIO,全称:SecureDigitalInputandOutput,即安全数字输入输出接口。SDIO卡是在SD内存卡接口的基础上发展起来的接口,SDIO接口兼容以前的SD内存卡,并且可以连接SDIO接口的设备,目前根据SDIO协议的SPEC,SDIO接口支持的设备总类有蓝牙,网卡,电视卡等。支持三种不同…

    2022年10月4日
    5
  • linux更改密码策略_hpunix设置用户密码策略

    linux更改密码策略_hpunix设置用户密码策略如何设置 Linux 系统的密码策略

    2022年4月22日
    223
  • vscode 配置python 开发环境

    vscode 配置python 开发环境1 安装 Pythonextens 点击选择 python 解释器 gt Enterinterpr gt Find 找到 python 解析器的路径 在 settings json 中会添加 python pythonPath 字段 注意 如果未打开工作空间文件夹时选择解释器 则 VSCode 会在用户设置中设置 python pythonPath 这通常设置 VSCode 的默认解释器 用户设置可确保您始终具

    2025年12月3日
    6
  • java对象转换为json字符串_java中将字符串转换为json

    java对象转换为json字符串_java中将字符串转换为json概要Jackson是基于java平台的json处理框架。Jackson提供了三种可选的json处理方法:流式API、树模型、数据绑定(dataBinding),其中数据绑定是最常用的处理方式;本文主要介绍数据绑定的处理方式。java对象与json字符串互相转换java对象与json字符串互相转换的关键就是ObjectMapper对象的writeValue()方法和readValue()方法;其中json字符串可以字符串的形式传入/传出,也可以以文件的形式传入/传出,见wri.

    2025年11月30日
    10
  • IOS安全、逆向、反编译1-越狱知识讲解[通俗易懂]

    IOS安全、逆向、反编译1-越狱知识讲解[通俗易懂]之前开发了一个对安全性要求比较高的APP,所以对安全、逆向和反编译有了一些认识,最近有时间就想系统的把这些知识做一个整理。今天就开始把我的学习过程记录下来。iOS越狱环境搭建在学习iOS越狱之前,我们当然需要一台iOS设备,由于现在基本上都是64位系统为主,所以最好是使用ARM64架构的设备,因此首先我们的手机至少需要iPhone5S或者之后的iPhone设备,平板至少是iPadAir、…

    2022年5月8日
    91

发表回复

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

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