mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 10:48:29 +00:00
Make improvements
- Expand redbean UNIX module - Expand redbean documentation - Ensure Lua copyright is embedded in binary - Increase the PATH_MAX limit especially on NT - Use column major sorting for linenoise completions - Fix some suboptimalities in redbean's new UNIX API - Figured out right flags for Multics newline in raw mode
This commit is contained in:
parent
cf3174dc74
commit
2046c0d2ae
305 changed files with 6602 additions and 4221 deletions
|
@ -93,7 +93,7 @@ void *BilinearScale(long dcw, long dyw, long dxw,
|
|||
gc(xmemalign(64, ROUNDUP(dxn, 64))),
|
||||
gc(xmemalign(64, ROUNDUP(sxn, 64) * 2)));
|
||||
} else {
|
||||
memset(dst[c0], 0, &dst[cn][0][0] - &dst[c0][0][0]);
|
||||
bzero(dst[c0], &dst[cn][0][0] - &dst[c0][0][0]);
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
|
|
|
@ -19,12 +19,12 @@ forceinline void convolve(unsigned yn, unsigned xn, __m128 img[yn][xn], int KW,
|
|||
kflip[KW - i - 1][KW - j - 1] = (__v4sf){f, f, f, f};
|
||||
}
|
||||
}
|
||||
memset(&g, 0, sizeof(g));
|
||||
bzero(&g, sizeof(g));
|
||||
resizegraphic(&g, yn, xn);
|
||||
tmp = g.b.p;
|
||||
for (y = 0; y < yn - KW; ++y) {
|
||||
for (x = 0; x < xn - KW; ++x) {
|
||||
memset(&p, 0, sizeof(p));
|
||||
bzero(&p, sizeof(p));
|
||||
for (i = 0; i < KW; ++i) {
|
||||
for (j = 0; j < KW; ++j) {
|
||||
p += img[y + i][x + j] * kflip[i][j] + C2;
|
||||
|
|
|
@ -45,7 +45,7 @@ long unsharp(long cn, long yw, long xw, unsigned char img[cn][yw][xw], long yn,
|
|||
for (x = 0; x < xn; ++x) {
|
||||
img[c][y - 3][x] = MIN(255, MAX(0, (*t)[y % 3][x]));
|
||||
}
|
||||
memset((*t)[y % 3], 0, sizeof(short) * xn);
|
||||
bzero((*t)[y % 3], sizeof(short) * xn);
|
||||
}
|
||||
if (y < yn) {
|
||||
for (x = 0; x < xn; ++x) {
|
||||
|
|
|
@ -155,8 +155,8 @@ void YCbCrInit(struct YCbCr **ycbcr, bool yonly, int swing, double gamma,
|
|||
const double gamut[3], const double illuminant[3]) {
|
||||
if (!*ycbcr) *ycbcr = xcalloc(1, sizeof(struct YCbCr));
|
||||
(*ycbcr)->yonly = yonly;
|
||||
memset((*ycbcr)->magnums, 0, sizeof((*ycbcr)->magnums));
|
||||
memset((*ycbcr)->lighting, 0, sizeof((*ycbcr)->lighting));
|
||||
bzero((*ycbcr)->magnums, sizeof((*ycbcr)->magnums));
|
||||
bzero((*ycbcr)->lighting, sizeof((*ycbcr)->lighting));
|
||||
YCbCrComputeCoefficients(swing, gamma, gamut, illuminant, (*ycbcr)->magnums,
|
||||
(*ycbcr)->lighting, (*ycbcr)->transfer[0]);
|
||||
imapxlatab((*ycbcr)->transfer[1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue