H264的level的计算方法

比如分辨率: 1920*1080, 参考帧率: 60的h264码流是哪个level呢

H.264的宏块大小为16×16 in H.264,每帧宏块的个数为分辨率除以16
max-fs = ceil( width / 16.0 ) * ceil( height / 16.0 )

计算得:8100


每秒宏块数量为每帧宏块数乘以帧率.
max-mbps =max-fs*参考帧率

计算得:486000

参考ITU. p. 324. "Recommendation ITU-T H.264"表格:

Levels with maximum property values [39]
LevelMax. decoding speedMax. frame sizeMax. video bit rate for
video coding layer (VCL)
kbit/s (Baseline, Extended and
Main Profiles)
Examples for high resolution
@ highest frame rate

Toggle additional details

Luma samples/sMacroblocks/sLuma samplesMacroblocks
1380,1601,48525,3449964

128×96@30

176×144@15
1b380,1601,48525,34499128

128×96@30

176×144@15
1.1768,0003,000101,376396192

128x96@60
176×144@30

352×288@7.5
1.21,536,0006,000101,376396384

128x96@120
176×144@60

352×288@15
1.33,041,28011,880101,376396768

128x96@172
176×144@120

352×288@30
23,041,28011,880101,3763962,000

128x96@172
176x144@120

352×288@30
2.15,068,80019,800202,7527924,000

176x144@172
352×240@60
352×288@50
352×480@30

352×576@25
2.25,184,00020,250414,7201,6204,000

176×144@172
352×480@30
352×576@25
720×480@15

720×576@12.5
310,368,00040,500414,7201,62010,000

176×144@172
352×240@120
352×480@60
720×480@30

720×576@25
3.127,648,000108,000921,6003,60014,000

352x288@172
352x576@130
640x480@90
720×576@60

1,280×720@30
3.255,296,000216,0001,310,7205,12020,000

640x480@172
720x480@160
720x576@130

1,280×720@60
462,914,560245,7602,097,1528,19220,000

720x480@172
720x576@150
1,280×720@60

2,048×1,024@30
4.162,914,560245,7602,097,1528,19250,000

720x480@172
720x576@150
1,280×720@60

2,048×1,024@30
4.2133,693,440522,2402,228,2248,70450,000

720x576@172
1,280×720@140

2,048×1,080@60
5150,994,944589,8245,652,48022,080135,000

1,024×768@172
1,280×720@160
2,048×1,080@60
2,560×1,920@30

3,680×1,536@25
5.1251,658,240983,0409,437,18436,864240,000

1,280×720@172
1,920×1,080@120
2,048×1,536@80

4,096×2,048@30
5.2530,841,6002,073,6009,437,18436,864240,000

1,920×1,080@172
2,048×1,536@160

4,096×2,160@60
61,069,547,5204,177,92035,651,584139,264240,000

2,048×1,536@300
4,096×2,160@120

8,192×4,320@30
6.12,139,095,0408,355,84035,651,584139,264480,000

2,048×1,536@300
4,096×2,160@240

8,192×4,320@60
6.24,278,190,08016,711,68036,651,584139,264800,000

4,096*2,304@300

8,192×4,320@120

 

根据每秒宏块数,来查对应表格.
Level 4.1
VBV maximum bit rate [1000bits/s] 50Mbit/s
Macroblocks/s 245760
Resolution and frame rate 1920×1088@30 or 2Kx1K@30

Level 4.2
VBV maximum bit rate [1000bits/s] 50Mbit/s
Macroblocks/s 522240
Resolution and frame rate 1920×1088@60 or or 2Kx1K@60

可见486000在Level 4.1和Level 4.2之间,所以Level是4.2, Level的确定原则是找<=的关系.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值