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


相关推荐

  • 电路实习报告:简易收音机的焊接

    电路实习报告:简易收音机的焊接本文是本科生电路实习(焊接部分)的实习报告

    2022年10月24日
    0
  • leetcode-160. 相交链表(链表)

    leetcode-160. 相交链表(链表)给你一个整数数组 nums ,请你找出数组中乘积最大的连续子数组(该子数组中至少包含一个数字),并返回该子数组所对应的乘积。示例 1:输入: [2,3,-2,4]输出: 6解释: 子数组 [2,3] 有最大乘积 6。示例 2:输入: [-2,0,-1]输出: 0解释: 结果不能为 2, 因为 [-2,-1] 不是子数组。/** * Definition for singly-linked list. * struct ListNode { * int val; *

    2022年8月11日
    0
  • oracle中sqrt函数的使用方法,PLSQL SQRT用法及代码示例[通俗易懂]

    oracle中sqrt函数的使用方法,PLSQL SQRT用法及代码示例[通俗易懂]SQRT函数是PLSQL中的内置函数,用于返回给定输入数字的平方根。用法:SQRT(number)使用的参数:该函数接受如下所示的参数:数字–这是要计算其平方根的输入数字。返回值:此函数返回一个数字,该数字是给定输入数字的平方根。下面给出了受支持的Oracle/PLSQL版本:甲骨文12c甲骨文11g甲骨文10g甲骨文9i甲骨文8i我们来看一些说明SQRT功能的示例:示例1:DECLARET…

    2022年5月13日
    114
  • lombok插件失效原因_lombok插件下载

    lombok插件失效原因_lombok插件下载昨晚项目出了个小问题,lombok插件失效了。由于使用了lombok的@Data注解生成实体类的getter和setter,项目运行时所有的使用getter和setter方法的地方全都报错。看了网上的解决方案,一个一个试,发现没有一个能解决我的问题最后,我发现在pom.xml文件里面的<build></build>里面缺少了lombok的部分,把他加上即可<build><plugins><plugin

    2022年9月3日
    2
  • batch spring 重复执行_Spring Batch批处理

    batch spring 重复执行_Spring Batch批处理SpringBatch批处理批处理顾名思义是批量处理大量数据,但是这个大量数据又不是特别大的大数据,比Hadoop等要轻量得多,适合企业单位人数薪资计算,财务系统月底一次性结算等常规数据批量处理。SpringBatch是一个用于创建健壮的批处理应用程序的完整框架。您可以创建可重用的函数来处理大量数据或任务,通常称为批量处理。如SpringBatch文档中所述,使用该框架的最常见方案如下:•定…

    2022年5月28日
    52
  • UpdatePanel用法详解

    UpdatePanel用法详解本文转自:http://www.cnblogs.com/shangxia/articles/2281782.html今天用做日历显示本月的考勤记录,用到了UpdatePanel控件,才发现对这个控件并不太了解,所以找了点儿资料,整理了一下给大家发上来!一、UpdatePanel的结构”ScriptManager1″runat=”server”>”Update

    2022年7月23日
    8

发表回复

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

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