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

Function MCLumaAnchor

test/encoder/EncUT_MotionCompensation.cpp:77–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static void MCLumaAnchor (uint8_t* pDst, int32_t iDstStride, uint8_t* pSrc[4], int32_t iSrcStride,
78 int32_t iMvX, int32_t iMvY, int32_t iWidth, int32_t iHeight) {
79 int32_t iMvXIdx = iMvX & 3;
80 int32_t iMvYIdx = iMvY & 3;
81 int32_t iOffset = (iMvY >> 2) * iSrcStride + (iMvX >> 2);
82 uint8_t* pSrc1 = pSrc[iHpelRef0Array[iMvYIdx][iMvXIdx]] + iOffset + ((iMvYIdx) == 3) * iSrcStride;
83
84 if (bQpelNeeded[iMvYIdx][iMvXIdx]) {
85 uint8_t* pSrc2 = pSrc[iHpelRef1Array[iMvYIdx][iMvXIdx]] + iOffset + ((iMvXIdx) == 3);
86 PixelAvgAnchor (pDst, iDstStride, pSrc1, iSrcStride, pSrc2, iSrcStride, iWidth, iHeight);
87 } else {
88 MCCopyAnchor (pSrc1, iSrcStride, pDst, iDstStride, iWidth, iHeight);
89 }
90}
91
92static void MCChromaAnchor (uint8_t* pDstU, uint8_t* pDstV, int32_t iDstStride, uint8_t* pSrc, int32_t iSrcStride,
93 int32_t iMvX, int32_t iMvY, int32_t iWidth, int32_t iHeight) {

Callers

nothing calls this directly

Calls 2

PixelAvgAnchorFunction · 0.85
MCCopyAnchorFunction · 0.85

Tested by

no test coverage detected