mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 14:45:55 +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
|
*functions
|
||||||
********************************************/
|
********************************************/
|
||||||
/**
|
/**
|
||||||
* @brief Function getOneBit() ¶Á1¸öbit
|
* @brief Function getOneBit() get next bit
|
||||||
* @param[in] h T_GetBitContext structrue
|
* @param[in] h T_GetBitContext structrue
|
||||||
* @retval 0: success, -1 : failure
|
* @retval other : success, -1 : failure
|
||||||
* @pre
|
* @pre
|
||||||
* @post
|
* @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] h T_GetBitContext structrue
|
||||||
* @param[in] n how many bits you want?
|
* @param[in] n how many bits you want?
|
||||||
* @retval 0: success, -1 : failure
|
* @retval other : success, -1 : failure
|
||||||
* @pre
|
* @pre
|
||||||
* @post
|
* @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
|
* @param[in] buf
|
||||||
* @retval u32CodeNum
|
* @retval u32CodeNum
|
||||||
* @pre
|
* @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
|
* @param[in] buf sps_pps parse buf
|
||||||
* @retval u32CodeNum
|
* @retval u32CodeNum
|
||||||
* @pre
|
* @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
|
* @param[in] buf sps_pps parse buf
|
||||||
* @retval u32CodeNum
|
* @retval u32CodeNum
|
||||||
* @pre
|
* @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
|
* @param[in] buf T_GetBitContext buf
|
||||||
* @retval none
|
* @retval none
|
||||||
* @pre
|
* @pre
|
||||||
@ -527,18 +527,13 @@ static void getBitContextFree(void *pvBuf)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Function deEmulationPrevention() ½â¾ºÕù´úÂë
|
* @brief Function deEmulationPrevention()
|
||||||
* @param[in] buf T_GetBitContext buf
|
* @param[in] buf T_GetBitContext buf
|
||||||
* @retval none
|
* @retval none
|
||||||
* @pre
|
* @pre
|
||||||
* @post
|
* @post
|
||||||
* @note:
|
* @note:
|
||||||
* µ÷ÊÔʱ×ÜÊÇ·¢ÏÖvui.time_scaleÖµÌرðÆæ¹Ö£¬×ÜÊÇ16777216£¬ºóÀ´²éѯÔÒòÈçÏÂ:
|
|
||||||
* http://www.cnblogs.com/eustoma/archive/2012/02/13/2415764.html
|
* 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
|
* 0x000000 >>>>>> 0x00000300
|
||||||
* 0x000001 >>>>>> 0x00000301
|
* 0x000001 >>>>>> 0x00000301
|
||||||
* 0x000002 >>>>>> 0x00000302
|
* 0x000002 >>>>>> 0x00000302
|
||||||
@ -581,22 +576,20 @@ static void *deEmulationPrevention(void *pvBuf)
|
|||||||
tmp_buf_size = ptPtr->iBufSize;
|
tmp_buf_size = ptPtr->iBufSize;
|
||||||
for(i=0; i<(tmp_buf_size-2); i++)
|
for(i=0; i<(tmp_buf_size-2); i++)
|
||||||
{
|
{
|
||||||
/*¼ì²â0x000003*/
|
|
||||||
iVal = (pu8TmpPtr[i]^0x00) + (pu8TmpPtr[i+1]^0x00) + (pu8TmpPtr[i+2]^0x03);
|
iVal = (pu8TmpPtr[i]^0x00) + (pu8TmpPtr[i+1]^0x00) + (pu8TmpPtr[i+2]^0x03);
|
||||||
if(iVal == 0)
|
if(iVal == 0)
|
||||||
{
|
{
|
||||||
/*ÌÞ³ý0x03*/
|
|
||||||
for(j=i+2; j<tmp_buf_size-1; j++)
|
for(j=i+2; j<tmp_buf_size-1; j++)
|
||||||
{
|
{
|
||||||
pu8TmpPtr[j] = pu8TmpPtr[j+1];
|
pu8TmpPtr[j] = pu8TmpPtr[j+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ÏàÓ¦µÄbufsizeÒª¼õС*/
|
|
||||||
ptPtr->iBufSize--;
|
ptPtr->iBufSize--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ÖØмÆËãtotal_bit*/
|
|
||||||
ptPtr->iTotalBit = ptPtr->iBufSize << 3;
|
ptPtr->iTotalBit = ptPtr->iBufSize << 3;
|
||||||
|
|
||||||
return (void *)ptPtr;
|
return (void *)ptPtr;
|
||||||
|
@ -439,11 +439,11 @@ typedef struct T_HEVCSPS {
|
|||||||
|
|
||||||
|
|
||||||
typedef struct T_GetBitContext{
|
typedef struct T_GetBitContext{
|
||||||
uint8_t *pu8Buf; /*Ö¸ÏòSPS start*/
|
uint8_t *pu8Buf; // buf
|
||||||
int iBufSize; /*SPS ³¤¶È*/
|
int iBufSize; // buf size
|
||||||
int iBitPos; /*bitÒѶÁȡλÖÃ*/
|
int iBitPos; // bit position
|
||||||
int iTotalBit; /*bit×ܳ¤¶È*/
|
int iTotalBit; // bit number
|
||||||
int iCurBitPos; /*µ±Ç°¶ÁȡλÖÃ*/
|
int iCurBitPos; // current bit position
|
||||||
}T_GetBitContext;
|
}T_GetBitContext;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user