path stringlengths 14 112 | content stringlengths 0 6.32M | size int64 0 6.32M | max_lines int64 1 100k | repo_name stringclasses 2
values | autogenerated bool 1
class |
|---|---|---|---|---|---|
cosmopolitan/dsp/tty/setrawmode.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,213 | 33 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/xtermname.h | #ifndef COSMOPOLITAN_DSP_TTY_XTERMNAME_H_
#define COSMOPOLITAN_DSP_TTY_XTERMNAME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const char kXtermName[];
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_DSP_TTY_XTERMNAME_H_ */
| 292 | 11 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/ident.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,148 | 102 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/setbgfg16.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,556 | 43 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/kxtermcubesteps.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 1,933 | 22 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/windex-sse4.S | /*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-â
âvi: set et ft=asm ts=8 tw=8 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,704 | 61 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/ttyraster.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 28,781 | 804 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/rgb2xterm24f.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,453 | 41 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/ttyquant.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 3,701 | 81 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/tty.h | #ifndef COSMOPOLITAN_DSP_TTY_TTY_H_
#define COSMOPOLITAN_DSP_TTY_TTY_H_
#define kTtyIdScreen 83
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct FILE;
struct termios;
struct TtyIdent {
int id; /* first number sent back by \e[>c */
int version; /* second number sent bac... | 1,755 | 60 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/ttymove.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 6,357 | 198 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/config.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,596 | 46 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/windex-k8.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,092 | 34 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/itoa8.h | #ifndef COSMOPOLITAN_DSP_TTY_ITOA8_H_
#define COSMOPOLITAN_DSP_TTY_ITOA8_H_
#include "libc/str/str.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct Itoa8 {
uint8_t size[256];
uint32_t data[256];
};
extern struct Itoa8 kItoa8;
forceinline char *itoa8(char *p, uint8_t c) {
memcpy(p, &kItoa8.... | 475 | 22 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/sendtitle.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,537 | 47 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/ttyraw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 5,745 | 160 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/mpsadbw.S | /*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-â
âvi: set et ft=asm ts=8 tw=8 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,040 | 29 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/setraw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,517 | 45 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/write.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,939 | 62 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/kcgapalette.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,904 | 30 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/xtermname.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 5,333 | 282 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/quant.h | #ifndef DSP_TTY_QUANT_H_
#define DSP_TTY_QUANT_H_
#include "dsp/tty/ttyrgb.h"
#include "libc/assert.h"
#include "libc/intrin/bits.h"
#include "libc/limits.h"
#include "libc/str/str.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#define TL 0
#define TR 1
#define BL 2
#define BR 3
typedef float ttyrgb_m... | 2,693 | 95 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/rgb2ansi.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,667 | 119 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/windex.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,384 | 42 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/hidecursor.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,784 | 57 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/windex.h | #ifndef COSMOPOLITAN_DSP_TTY_WINDEX_H_
#define COSMOPOLITAN_DSP_TTY_WINDEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern unsigned (*windex)(uint16_t *, size_t);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_DSP_TTY_WINDEX_H_ */
| 298 | 11 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/tty2rgb24.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 1,930 | 24 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/rgb2xterm24.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,067 | 26 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/rgb2ttyf2i.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,084 | 28 | jart/cosmopolitan | false |
cosmopolitan/dsp/tty/itoa8.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,431 | 47 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/unmulaw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,270 | 38 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/getintegercoefficients.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,546 | 113 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c1331s.h | #ifndef COSMOPOLITAN_DSP_CORE_C1331S_H_
#define COSMOPOLITAN_DSP_CORE_C1331S_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Byte sized kernel for resampling difference samples in half.
*
* @define (1*(a-128)+3*(a-128)+3*(a-128)+1*(a-128))/(1+3+3+1)+128
* @see C1331(), Y420CbCr2RgbScale()
*/
forceinline pureconst ... | 788 | 29 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/unalaw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,257 | 39 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/matmul3.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,241 | 38 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/scalevolume.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,570 | 50 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/double2byte.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,250 | 35 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/core.mk | #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-â
#âââvi: set et ft=make ts=8 tw=8 fenc=utf-8 :viââââââââââââââââââââââââ
PKGS += DSP_CORE
DSP_CORE_ARTIFACTS += DSP_CORE_A
DSP_CORE = $(DSP_CORE_A_DEPS) $(DSP_CORE_A)
DSP_CORE_A = o/$(MODE)/d... | 1,858 | 63 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/vmatmul3.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,212 | 32 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/matvmul3.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,212 | 32 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/illumination.h | #ifndef COSMOPOLITAN_DSP_CORE_ILLUMINANT_H_
#define COSMOPOLITAN_DSP_CORE_ILLUMINANT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const double kBradford[3][3];
extern const double kIlluminantA[3];
extern const double kIlluminantAD10[3];
extern const double kIlluminantC[3];
extern const double ... | 1,140 | 32 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/gamma.h | #ifndef COSMOPOLITAN_DSP_CORE_GAMMA_H_
#define COSMOPOLITAN_DSP_CORE_GAMMA_H_
#include "libc/math.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#define COMPANDLUMA(X, ...) COMPANDLUMA_(X, __VA_ARGS__)
#define COMPANDLUMA_(X, K1, K2, K3, K4) \
((X) > (K3) / (K4) ? (1 + (K2)) * pow((X), 1 / (K1)) - (K2) : (X) * (K4))
#def... | 1,004 | 24 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c121.h | #ifndef COSMOPOLITAN_DSP_CORE_C121_H_
#define COSMOPOLITAN_DSP_CORE_C121_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
forceinline pureconst artificial unsigned char C121(unsigned char al,
unsigned char bl,
... | 570 | 22 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/kss8.h | #ifndef COSMOPOLITAN_DSP_CORE_KSS8_H_
#define COSMOPOLITAN_DSP_CORE_KSS8_H_
#include "libc/limits.h"
#include "libc/macros.internal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Performs 16-bit scaled rounded saturated madd w/ eight coefficients or fewer.
*
* (Σᵢââââðáµ¢ð¥áµ¢ + 2áµâ»Â¹)/2áµ
*... | 2,487 | 44 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/float2short.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,449 | 40 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/byte2double.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,202 | 36 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/differsumsq.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,469 | 67 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/getintegercoefficients8.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 3,525 | 83 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c11.h | #ifndef COSMOPOLITAN_DSP_CORE_C11_H_
#define COSMOPOLITAN_DSP_CORE_C11_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Fixed-point 8-bit rounded mean kernel.
*
* @define (a + b) / 2
*/
static inline pureconst artificial unsigned char C11(unsigned char al,
unsigne... | 506 | 23 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/core.h | #ifndef COSMOPOLITAN_DSP_CORE_CORE_H_
#define COSMOPOLITAN_DSP_CORE_CORE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int alaw(int);
int unalaw(int);
int mulaw(int);
int unmulaw(int);
void *double2byte(long, const void *, double, double) vallocesque;
void *byte2double(long, const void *, double, doub... | 1,275 | 34 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/sad16x8n.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,616 | 47 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c161s.h | #ifndef COSMOPOLITAN_DSP_CORE_C161S_H_
#define COSMOPOLITAN_DSP_CORE_C161S_H_
#include "dsp/core/c161.h"
#include "libc/macros.internal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
forceinline pureconst artificial signed char C161S(signed char al,
signed char bl,
... | 724 | 27 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/det3.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,351 | 36 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/inv3.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,911 | 46 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/q.h | #ifndef COSMOPOLITAN_DSP_CORE_Q_H_
#define COSMOPOLITAN_DSP_CORE_Q_H_
#include "libc/limits.h"
#include "libc/macros.internal.h"
#include "libc/math.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* @fileoverview Fixed point arithmetic macros.
* @see en.wikipedia.org/wiki/Q_(number_format)
*/
#define F2Q(Q, I) MIN((... | 963 | 28 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/half.h | #ifndef COSMOPOLITAN_DSP_CORE_HALF_H_
#define COSMOPOLITAN_DSP_CORE_HALF_H_
#include "libc/macros.internal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Divides integer in half w/ rounding.
*/
#define HALF(X) (((X) + 1) / 2)
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_DSP_CORE_HALF_H_ */
| 320 | 13 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c1331.h | #ifndef COSMOPOLITAN_DSP_CORE_C1331_H_
#define COSMOPOLITAN_DSP_CORE_C1331_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Byte sized kernel for resampling memory in half.
*
* @define (1*ð + 3*ð + 3*ð + 1*ð) / (1 + 3 + 3 + 1)
* @see C161() afterward for superior sin(ð¥)/ð¥
* @limit [0,255] â [0..... | 856 | 31 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/dct.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 5,016 | 85 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/alaw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,381 | 47 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c331.h | #ifndef COSMOPOLITAN_DSP_CORE_C331_H_
#define COSMOPOLITAN_DSP_CORE_C331_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/**
* Fixed-point 8-bit magic edge resampling kernel.
*
* @define (3*a + 3*b + 1*c) / 7
* @see C1331()
*/
static inline pureconst artificial unsigned char C331(unsigned char al,
... | 746 | 31 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c121s.h | #ifndef COSMOPOLITAN_DSP_CORE_C121S_H_
#define COSMOPOLITAN_DSP_CORE_C121S_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
forceinline pureconst artificial signed char C121S(signed char al,
signed char bl,
signed char cl) {
... | 513 | 20 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/illumination.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,204 | 79 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/differsumsq8.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 27,966 | 463 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/twixt8.h | #ifndef COSMOPOLITAN_DSP_CORE_TWIXT8_H_
#define COSMOPOLITAN_DSP_CORE_TWIXT8_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/**
* 8-bit linear interpolation kernel.
*/
static inline pureconst artificial unsigned char twixt8(unsigned char al,
uns... | 619 | 25 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/ks8.h | #ifndef COSMOPOLITAN_DSP_CORE_KS8_H_
#define COSMOPOLITAN_DSP_CORE_KS8_H_
#include "libc/macros.internal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* Performs 16-bit scaled rounded madd w/ eight coefficients or fewer.
*
* (Σᵢââââðáµ¢ð¥áµ¢ + 2áµâ»Â¹)/2áµ
*
* @note intent is avoiding type pro... | 2,937 | 48 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/mulaw.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,343 | 41 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/ituround.h | #ifndef COSMOPOLITAN_DSP_CORE_ITUROUND_H_
#define COSMOPOLITAN_DSP_CORE_ITUROUND_H_
#include "libc/math.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
/**
* An ITU recommended rounding function.
*
* 1. Negative numbers round toward zero
* 2. Positive numbers round toward infinity
*
* @see round(), rint()
*/
static in... | 582 | 24 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/gamma.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,276 | 42 | jart/cosmopolitan | false |
cosmopolitan/dsp/core/c161.h | #ifndef COSMOPOLITAN_DSP_CORE_C161_H_
#define COSMOPOLITAN_DSP_CORE_C161_H_
#include "libc/macros.internal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#define EXTRA_SHARP 2
/**
* Byte sized kernel for restoring sharpness of resampled memory.
*
* @define CLAMP[(-1*ð + 6*ð + -1*ð) / (-1 + 6 + -1)]
* @limit [0... | 866 | 34 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/demux.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 7,758 | 209 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/video.h | #ifndef COSMOPOLITAN_DSP_MPEG_VIDEO_H_
#define COSMOPOLITAN_DSP_MPEG_VIDEO_H_
#include "dsp/mpeg/mpeg.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
typedef struct {
int full_px;
int is_set;
int r_size;
int h;
int v;
} plm_video_motion_t;
typedef struct plm_video_t {
double framerate;
do... | 1,570 | 63 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/README.txt | PL_MPEG - MPEG1 Video decoder, MP2 Audio decoder, MPEG-PS demuxer
Dominic Szablewski - https://phoboslab.org
-- Synopsis
// This function gets called for each decoded video frame
void my_video_callback(plm_t *plm, plm_frame_t *frame, void *user) {
// Do something with frame->y.data, frame->cr.data, frame->cb.data
}
... | 3,483 | 93 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/blockset.h | #ifndef COSMOPOLITAN_DSP_MPEG_BLOCKSET_H_
#define COSMOPOLITAN_DSP_MPEG_BLOCKSET_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#define PLM_BLOCK_SET(DEST, DEST_INDEX, DEST_WIDTH, SOURCE_INDEX, \
SOURCE_WIDTH, BLOCK_SIZE, OP) \
do { ... | 1,188 | 23 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/plm.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 11,098 | 338 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/mpeg.h | #ifndef COSMOPOLITAN_DSP_MPEG_MPEG_H_
#define COSMOPOLITAN_DSP_MPEG_MPEG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct FILE;
typedef struct plm_t plm_t;
typedef struct plm_buffer_t plm_buffer_t;
typedef struct plm_demux_t plm_demux_t;
typedef struct plm_video_t plm_video_t;
typedef struct plm_... | 13,409 | 451 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/idct.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,934 | 107 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/mpeg1.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 43,121 | 1,117 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/macroblock.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 6,797 | 172 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/demux.h | #ifndef COSMOPOLITAN_DSP_MPEG_DEMUX_H_
#define COSMOPOLITAN_DSP_MPEG_DEMUX_H_
#include "dsp/mpeg/mpeg.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#define START_PACK 0xBA
#define START_END 0xB9
#define START_SYSTEM 0xBB
typedef struct plm_demux_t {
plm_buffer_t *buffer;
int destroy_buffer_when_d... | 923 | 32 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/buffer.h | #ifndef COSMOPOLITAN_DSP_MPEG_BUFFER_H_
#define COSMOPOLITAN_DSP_MPEG_BUFFER_H_
#include "dsp/mpeg/mpeg.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct FILE;
enum plm_buffer_mode {
PLM_BUFFER_MODE_FILE,
PLM_BUFFER_MODE_FIXED_MEM,
PLM_BUFFER_MODE_DYNAMIC_MEM
};
typedef struct plm_buffer_t ... | 4,639 | 164 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/mpeg.mk | #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-â
#âââvi: set et ft=make ts=8 tw=8 fenc=utf-8 :viââââââââââââââââââââââââ
PKGS += DSP_MPEG
DSP_MPEG_ARTIFACTS += DSP_MPEG_A
DSP_MPEG = $(DSP_MPEG_A_DEPS) $(DSP_MPEG_A)
DSP_MPEG_A = o/$(MODE)/d... | 1,872 | 67 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/clamp4int256-core.S | /*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-â
âvi: set et ft=asm ts=8 tw=8 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 2,054 | 31 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/mp2.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 30,344 | 776 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/buffer.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 6,542 | 159 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/slowrgb.c | /*-*- mode:c;indent-tabs-mode:t;c-basic-offset:4;tab-width:4;coding:utf-8 -*-â
âvi: set et ft=c ts=4 sw=4 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 4,979 | 89 | jart/cosmopolitan | false |
cosmopolitan/dsp/mpeg/idct.h | #ifndef COSMOPOLITAN_DSP_MPEG_IDCT_H_
#define COSMOPOLITAN_DSP_MPEG_IDCT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
void plm_video_idct(int *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_DSP_MPEG_IDCT_H_ */
| 276 | 11 | jart/cosmopolitan | false |
cosmopolitan/examples/defer-statements.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,131 | 25 | jart/cosmopolitan | false |
cosmopolitan/examples/getcpucount.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 902 | 16 | jart/cosmopolitan | false |
cosmopolitan/examples/ls.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 2,346 | 84 | jart/cosmopolitan | false |
cosmopolitan/examples/fastmod.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,789 | 48 | jart/cosmopolitan | false |
cosmopolitan/examples/hertz.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,452 | 43 | jart/cosmopolitan | false |
cosmopolitan/examples/time.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 3,040 | 100 | jart/cosmopolitan | false |
cosmopolitan/examples/thread.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,210 | 34 | jart/cosmopolitan | false |
cosmopolitan/examples/certapp.c | /*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-â
âvi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :viâ
âââââââââââââââââââââââââââââââââââââââââââââââââââ... | 13,091 | 404 | jart/cosmopolitan | false |
cosmopolitan/examples/lstime.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 2,824 | 97 | jart/cosmopolitan | false |
cosmopolitan/examples/nanosleep.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,792 | 62 | jart/cosmopolitan | false |
cosmopolitan/examples/auto-memory-safety-crash3.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,551 | 40 | jart/cosmopolitan | false |
cosmopolitan/examples/exit.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 890 | 15 | jart/cosmopolitan | false |
cosmopolitan/examples/wall.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 4,519 | 149 | jart/cosmopolitan | false |
cosmopolitan/examples/breakpoint.c | #if 0
/*ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â To the extent possible under law, Justine Tunney has waived â
â all copyright and related or neighbo... | 1,310 | 31 | jart/cosmopolitan | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.