MCPcopy Create free account
hub / github.com/cisco/openh264 / DetectSceneChange

Method DetectSceneChange

codec/encoder/core/src/wels_preprocess.cpp:592–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592ESceneChangeIdc CWelsPreProcessVideo::DetectSceneChange (SPicture* pCurPicture, SPicture* pRefPicture) {
593 int32_t iMethodIdx = METHOD_SCENE_CHANGE_DETECTION_VIDEO;
594 SSceneChangeResult sSceneChangeDetectResult = { SIMILAR_SCENE };
595 SPixMap sSrcPixMap;
596 SPixMap sRefPixMap;
597 memset (&sSrcPixMap, 0, sizeof (sSrcPixMap));
598 memset (&sRefPixMap, 0, sizeof (sRefPixMap));
599 sSrcPixMap.pPixel[0] = pCurPicture->pData[0];
600 sSrcPixMap.iSizeInBits = g_kiPixMapSizeInBits;
601 sSrcPixMap.iStride[0] = pCurPicture->iLineSize[0];
602 sSrcPixMap.sRect.iRectWidth = pCurPicture->iWidthInPixel;
603 sSrcPixMap.sRect.iRectHeight = pCurPicture->iHeightInPixel;
604 sSrcPixMap.eFormat = VIDEO_FORMAT_I420;
605
606 sRefPixMap.pPixel[0] = pRefPicture->pData[0];
607 sRefPixMap.iSizeInBits = g_kiPixMapSizeInBits;
608 sRefPixMap.iStride[0] = pRefPicture->iLineSize[0];
609 sRefPixMap.sRect.iRectWidth = pRefPicture->iWidthInPixel;
610 sRefPixMap.sRect.iRectHeight = pRefPicture->iHeightInPixel;
611 sRefPixMap.eFormat = VIDEO_FORMAT_I420;
612
613 int32_t iRet = m_pInterfaceVp->Process (iMethodIdx, &sSrcPixMap, &sRefPixMap);
614 if (iRet == 0) {
615 m_pInterfaceVp->Get (iMethodIdx, (void*)&sSceneChangeDetectResult);
616 //bSceneChangeFlag = (sSceneChangeDetectResult.eSceneChangeIdc == LARGE_CHANGED_SCENE) ? true : false;
617 }
618 return sSceneChangeDetectResult.eSceneChangeIdc;
619}
620
621SPicture* CWelsPreProcessVideo::GetCurrentOrigFrame (int32_t iDIdx) {
622 return m_pSpatialPic[iDIdx][GetCurPicPosition (iDIdx)];

Callers

nothing calls this directly

Calls 5

GetTemporalLevelFunction · 0.85
WelsLogFunction · 0.85
ProcessMethod · 0.45
GetMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected