mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 15:03:34 +00:00
6f7d0cb1c3
This makes breaking changes to add underscores to many non-standard function names provided by the c library. MODE=tiny is now tinier and we now use smaller locks that are better for tiny apps in this mode. Some headers have been renamed to be in the same folder as the build package, so it'll be easier to know which build dependency is needed. Certain old misguided interfaces have been removed. Intel intrinsics headers are now listed in libc/isystem (but not in the amalgamation) to help further improve open source compatibility. Header complexity has also been reduced. Lastly, more shell scripts are now available.
58 lines
2.1 KiB
C
58 lines
2.1 KiB
C
#ifndef COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_
|
|
#define COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_
|
|
#include "dsp/tty/quant.h"
|
|
#include "libc/runtime/buffer.internal.h"
|
|
#include "libc/mem/gc.internal.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
struct Graphic {
|
|
union {
|
|
struct GuardedBuffer b;
|
|
char *bytes;
|
|
float (*lum)[2][8];
|
|
float (*rgba)[2][2];
|
|
};
|
|
unsigned yn, xn;
|
|
unsigned ys, xs;
|
|
unsigned bs, es;
|
|
};
|
|
|
|
void dither(long yw, long xw, unsigned char[3][yw][xw], long, long);
|
|
struct Graphic *resizegraphic(struct Graphic *, size_t, size_t);
|
|
void getxtermcodes(struct TtyRgb *, const struct Graphic *);
|
|
void ycbcr2lum(struct Graphic *, uint8_t *, uint8_t *, uint8_t *, size_t,
|
|
size_t, size_t);
|
|
|
|
long sharpen(long cn, long yw, long xw, unsigned char[cn][yw][xw], long, long);
|
|
long unsharp(long cn, long yw, long xw, unsigned char[cn][yw][xw], long, long);
|
|
long gaussian(long yn, long xn, unsigned char[3][yn][xn]);
|
|
void sobel(struct Graphic *);
|
|
extern void (*ycbcr2rgb)(struct Graphic *, uint8_t *, uint8_t *, uint8_t *,
|
|
size_t, size_t, size_t);
|
|
|
|
void emboss(struct Graphic *);
|
|
void boxblur(struct Graphic *);
|
|
double perlin3(double, double, double);
|
|
|
|
void stdgamma(unsigned n, __m128 rgba[n]);
|
|
void lingamma(unsigned n, __m128 rgba[n]);
|
|
|
|
void OldBilinearScale(size_t dyw, size_t dxw, __v4sf dst[dyw][dxw], size_t syw,
|
|
size_t sxw, __v4sf src[syw][sxw], size_t dyn, size_t dxn,
|
|
size_t syn, size_t sxn);
|
|
|
|
int MagicScale(unsigned dyn, unsigned dxn, __v4sf dst[dyn][dxn], unsigned syn,
|
|
unsigned sxn, __v4sf src[syn][sxn]);
|
|
|
|
void interlace(size_t dyn, size_t dxn, float dst[dyn][dxn][4], size_t syn,
|
|
size_t sxn, size_t ssw, unsigned char reds[syn][ssw],
|
|
unsigned char greens[syn][ssw], unsigned char blues[syn][ssw]);
|
|
|
|
void WriteToFrameBuffer(size_t dyn, size_t dxn, unsigned char dst[dyn][dxn][4],
|
|
size_t syn, size_t sxn, float src[syn][sxn][4],
|
|
size_t yn, size_t xn);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_TOOL_VIZ_LIB_GRAPHIC_H_ */
|