| 590 | } |
| 591 | |
| 592 | ESceneChangeIdc 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 | |
| 621 | SPicture* CWelsPreProcessVideo::GetCurrentOrigFrame (int32_t iDIdx) { |
| 622 | return m_pSpatialPic[iDIdx][GetCurPicPosition (iDIdx)]; |
nothing calls this directly
no test coverage detected