Skip to content

Instantly share code, notes, and snippets.

@3outeille
Created September 8, 2022 11:10
Show Gist options
  • Save 3outeille/2fd3f5f3ce72a620d8d359c3d8411c0b to your computer and use it in GitHub Desktop.
Save 3outeille/2fd3f5f3ce72a620d8d359c3d8411c0b to your computer and use it in GitHub Desktop.
fg_compute_block_avg context call
/* Loop of 16x16 blocks */
for (y = 0; y < heightComp[compCtr]; y += 16)
{
...
for (x = 0; x < widthComp[compCtr]; x += 16)
{
...
for (blkId = 0; blkId < 4; blkId++)
{
yOffset8x8 = (blkId >> 1) * 8;
xOffset8x8 = (blkId & 0x1)* 8;
...
blockAvg = fg_compute_block_avg(srcSampleBlk8, strideComp[compCtr], &numSamples,
OVMIN(8, (heightComp[compCtr] - y - yOffset8x8)),
OVMIN(8, (widthComp[compCtr] - x - xOffset8x8)),
bitDepth);
}
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment