⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 本群聊天记录200608.htm

📁 本源码是基于C语言的H.264标准的JM源代码模型
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>H.264乐园(12923082)聊天记录-2006年8月</title>
</head>

<body>
<body>
<table border="0" width="73%" id="table1">
	<tr>
		<td>
		
<font size="2"><font color = "#ff0000">这是本群 2006 年 8 月 29 日晚第四次研讨会的部分聊天记录,目的是帮初学者弄清楚标准和 JM 代码是如何联系在一起的。<br>其中提及的代码是原始的 JM86 解码器代码(下载地址:http://iphome.hhi.de/suehring/tml/),提及的标准是 200503 版的标准(下载地址:http://www.itu.int/rec/T-REC-H.264-200503-I/en)。</font><br><br><br><br>2006年8月29日<br><br><br><br>
firstime <br>
(500144) 20:40:54 <br>
首先我们先讲一下码流结构 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>shirley <br>
(250610658) 20:41:00 <br>
我进不去 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:41:09 <br>
H.264 码流是由一个个 NALU 组成的 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:42:06 <br>
而 NALU 又是由 NALU 头和 RBSP 数据组成 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:42:33 <br>
这体现在标准文档中就是 7.3.1 小节 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:42:41 <br>
请大家打开 7.3.1 小节 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:43:39 <br>
在第 7 章的 Syntax 表中,我们可以看见很多加粗了的字体 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:44:04 <br>
凡是加粗了的字体都是需要编码的语法元素 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:44:23 <br>
7.3.1 第一个加粗的字体是 forbidden_zero_bit <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:44:59 <br>
最后一列是 f(1)<br>
这说明该语法元素采用 1 比特定长编码 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:45:31 <br>
那么 forbidden_zero_bit 到底是什么意思呢 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:45:44 <br>
7.4.1 小节中做了解释 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:46:43 <br>
7.3.1 第二个加粗的字体是 nal_ref_idc,该行最后一列是 u(2),这说明该语法元素采用 u(2) 方式编码 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:47:17 <br>
那么 u(2) 是什么编码方式呢? <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:47:39 <br>
7.3 节上面的段落做了说明 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:48:08 <br>
对包括 ue、u、te等等编码方式都在那里做了说明 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:49:03 <br>
7.3.1 第三个加粗的字体是 nal_unit_type,该语法元素编码方式我就不说了,跟前一个语法元素 nal_ref_idc 是同样道理 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:49:48 <br>
所有加粗的字体到底表示什么含义在 Semantics 一部分中都有相应说明 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:50:10 <br>
例如 7.3.1 小节中加粗字体的说明 就是 7.4.1 小节中 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:51:17 <br>
7.3.2.1 小节中加粗的字体的说明就在 7.4.2.1 小节中,7.3 节与 7.4 节是完全对应的 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:51:49 <br>
7.3.1 小节说明了一个 NALU 的结构 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:52:10 <br>
也就是说对于一个 H.264 码流 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:52:47 <br>
对于一个 H.264 码流中的一个 NALU ,该 NALU 的第一个比特必然是表示 forbidden_zero_bit <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:53:01 <br>
该 NALU 的第二、三个比特必然是表示 nal_ref_idc <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:53:27 <br>
该 NALU 的第四~八个比特必然是表示 nal_unit_type <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:54:15 <br>
那么对于解码器,解码 H.264 码流必然要按顺序处理这些语法元素 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>丘比特神箭 <br>
(50953531) 20:54:24 <br>
可以打断一下吗? <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:54:37 <br>
你有什么事 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>丘比特神箭 <br>
(50953531) 20:55:15 <br>
可否顺便把本地解码和RTP解码一块说下,有些不明白两个码流的结构 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>
</table>firstime <br>
(500144) 20:55:41 <br>
最后来讲<br>
有疑问请先写到纸上 <table border="0" width="1080" id="table1" cellspacing="0" cellpadding="0">
	<tr><br>
		<td><font color="#B3C9E8" size="2">
		----------------------------------------------------------------------------------------------------------------------------------------------------------</font></td>
	</tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -