mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
fa20edc44d
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
21 lines
428 B
C
21 lines
428 B
C
#ifndef COSMOPOLITAN_DSP_CORE_TWIXT8_H_
|
|
#define COSMOPOLITAN_DSP_CORE_TWIXT8_H_
|
|
COSMOPOLITAN_C_START_
|
|
|
|
/**
|
|
* 8-bit linear interpolation kernel.
|
|
*/
|
|
__funline unsigned char twixt8(unsigned char al, unsigned char bl,
|
|
unsigned char p) {
|
|
short bx;
|
|
bx = bl;
|
|
bx -= al;
|
|
bx *= p;
|
|
bx >>= 8;
|
|
bx += al;
|
|
al = bx;
|
|
return al;
|
|
}
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* COSMOPOLITAN_DSP_CORE_TWIXT8_H_ */
|