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

Function DyadicBilinearDownsampler2_ref

test/processing/ProcessUT_DownSample.cpp:33–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void DyadicBilinearDownsampler2_ref (uint8_t* pDst, const int32_t kiDstStride,
34 const uint8_t* pSrc, const int32_t kiSrcStride,
35 const int32_t kiSrcWidth, const int32_t kiSrcHeight) {
36 uint8_t* pDstLine = pDst;
37 const uint8_t* pSrcLine1 = pSrc;
38 const uint8_t* pSrcLine2 = pSrc + kiSrcStride;
39 const int32_t kiDstWidth = kiSrcWidth >> 1;
40 const int32_t kiDstHeight = kiSrcHeight >> 1;
41
42 for (int32_t j = 0; j < kiDstHeight; j++) {
43 for (int32_t i = 0; i < kiDstWidth; i++) {
44 const int32_t kiTempCol1 = (pSrcLine1[2 * i + 0] + pSrcLine2[2 * i + 0] + 1) >> 1;
45 const int32_t kiTempCol2 = (pSrcLine1[2 * i + 1] + pSrcLine2[2 * i + 1] + 1) >> 1;
46 pDstLine[i] = (uint8_t) ((kiTempCol1 + kiTempCol2 + 1) >> 1);
47 }
48 pDstLine += kiDstStride;
49 pSrcLine1 += 2 * kiSrcStride;
50 pSrcLine2 += 2 * kiSrcStride;
51 }
52}
53
54void GeneralBilinearFastDownsampler_ref (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth,
55 const int32_t kiDstHeight,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected