Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
d6e9a4fb
Commit
d6e9a4fb
authored
Mar 06, 2023
by
xiongguangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove PSParser mistake comment
parent
9fdb3de8
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
24 行删除
+17
-24
src/Extension/SPSParser.c
+12
-19
src/Extension/SPSParser.h
+5
-5
没有找到文件。
src/Extension/SPSParser.c
查看文件 @
d6e9a4fb
...
...
@@ -252,9 +252,9 @@ static inline int getBitsLeft(void *pvHandle)
*functions
********************************************/
/**
* @brief Function getOneBit()
¶Á1¸ö
bit
* @brief Function getOneBit()
get next
bit
* @param[in] h T_GetBitContext structrue
* @retval
0
: success, -1 : failure
* @retval
other
: success, -1 : failure
* @pre
* @post
*/
...
...
@@ -291,10 +291,10 @@ exit:
/**
* @brief Function getBits()
¶Án¸öbits£¬n²»Äܳ¬¹ý32
* @brief Function getBits()
get next bits
* @param[in] h T_GetBitContext structrue
* @param[in] n how many bits you want?
* @retval
0
: success, -1 : failure
* @retval
other
: success, -1 : failure
* @pre
* @post
*/
...
...
@@ -446,7 +446,7 @@ static inline unsigned int showBitsLong(void *pvHandle, int iN)
/**
* @brief Function parseCodenum()
Ö¸Êý¸çÂײ¼±àÂë½âÎö£¬²Î¿¼h264±ê×¼µÚ9½Ú
* @brief Function parseCodenum()
* @param[in] buf
* @retval u32CodeNum
* @pre
...
...
@@ -469,7 +469,7 @@ static int parseCodenum(void *pvBuf)
}
/**
* @brief Function parseUe()
Ö¸Êý¸çÂײ¼±àÂë½âÎö ue(),²Î¿¼h264±ê×¼µÚ9½Ú
* @brief Function parseUe()
* @param[in] buf sps_pps parse buf
* @retval u32CodeNum
* @pre
...
...
@@ -482,7 +482,7 @@ static int parseUe(void *pvBuf)
/**
* @brief Function parseSe()
Ö¸Êý¸çÂײ¼±àÂë½âÎö se(), ²Î¿¼h264±ê×¼µÚ9½Ú
* @brief Function parseSe()
* @param[in] buf sps_pps parse buf
* @retval u32CodeNum
* @pre
...
...
@@ -502,7 +502,7 @@ static int parseSe(void *pvBuf)
/**
* @brief Function getBitContextFree()
ÉêÇëµÄget_bit_context½á¹¹ÄÚ´æÊÍ·Å
* @brief Function getBitContextFree()
* @param[in] buf T_GetBitContext buf
* @retval none
* @pre
...
...
@@ -527,18 +527,13 @@ static void getBitContextFree(void *pvBuf)
/**
* @brief Function deEmulationPrevention()
½â¾ºÕù´úÂë
* @brief Function deEmulationPrevention()
* @param[in] buf T_GetBitContext buf
* @retval none
* @pre
* @post
* @note:
* µ÷ÊÔʱ×ÜÊÇ·¢ÏÖvui.time_scaleÖµÌرðÆæ¹Ö£¬×ÜÊÇ16777216£¬ºóÀ´²éѯÔÒòÈçÏÂ:
* http://www.cnblogs.com/eustoma/archive/2012/02/13/2415764.html
* H.264±àÂëʱ£¬ÔÚÿ¸öNALÇ°Ìí¼ÓÆðʼÂë 0x000001£¬½âÂëÆ÷ÔÚÂëÁ÷Öмì²âµ½ÆðʼÂ룬µ±Ç°NAL½áÊø¡£
* ΪÁË·ÀÖ¹NALÄÚ²¿³öÏÖ0x000001µÄÊý¾Ý£¬h.264ÓÖÌá³ö'·ÀÖ¹¾ºÕù emulation prevention"»úÖÆ£¬
* ÔÚ±àÂëÍêÒ»¸öNALʱ£¬Èç¹û¼ì²â³öÓÐÁ¬ÐøÁ½¸ö0x00×Ö½Ú£¬¾ÍÔÚºóÃæ²åÈëÒ»¸ö0x03¡£
* µ±½âÂëÆ÷ÔÚNALÄÚ²¿¼ì²âµ½0x000003µÄÊý¾Ý£¬¾Í°Ñ0x03Å×Æú£¬»Ö¸´ÔʼÊý¾Ý¡£
* 0x000000 >>>>>> 0x00000300
* 0x000001 >>>>>> 0x00000301
* 0x000002 >>>>>> 0x00000302
...
...
@@ -581,22 +576,20 @@ static void *deEmulationPrevention(void *pvBuf)
tmp_buf_size
=
ptPtr
->
iBufSize
;
for
(
i
=
0
;
i
<
(
tmp_buf_size
-
2
);
i
++
)
{
/*¼ì²â0x000003*/
iVal
=
(
pu8TmpPtr
[
i
]
^
0x00
)
+
(
pu8TmpPtr
[
i
+
1
]
^
0x00
)
+
(
pu8TmpPtr
[
i
+
2
]
^
0x03
);
if
(
iVal
==
0
)
{
/*ÌÞ³ý0x03*/
for
(
j
=
i
+
2
;
j
<
tmp_buf_size
-
1
;
j
++
)
{
pu8TmpPtr
[
j
]
=
pu8TmpPtr
[
j
+
1
];
}
/*ÏàÓ¦µÄbufsizeÒª¼õС*/
ptPtr
->
iBufSize
--
;
}
}
/*ÖØмÆËãtotal_bit*/
ptPtr
->
iTotalBit
=
ptPtr
->
iBufSize
<<
3
;
return
(
void
*
)
ptPtr
;
...
...
src/Extension/SPSParser.h
查看文件 @
d6e9a4fb
...
...
@@ -439,11 +439,11 @@ typedef struct T_HEVCSPS {
typedef
struct
T_GetBitContext
{
uint8_t
*
pu8Buf
;
/*Ö¸ÏòSPS start*/
int
iBufSize
;
/
*SPS ³¤¶È*/
int
iBitPos
;
/
*bitÒѶÁȡλÖÃ*/
int
iTotalBit
;
/
*bit×ܳ¤¶È*/
int
iCurBitPos
;
/
*µ±Ç°¶ÁȡλÖÃ*/
uint8_t
*
pu8Buf
;
// buf
int
iBufSize
;
/
/ buf size
int
iBitPos
;
/
/ bit position
int
iTotalBit
;
/
/ bit number
int
iCurBitPos
;
/
/ current bit position
}
T_GetBitContext
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论