| 2961 | CGU_UINT16 aWeight4[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; |
| 2962 | |
| 2963 | CGU_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 | |
| 2974 | void GetBC7Ramp(CGU_UINT32 endpoint[][MAX_DIMENSION_BIG], |