h264 profile & level

H.264 Profiles

H.264有四种profile,每个profile支持一组特定的编码功能,并支持一类特定的应用,分别是BP、EP、MP、HP:

1、BP-Baseline Profile:

       a、I/P slices

       b、Multiple reference frames (–refs <int>, >1 in the x264 CLI)

       cIn-loop deblocking(环路滤波)

       dCAVLC entropy coding (–no-cabac in the x264 CLI)

利用I片和P片支持帧内和帧间编码,支持利用基于上下文的自适应的变长编码进行的熵编码(CAVLC)和只支持无交错(Progressive)。主要用于可视电话、会议电视、无线通信等实时视频通信。

2EP-Extendedprofile

         支持I/P/B/SP/SI帧,即支持码流之间有效的切换(SPSI片)、改进误码性能;只支持无交错(Progressive)和CAVLC;但不支持隔行视频和CABAC

3MP-Main profile

       a、Baseline Profile features mentioned above

       b、B slices

       cCABACentropy coding

       dInterlacedcoding – PAFF/MBAFF

       eWeightedprediction

提供I/P/B 帧,支持无交错(Progressive)和交错(Interlaced),也支持CAVLC 和CABAC 的支持;主要用于数字广播电视与数字视频存储。

4HP-High profile

        a、Main Profile features mentioned above

        b8×8 transform option (–8×8dct in the x264 CLI)

c Custom quantisation matrices

        在mainProfile的基础上增加了8x8内部预测、自定义量化、 无损视频编码和更多的YUV格式。

   H.264 FRExt(即:FidelityRange Extensions)扩展部分(Amendment),包括High profile(HP)、High10 profile(Hi10P)、High 4:2:2 profile(Hi422P)、High4:4:4 profile(Hi444P)4个profile。H.264 Baseline profile、Extended profileMain profile都是针对8位样本数据、4:2:0格式的视频序列,FRExt将其扩展到812位样本数据,视频格式可以为4:2:04:2:24:4:4,设立了High profileHP)、High 10profileHi10P)、High 4:2:2 profileHi422P)、High 4:4:4 profileHi444P 4profile,这4profile都以Main profile为基础

   在相同配置情况下,Highprofile(HP)可以比Mainprofile(MP)节省10%的码流量,比MPEG-2 MP节省60%的码流量,具有更好的编码性能。根据应用领域的不同,Baselineprofile多应用于实时通信领域,Main profile多应用于流媒体领域,High profile则多应用于广电和存储领域。


---------------------------

下面是x264关于profile的简单特点描述

--profile<string>      Force the limits ofan H.264 profile

                                  Overrides allsettings.

                                  - baseline:

                                    --no-8x8dct--bframes 0 --no-cabac

                                    --cqm flat--weightp 0

                                    Nointerlaced.

                                    Nolossless.

                                  - main:

                                    --no-8x8dct--cqm flat

                                    Nolossless.

                                  - high:

                                    Nolossless.

                                  - high10:

                                    Nolossless.

                                    Support forbit depth 8-10.

                                  - high422:

                                    Nolossless.

                                    Support forbit depth 8-10.

                                    Support for4:2:0/4:2:2 chroma subsampling.

                                  - high444:

                                    Support forbit depth 8-10.

                                    Support for4:2:0/4:2:2/4:4:4 chroma subsampling.

-----------------------------------------------------------------------------------------------

符合BaselineProfile 的比特流应该遵守如下的限制:

-- 比特流中只能出现I  P 片。

-- NAL 单元比特流的nal_unit_type 值不应该落在[24](包括24,下同)范围内。

注释:nal_unit_type=2对应片分区Anal_unit_type=3对应片分区Bnal_unit_type=4对应片分区C。因为baselineprofile不采用数据分区的方法。

-- 序列参数集中的frame_mbs_only_flag 应该等于1

注释:frame_mbs_only_flag 等于0 表示编码视频序列的编码图像可能是编码场或编码帧。frame_mbs_only_flag 等于1表示编码视频序列的每个编码图像都是一个仅包含帧宏块的编码帧。

-- 图像参数集中的weighted_pred_flag weighted_bipred_idc 都应该等于0

注释:weighted_pred_flagequal to 0 specifies that weighted prediction(加权预测) shall not be applied to P and SPslices.weighted_pred_flag equal to 1 specifies that weighted prediction shallbe applied to P and SP slices.

weighted_bipred_idcequal to 0 specifies that the default weighted prediction(默认的加权预测) shall be applied to B slices.weighted_bipred_idcequal to 1 specifies that explicit weighted prediction(指定的加权预测方式) shall be applied to B slices.weighted_bipred_idcequal to 2 specifies that implicit weighted prediction(隐含的加权预测方式) shall be applied to B slices. The value ofweighted_bipred_idcshall be in the range of 0 to 2, inclusive.

-- 图像参数集中的entropy_coding_mode_flag 应该等于0

注释:entropy_coding_mode_flag=0,表示熵编码使用CAVLC

-- 图像参数集中的num_slice_groups_minus1 应该在[07]范围之内。

注释:本句法元素加1表示图像中片组的个数。H.264中没有专门的句法元素用于指明是否使用片组模式,当本句法元素等于0时(即只有一个片组),表示不使用片组模式,后面也不会跟有用于计算片组映射到句法元素。

-- 应该满足在A.3 节中规定的Baseline profile 级别限制。

Baselineprofile 相符的比特流,它的profile_idc 应该等于66。对一个遵守Baseline profile某个指定级别的解码器,它能够解码任何符合如下要求的比特流:1. profile_idc 等于66 或者constraint_set0_flag 等于1; 2. level_idc所代表的级别小于或等于这个指定的级别。

注释:constraint_set0_flag  其值等于1表示必须遵从标准中附录A.2.1(即上面)所指明的所有约束条件;等于0表示不必遵从所以条件。


--------------------------------------------------------------------------------------------

h264 level

   每个profile 都规定了一个算法特征和限制的子集,任何遵守某个profile 的解码器都应该支持与其相应的子集。

   每个level都规定了一组对标准中语法成员(syntax element)所采用的各种参数值的限制。

在给定的profile下,level通常与解码器的处理能力和内存容量相对应。每一个档次设置不同的参数(如取样速率、图像尺寸、编码比特率等),得到对应的编解码器性能的不同level。

下图是levels参数表格


几种h.264 software encoder


  • 8
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值