History

second commit for threaded decoding support: Add function WelsDecodeAndConstructSlice (and add associted functions) which combines decoding->reconstructing->deblocking in single MB loop so that it allows multile frames to decode MBs in parallel.

xiaotiansf committed 7 years ago

Commit fd42f041 parent 2f5ecec22 files · +924 −190Browse files

Showing the changes to codec/decoder/core/src/deblocking.cpp (1 of 22 files). Show all

Unified · Split

codec/decoder/core/src/deblocking.cpp+49−0
@@ -1376,6 +1376,55 @@ void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFun · 1375 unmodified lines
1376 }1376 }
1377}1377}
1378 1378
1379/*!
1380* \brief AVC slice init deblocking filtering target layer
1381*
1382* \in and out param SDeblockingFilter
1383* \in and out param iFilterIdc
1384*
1385* \return NONE
1386*/
1387void WelsDeblockingInitFilter (PWelsDecoderContext pCtx, SDeblockingFilter& pFilter, int32_t& iFilterIdc) {
1388 PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
1389 PSliceHeaderExt pSliceHeaderExt = &pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt;
1390
1391 memset (&pFilter, 0, sizeof (pFilter));
1392
1393 iFilterIdc = pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc;
1394
1395 /* Step1: parameters set */
1396 pFilter.pCsData[0] = pCtx->pDec->pData[0];
1397 pFilter.pCsData[1] = pCtx->pDec->pData[1];
1398 pFilter.pCsData[2] = pCtx->pDec->pData[2];
1399
1400 pFilter.iCsStride[0] = pCtx->pDec->iLinesize[0];
1401 pFilter.iCsStride[1] = pCtx->pDec->iLinesize[1];
1402
1403 pFilter.eSliceType = (EWelsSliceType)pCurDqLayer->sLayerInfo.sSliceInLayer.eSliceType;
1404
1405 pFilter.iSliceAlphaC0Offset = pSliceHeaderExt->sSliceHeader.iSliceAlphaC0Offset;
1406 pFilter.iSliceBetaOffset = pSliceHeaderExt->sSliceHeader.iSliceBetaOffset;
1407
1408 pFilter.pLoopf = &pCtx->sDeblockingFunc;
1409 pFilter.pRefPics[0] = pCtx->sRefPic.pRefList[0];
1410 pFilter.pRefPics[1] = pCtx->sRefPic.pRefList[1];
1411}
1412
1413/*!
1414* \brief AVC MB deblocking filtering target layer
1415*
1416* \param DqLayer which has the current location of MB to be deblocked.
1417*
1418* \return NONE
1419*/
1420void WelsDeblockingFilterMB (PDqLayer pCurDqLayer, SDeblockingFilter& pFilter, int32_t& iFilterIdc,
1421 PDeblockingFilterMbFunc pDeblockMb) {
1422 /* macroblock deblocking */
1423 if (0 == iFilterIdc || 2 == iFilterIdc) {
1424 int32_t iBoundryFlag = DeblockingAvailableNoInterlayer (pCurDqLayer, iFilterIdc);
1425 pDeblockMb (pCurDqLayer, &pFilter, iBoundryFlag);
1426 }
1427}
1379/*!1428/*!
1380 * \brief deblocking module initialize1429 * \brief deblocking module initialize
1381 *1430 *

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