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

Method AdaptiveQuantCalculation

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

Source from the content-addressed store, hash-verified

766}
767
768void CWelsPreProcess::AdaptiveQuantCalculation (SVAAFrameInfo* pVaaInfo, SPicture* pCurPicture, SPicture* pRefPicture) {
769 pVaaInfo->sAdaptiveQuantParam.pCalcResult = & (pVaaInfo->sVaaCalcInfo);
770 pVaaInfo->sAdaptiveQuantParam.iAverMotionTextureIndexToDeltaQp = 0;
771
772 {
773 int32_t iMethodIdx = METHOD_ADAPTIVE_QUANT;
774 SPixMap pSrc;
775 SPixMap pRef;
776 memset (&pSrc, 0, sizeof (pSrc));
777 memset (&pRef, 0, sizeof (pRef));
778 int32_t iRet = 0;
779
780 pSrc.pPixel[0] = pCurPicture->pData[0];
781 pSrc.iSizeInBits = g_kiPixMapSizeInBits;
782 pSrc.iStride[0] = pCurPicture->iLineSize[0];
783 pSrc.sRect.iRectWidth = pCurPicture->iWidthInPixel;
784 pSrc.sRect.iRectHeight = pCurPicture->iHeightInPixel;
785 pSrc.eFormat = VIDEO_FORMAT_I420;
786
787 pRef.pPixel[0] = pRefPicture->pData[0];
788 pRef.iSizeInBits = g_kiPixMapSizeInBits;
789 pRef.iStride[0] = pRefPicture->iLineSize[0];
790 pRef.sRect.iRectWidth = pRefPicture->iWidthInPixel;
791 pRef.sRect.iRectHeight = pRefPicture->iHeightInPixel;
792 pRef.eFormat = VIDEO_FORMAT_I420;
793
794 iRet = m_pInterfaceVp->Set (iMethodIdx, (void*) & (pVaaInfo->sAdaptiveQuantParam));
795 iRet = m_pInterfaceVp->Process (iMethodIdx, &pSrc, &pRef);
796 if (iRet == 0)
797 m_pInterfaceVp->Get (iMethodIdx, (void*) & (pVaaInfo->sAdaptiveQuantParam));
798 }
799}
800
801void CWelsPreProcess::SetRefMbType (sWelsEncCtx* pCtx, uint32_t** pRefMbTypeArray, int32_t iRefPicType) {
802 const uint8_t uiTid = pCtx->uiTemporalId;

Callers

nothing calls this directly

Calls 3

SetMethod · 0.45
ProcessMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected