mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 00:37:39 +08:00
remove PSParser mistake comment
This commit is contained in:
parent
9fdb3de8b2
commit
d6e9a4fb90
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user