Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2642,19 +2642,13 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 2641 unmodified lines | ||
| 2642 | 2642 | //31st finish: next_spsid_in_bs == 1; |
| 2643 | 2643 | |
| 2644 | 2644 | const int32_t kiEncId = kiCurEncoderParaSetId; |
| 2645 | − const uint32_t kuiPrevIdInBs = sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] + kiEncId;//mark current_id | |
| 2646 | 2645 | const bool* kpUsedIdPointer = &sParaSetOffsetVariable->bUsedParaSetIdInBs[0]; |
| 2647 | 2646 | uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs; |
| 2648 | 2647 | |
| 2649 | −#if _DEBUG | |
| 2650 | − if (0 != sParaSetOffsetVariable->iParaSetIdDelta[kiEncId]) | |
| 2651 | − assert (sParaSetOffsetVariable->bUsedParaSetIdInBs[kuiPrevIdInBs]); //sure the prev-used one was marked activated correctly | |
| 2652 | −#endif | |
| 2653 | 2648 | //update current layer's pCodingParam |
| 2654 | 2649 | sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs - |
| 2655 | 2650 | kiEncId; //for current parameter set, change its id_delta |
| 2656 | 2651 | //write pso pData for next update: |
| 2657 | − sParaSetOffsetVariable->bUsedParaSetIdInBs[kuiPrevIdInBs] = false; // | |
| 2658 | 2652 | sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id |
| 2659 | 2653 | |
| 2660 | 2654 | //prepare for next update: |
| @@ -3677,6 +3671,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 1016 unmodified lines | ||
| 3677 | 3671 | SParaSetOffsetVariable sTmpPsoVariable[PARA_SET_TYPE]; |
| 3678 | 3672 | uint16_t uiTmpIdrPicId;//this is for LTR! |
| 3679 | 3673 | SLogContext sLogCtx = (*ppCtx)->sLogCtx; |
| 3674 | + for (int32_t k=0;k<PARA_SET_TYPE;k++) | |
| 3675 | + memset(((*ppCtx)->sPSOVector.sParaSetOffsetVariable[k].bUsedParaSetIdInBs), 0, MAX_PPS_COUNT*sizeof(bool)); | |
| 3680 | 3676 | memcpy (sTmpPsoVariable, (*ppCtx)->sPSOVector.sParaSetOffsetVariable, |
| 3681 | 3677 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3682 | 3678 | uiTmpIdrPicId = (*ppCtx)->sPSOVector.uiIdrPicId; |