History

format update

ruil2 committed 12 years ago

Commit efc5bbd1 parent 057e3861 file · +16 −14Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+16−14
@@ -2899,21 +2899,20 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) { · 2898 unmodified lines
28992899 return ENC_RETURN_SUCCESS;
29002900 }
29012901
2902−int32_t GetSubSequenceId(sWelsEncCtx* pCtx,EVideoFrameType eFrameType){
2902+int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) {
29032903 int32_t iSubSeqId = 0;
2904− if(eFrameType == videoFrameTypeIDR )
2904+ if (eFrameType == videoFrameTypeIDR)
29052905 iSubSeqId = 0;
2906− else if(eFrameType == videoFrameTypeI)
2906+ else if (eFrameType == videoFrameTypeI)
29072907 iSubSeqId = 1;
2908− else if (eFrameType == videoFrameTypeP){
2909− if(pCtx->bCurFrameMarkedAsSceneLtr)
2908+ else if (eFrameType == videoFrameTypeP) {
2909+ if (pCtx->bCurFrameMarkedAsSceneLtr)
29102910 iSubSeqId = 2;
2911− else
2911+ else
29122912 iSubSeqId = 3 + pCtx->uiTemporalId; //T0:3 T1:4 T2:5 T3:6
2913− }
2914− else
2913+ } else
29152914 iSubSeqId = 3 + MAX_TEMPORAL_LAYER_NUM;
2916− return iSubSeqId;
2915+ return iSubSeqId;
29172916 }
29182917 /*!
29192918 * \brief core svc encoding process
@@ -3556,7 +3555,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 636 unmodified lines
35563555 ++ pCtx->iCodingIndex;
35573556 pCtx->eLastNalPriority = eNalRefIdc;
35583557 pFbi->iLayerNum = iLayerNum;
3559− pFbi->iSubSeqId = GetSubSequenceId(pCtx,eFrameType);
3558+ pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
35603559 WelsEmms();
35613560
35623561 pFbi->eFrameType = eFrameType;
@@ -3817,12 +3816,13 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 254 unmodified lines
38173816 int16_t* pFirstMbInSlice = (int16_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int16_t), "pSliceSeg->pFirstMbInSlice");
38183817 if (NULL == pFirstMbInSlice)
38193818 return ENC_RETURN_MEMALLOCERR;
3820− memset(pFirstMbInSlice, 0, sizeof(int16_t) * iMaxSliceNum);
3819+ memset (pFirstMbInSlice, 0, sizeof (int16_t) * iMaxSliceNum);
38213820 memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int16_t) * iMaxSliceNumOld);
38223821 pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice");
38233822 pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice;
38243823
3825− int32_t* pCountMbNumInSlice = (int32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int32_t),"pSliceSeg->pCountMbNumInSlice");
3824+ int32_t* pCountMbNumInSlice = (int32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int32_t),
3825+ "pSliceSeg->pCountMbNumInSlice");
38263826 if (NULL == pCountMbNumInSlice)
38273827 return ENC_RETURN_MEMALLOCERR;
38283828 memcpy (pCountMbNumInSlice, pCurLayer->pSliceEncCtx->pCountMbNumInSlice, sizeof (int32_t) * iMaxSliceNumOld);
@@ -3840,13 +3840,15 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 11 unmodified lines
38403840 memcpy (pSlcingOverRc, pCtx->pWelsSvcRc->pSlicingOverRc, sizeof (SRCSlicing) * iMaxSliceNumOld);
38413841 uiSliceIdx = iMaxSliceNumOld;
38423842 SRCSlicing* pSORC = &pSlcingOverRc[uiSliceIdx];
3843− const int32_t kiBitsPerMb = WELS_DIV_ROUND(pCtx->pWelsSvcRc->iTargetBits * INT_MULTIPLY, pCtx->pWelsSvcRc->iNumberMbFrame);
3843+ const int32_t kiBitsPerMb = WELS_DIV_ROUND (pCtx->pWelsSvcRc->iTargetBits * INT_MULTIPLY,
3844+ pCtx->pWelsSvcRc->iNumberMbFrame);
38443845 while (uiSliceIdx < iMaxSliceNum) {
38453846 pSORC->iComplexityIndexSlice = 0;
38463847 pSORC->iCalculatedQpSlice = pCtx->iGlobalQp;
38473848 pSORC->iTotalQpSlice = 0;
38483849 pSORC->iTotalMbSlice = 0;
3849− pSORC->iTargetBitsSlice = WELS_DIV_ROUND(kiBitsPerMb * pCurLayer->pSliceEncCtx->pCountMbNumInSlice[uiSliceIdx], INT_MULTIPLY);
3850+ pSORC->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pCurLayer->pSliceEncCtx->pCountMbNumInSlice[uiSliceIdx],
3851+ INT_MULTIPLY);
38503852 pSORC->iFrameBitsSlice = 0;
38513853 pSORC->iGomBitsSlice = 0;
38523854 pSORC ++;

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