remove macro NO_WAITING_AU for always on
This commit is contained in:
parent
153fa10dc5
commit
0adb3e1b9c
@ -38,6 +38,5 @@
|
||||
*/
|
||||
#ifndef WELS_AS264_COMMON_H__
|
||||
#define WELS_AS264_COMMON_H__
|
||||
#define NO_WAITING_AU //slice level decoding
|
||||
#define LONG_TERM_REF //for app
|
||||
#endif // WELS_AS264_COMMON_H__
|
||||
|
@ -322,11 +322,9 @@ typedef struct TagWelsDecoderContext {
|
||||
//trace handle
|
||||
void* pTraceHandle;
|
||||
|
||||
#ifdef NO_WAITING_AU
|
||||
//Save the last nal header info
|
||||
SNalUnitHeaderExt sLastNalHdrExt;
|
||||
SSliceHeader sLastSliceHeader;
|
||||
#endif
|
||||
|
||||
} SWelsDecoderContext, *PWelsDecoderContext;
|
||||
|
||||
|
@ -62,9 +62,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t
|
||||
pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
|
||||
bFrameCompleteFlag = false; //return later after output buffer is done
|
||||
}
|
||||
#ifdef NO_WAITING_AU
|
||||
|
||||
pCtx->iTotalNumMbRec = 0;
|
||||
#endif
|
||||
|
||||
if (pCtx->bNewSeqBegin) {
|
||||
memcpy (& (pCtx->sFrameCrop), & (pCurDq->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.pSps->sFrameCrop),
|
||||
@ -1749,17 +1748,13 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NO_WAITING_AU
|
||||
//For fixing the nal lossing issue
|
||||
if ((pCtx->iTotalNumMbRec != 0) &&
|
||||
(CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pNalCur->sNalHeaderExt, &pCtx->sLastSliceHeader,
|
||||
&pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) {
|
||||
pCtx->iTotalNumMbRec = 0;
|
||||
}
|
||||
#else
|
||||
//initialize at the starting of AU.
|
||||
pCtx->iTotalNumMbRec = 0;
|
||||
#endif
|
||||
|
||||
if (pCtx->iTotalNumMbRec == 0) { //Picture start to decode
|
||||
for (int32_t i = 0; i < LAYER_NUM_EXCHANGEABLE; ++ i)
|
||||
memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
|
||||
@ -1908,16 +1903,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3
|
||||
|
||||
if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) {
|
||||
if (DecodeFrameConstruction (pCtx, ppDst, pDstLen, pWidth, pHeight, pDstInfo)) {
|
||||
#ifdef NO_WAITING_AU
|
||||
memcpy (&pCtx->sLastNalHdrExt, &pCurAu->pNalUnitsList[iIdx - 1]->sNalHeaderExt, sizeof (SNalUnitHeaderExt));
|
||||
memcpy (&pCtx->sLastSliceHeader, &pCurAu->pNalUnitsList[iIdx - 1]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader,
|
||||
sizeof (SSliceHeader));
|
||||
return ERR_NONE;
|
||||
#else
|
||||
pCtx->iErrorCode |= dsBitstreamError;
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for EC
|
||||
|
Loading…
Reference in New Issue
Block a user