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