History

add single function for new seq detection

huili2 committed 12 years ago

Commit 7c6debb1 parent 3e258ea2 files · +14 −2Browse files

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

Unified · Split

codec/decoder/core/src/au_parser.cpp+12−2
@@ -331,7 +331,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 330 unmodified lines
331 pCurAu->pNalUnitsList[uiAvailNalNum - 1]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps)) {331 pCurAu->pNalUnitsList[uiAvailNalNum - 1]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps)) {
332 pCurAu->uiEndPos = uiAvailNalNum - 2;332 pCurAu->uiEndPos = uiAvailNalNum - 2;
333 pCtx->bAuReadyFlag = true;333 pCtx->bAuReadyFlag = true;
334 334 pCtx->bNextNewSeqBegin = CheckNextAuNewSeq (pCtx, pCurNal, pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps);
335 335
336 }336 }
337 }337 }
@@ -411,7 +411,6 @@ bool CheckAccessUnitBoundary (PWelsDecoderContext pCtx, const PNalUnit kpCurNal, · 73 unmodified lines
411 const SSliceHeader* kpCurSliceHeader = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;411 const SSliceHeader* kpCurSliceHeader = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
412 if (pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != NULL412 if (pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != NULL
413 && pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != kpSps) {413 && pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != kpSps) {
414 pCtx->bNextNewSeqBegin = true;
415 return true; // the active sps changed, new sequence begins, so the current au is ready414 return true; // the active sps changed, new sequence begins, so the current au is ready
416 }415 }
417 416
@@ -460,6 +459,17 @@ bool CheckAccessUnitBoundary (PWelsDecoderContext pCtx, const PNalUnit kpCurNal, · 42 unmodified lines
460 return false;459 return false;
461}460}
462 461
462bool CheckNextAuNewSeq (PWelsDecoderContext pCtx, const PNalUnit kpCurNal, const PSps kpSps) {
463 const PNalUnitHeaderExt kpCurNalHeaderExt = &kpCurNal->sNalHeaderExt;
464 if (pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != NULL
465 && pCtx->pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != kpSps)
466 return true;
467 if (kpCurNalHeaderExt->bIdrFlag)
468 return true;
469
470 return false;
471}
472
463/*!473/*!
464 *************************************************************************************474 *************************************************************************************
465 * \brief to parse NON VCL NAL Units475 * \brief to parse NON VCL NAL Units

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