History

add checks for spsid and ppsid

Licai Guo committed 12 years ago

Commit ba312b01 parent d767e213 files · +23 −11Browse files

Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/core/src/au_parser.cpp+9−10
@@ -783,12 +783,6 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 782 unmodified lines
783783 pCtx->bSubspsExistAheadFlag = true;
784784 } else { // Sps
785785 pCtx->bSpsExistAheadFlag = true;
786−
787− // added for EC, 10/28/2009
788− // for safe
789− memset (&pCtx->bSpsAvailFlags[0], 0, sizeof (pCtx->bSpsAvailFlags));
790− memset (&pCtx->bSubspsAvailFlags[0], 0, sizeof (pCtx->bSubspsAvailFlags));
791− memset (&pCtx->bPpsAvailFlags[0], 0, sizeof (pCtx->bPpsAvailFlags));
792786 }
793787
794788 WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); //profile_idc
@@ -818,10 +812,10 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 23 unmodified lines
818812 if (kbUseSubsetFlag) {
819813 pSubsetSps = &pCtx->sSubsetSpsBuffer[iSpsId];
820814 pSps = &pSubsetSps->sSps;
821− pCtx->bSubspsAvailFlags[iSpsId] = true; // added for EC, 10/28/2009
815+ pCtx->bSubspsAvailFlags[iSpsId] = false;
822816 } else {
823817 pSps = &pCtx->sSpsBuffer[iSpsId];
824− pCtx->bSpsAvailFlags[iSpsId] = true; // added for EC, 10/28/2009
818+ pCtx->bSpsAvailFlags[iSpsId] = false;
825819 }
826820 const SLevelLimits* pSLevelLimits = GetLevelLimits (uiLevelIdc, bConstraintSetFlags[3]);
827821 if (NULL == pSLevelLimits) {
@@ -1000,7 +994,11 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 172 unmodified lines
1000994
1001995 *pPicWidth = pSps->iMbWidth << 4;
1002996 *pPicHeight = pSps->iMbHeight << 4;
1003−
997+ if (kbUseSubsetFlag) {
998+ pCtx->bSubspsAvailFlags[iSpsId] = true;
999+ } else {
1000+ pCtx->bSpsAvailFlags[iSpsId] = true;
1001+ }
10041002 return 0;
10051003 }
10061004
@@ -1032,6 +1030,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux) · 25 unmodified lines
10321030 return ERR_INFO_PPS_ID_OVERFLOW;
10331031 }
10341032
1033+ pCtx->bPpsAvailFlags[uiPpsId] = false;
10351034 pPps = &pPpsList[uiPpsId];
10361035
10371036 pPps->iPpsId = uiPpsId;
@@ -1114,7 +1113,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux) · 76 unmodified lines
11141113 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag
11151114 pPps->bRedundantPicCntPresentFlag = !!uiCode;
11161115
1117− pCtx->bPpsAvailFlags[uiPpsId] = true; // added for EC, 10/28/2009
1116+ pCtx->bPpsAvailFlags[uiPpsId] = true;
11181117
11191118 return ERR_NONE;
11201119 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t