当前位置:网站首页>h. 264 code stream explanation
h. 264 code stream explanation
2022-07-29 02:36:00 【Autumn ink】
H264 The code stream can be divided into two layers ,VCL Layer and the NAL layer ,NAL The full name is Network abstraction layer, It is called network abstraction layer , It has been saved. H264 Relevant parameter information and image information ,NAL The layer consists of multiple units NALU form ,NALU By NALU head (00 00 00 01 perhaps 00 00 01)、sps( Sequence parameter set )、pps( Image parameter set )、slice、sei、IDR frame 、I frame ( When the image motion changes less ,I After the frame is 7 individual P frame , If the image motion changes greatly , One sequence is short ,I The frame may be followed by 3 A or 4 individual P frame )、P frame 、B Frame and other data .
sps、pps、I frame 、P Frame in NALU And nalu type Judge
A complete NALU The unit structure diagram is as follows :
00 00 00 01 yes NALU head , Is the beginning of the sequence identifier ,0x27 To binary is 100111,00111 To convert to decimal is 7, that 7 Corresponding NALU type=sps,0x28 To binary is 101000, To convert to decimal is 8,8 Corresponding NALU type=pps,0x25 To binary is 100101,00101 To convert to decimal is 5,5 Corresponding NALU type=IDR frame ( Use FFMPEG,sps and pps Is stored in the AVCodecContext Of extradata.data in , Extract in decoding sps and pps when , Judge NALU type It can be used extradata.data[ 4 ]&0x1f( The result is 7 yes sps,8 yes pps, The calculation method is to convert to binary ,0x27&0x1f=11111&00111=00111=7,pps The calculation is similar to )),NALU type=1 yes Slice,splice There are three coding modes ,I_slice、P_slice、B_slice,I The frame is divided and saved in Slice in .
边栏推荐
- C语言实现三子棋游戏
- Even PostgreSQL problem: expected authentication request from server, but received V
- 外包公司“混”了2年,我只认真做了5件事,如今顺利拿到字节 Offer。
- How to use RPA to achieve automatic customer acquisition?
- IOT components
- How does the Devops team defend against API attacks?
- 7/28 Gauss elimination to solve linear equations + Gauss elimination to solve XOR linear equations + find the combination number II
- Thermistor temperature calculation formula program
- Read the recent trends of okaleido tiger and tap the value and potential behind it
- FPGA刷题——存储器(RAM和FIFO的Verilog实现)
猜你喜欢
聊聊 Feign 的实现原理
FPGA skimming memory (Verilog implementation of ram and FIFO)
Understanding service governance in distributed development
矿山开采虚拟现实vr安全培训提升员工警惕性和防护意识
详解JS的四种异步解决方案:回调函数、Promise、Generator、async/await
网络安全漏洞管理的探索与实践
一文搞懂 Redis 架构演化之路
ES6事件绑定(v-on用法)
Responsive dream weaving template makeup website
HTTP cache
随机推荐
Explain the four asynchronous solutions of JS in detail: callback function, promise, generator, async/await
HTTP breakpoint resume and cache problems
Altium designer outputs Gerber and other production documents
工程经济学简答题
How to customize a new tab in Duoyu security browser?
Three expiration strategies
Teach you how to install vscode by hand (with illustrated steps)
Understanding service governance in distributed development
线上3d数字展厅制作方案及优点
Even PostgreSQL problem: expected authentication request from server, but received V
TCP重传机制有哪些?
What happens if you have to use ArrayList in multithreading?
Responsive dream weaving template hotel room website
防止勒索软件攻击数据的十种方法
redis为什么快,消息队列,单线程
6 years of testing experience, teaching you how to test ~ how to control the project
Cuda-npp image and video processing
详解异步任务:任务的状态及生命周期管理
无线振弦采集系统工作流程
3种过期策略