MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / interpolate

Function interpolate

cmp_core/shaders/bc7_encode_kernel.cpp:2963–2971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2961CGU_UINT16 aWeight4[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64};
2962
2963CGU_UINT8 interpolate(CGU_UINT8 e0, CGU_UINT8 e1, CGU_UINT8 index, CGU_UINT8 indexprecision)
2964{
2965 if (indexprecision == 2)
2966 return (CGU_UINT8)(((64 - aWeight2[index]) * CGU_UINT16(e0) + aWeight2[index] * CGU_UINT16(e1) + 32) >> 6);
2967 else if (indexprecision == 3)
2968 return (CGU_UINT8)(((64 - aWeight3[index]) * CGU_UINT16(e0) + aWeight3[index] * CGU_UINT16(e1) + 32) >> 6);
2969 else // indexprecision == 4
2970 return (CGU_UINT8)(((64 - aWeight4[index]) * CGU_UINT16(e0) + aWeight4[index] * CGU_UINT16(e1) + 32) >> 6);
2971}
2972#endif
2973
2974void GetBC7Ramp(CGU_UINT32 endpoint[][MAX_DIMENSION_BIG],

Callers 1

GetBC7RampFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected