| 987 | } |
| 988 | |
| 989 | int32_t InitAllSlicesInThread (sWelsEncCtx* pCtx) { |
| 990 | SDqLayer* pCurDqLayer = pCtx->pCurDqLayer; |
| 991 | int32_t iSliceIdx = 0; |
| 992 | int32_t iSlcBuffIdx = 0; |
| 993 | |
| 994 | for (; iSliceIdx < pCurDqLayer->iMaxSliceNum; iSliceIdx++) { |
| 995 | if (NULL == pCurDqLayer->ppSliceInLayer[iSliceIdx]) { |
| 996 | return ENC_RETURN_UNEXPECTED; |
| 997 | } |
| 998 | |
| 999 | pCurDqLayer->ppSliceInLayer[iSliceIdx]->iSliceIdx = -1; |
| 1000 | } |
| 1001 | |
| 1002 | for (; iSlcBuffIdx < pCtx->iActiveThreadsNum; iSlcBuffIdx++) { |
| 1003 | pCurDqLayer->sSliceBufferInfo[iSlcBuffIdx].iCodedSliceNum = 0; |
| 1004 | } |
| 1005 | |
| 1006 | return ENC_RETURN_SUCCESS; |
| 1007 | } |
| 1008 | |
| 1009 | int32_t InitOneSliceInThread (sWelsEncCtx* pCtx, |
| 1010 | SSlice*& pSlice, |
no outgoing calls
no test coverage detected