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
783 pCtx->bSubspsExistAheadFlag = true;783 pCtx->bSubspsExistAheadFlag = true;
784 } else { // Sps784 } else { // Sps
785 pCtx->bSpsExistAheadFlag = true;785 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));
792 }786 }
793 787
794 WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); //profile_idc788 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
818 if (kbUseSubsetFlag) {812 if (kbUseSubsetFlag) {
819 pSubsetSps = &pCtx->sSubsetSpsBuffer[iSpsId];813 pSubsetSps = &pCtx->sSubsetSpsBuffer[iSpsId];
820 pSps = &pSubsetSps->sSps;814 pSps = &pSubsetSps->sSps;
821 pCtx->bSubspsAvailFlags[iSpsId] = true; // added for EC, 10/28/2009815 pCtx->bSubspsAvailFlags[iSpsId] = false;
822 } else {816 } else {
823 pSps = &pCtx->sSpsBuffer[iSpsId];817 pSps = &pCtx->sSpsBuffer[iSpsId];
824 pCtx->bSpsAvailFlags[iSpsId] = true; // added for EC, 10/28/2009818 pCtx->bSpsAvailFlags[iSpsId] = false;
825 }819 }
826 const SLevelLimits* pSLevelLimits = GetLevelLimits (uiLevelIdc, bConstraintSetFlags[3]);820 const SLevelLimits* pSLevelLimits = GetLevelLimits (uiLevelIdc, bConstraintSetFlags[3]);
827 if (NULL == pSLevelLimits) {821 if (NULL == pSLevelLimits) {
@@ -1000,7 +994,11 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 172 unmodified lines
1000 994
1001 *pPicWidth = pSps->iMbWidth << 4;995 *pPicWidth = pSps->iMbWidth << 4;
1002 *pPicHeight = pSps->iMbHeight << 4;996 *pPicHeight = pSps->iMbHeight << 4;
1003 997 if (kbUseSubsetFlag) {
998 pCtx->bSubspsAvailFlags[iSpsId] = true;
999 } else {
1000 pCtx->bSpsAvailFlags[iSpsId] = true;
1001 }
1004 return 0;1002 return 0;
1005}1003}
1006 1004
@@ -1032,6 +1030,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux) · 25 unmodified lines
1032 return ERR_INFO_PPS_ID_OVERFLOW;1030 return ERR_INFO_PPS_ID_OVERFLOW;
1033 }1031 }
1034 1032
1033 pCtx->bPpsAvailFlags[uiPpsId] = false;
1035 pPps = &pPpsList[uiPpsId];1034 pPps = &pPpsList[uiPpsId];
1036 1035
1037 pPps->iPpsId = uiPpsId;1036 pPps->iPpsId = uiPpsId;
@@ -1114,7 +1113,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux) · 76 unmodified lines
1114 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag1113 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag
1115 pPps->bRedundantPicCntPresentFlag = !!uiCode;1114 pPps->bRedundantPicCntPresentFlag = !!uiCode;
1116 1115
1117 pCtx->bPpsAvailFlags[uiPpsId] = true; // added for EC, 10/28/20091116 pCtx->bPpsAvailFlags[uiPpsId] = true;
1118 1117
1119 return ERR_NONE;1118 return ERR_NONE;
1120}1119}

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