ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
simd_cells_t Struct Reference

The useful part of simd cells is in luminance: together they describe what is pending, who owns it, and how much data is valid. Keep the object with its parent operation and use the parent cleanup path. Row callbacks read/write exactly count elements. Glyph correlation reads 16 samples. Only short row tails use scalar code. More...

#include <include/ascii-chat/video/ascii/simd/cells.h>

Data Fields

simd_luminance_fn luminance
void(* pack )(const uint8_t *rgb, uint32_t *out, size_t count)
void(* lookup )(const uint8_t *luma, const uint32_t table[64], uint32_t *out, size_t count)
void(* quantize )(const uint32_t *rgb, uint32_t *out, size_t count, unsigned colors)
void(* halfblock )(const uint32_t *top, const uint32_t *bottom, uint32_t *glyph, uint32_t *fg, uint32_t *bg, size_t count, unsigned mode, const uint32_t keys[5])
size_t(* run )(const uint32_t *glyph, const uint32_t *fg, const uint32_t *bg, size_t count)
void(* emit_mono )(outbuf_t *out, const uint32_t *glyph, size_t count)
int(* glyph_shape_correlation )(const int16_t samples[16], const int16_t mask[16])

Detailed Description

The useful part of simd cells is in luminance: together they describe what is pending, who owns it, and how much data is valid. Keep the object with its parent operation and use the parent cleanup path. Row callbacks read/write exactly count elements. Glyph correlation reads 16 samples. Only short row tails use scalar code.

SIMD stages operate on complete rows of host-order packed RGB and UTF-8 keys.

Definition at line 14 of file cells.h.

Field Documentation

◆ emit_mono

void(* simd_cells_t::emit_mono) (outbuf_t *out, const uint32_t *glyph, size_t count)

Definition at line 21 of file cells.h.

Referenced by ascii_emit_prepared_row().

◆ glyph_shape_correlation

int(* simd_cells_t::glyph_shape_correlation) (const int16_t samples[16], const int16_t mask[16])

Definition at line 23 of file cells.h.

Referenced by ascii_glyph_render(), and ascii_render_glyph_match_mode().

◆ halfblock

void(* simd_cells_t::halfblock) (const uint32_t *top, const uint32_t *bottom, uint32_t *glyph, uint32_t *fg, uint32_t *bg, size_t count, unsigned mode, const uint32_t keys[5])

◆ lookup

void(* simd_cells_t::lookup) (const uint8_t *luma, const uint32_t table[64], uint32_t *out, size_t count)

Definition at line 17 of file cells.h.

Referenced by ascii_legacy_render(), and ascii_luminance_render().

◆ luminance

simd_luminance_fn simd_cells_t::luminance

Definition at line 15 of file cells.h.

Referenced by ascii_legacy_render(), and ascii_luminance_render().

◆ pack

void(* simd_cells_t::pack) (const uint8_t *rgb, uint32_t *out, size_t count)

◆ quantize

◆ run

size_t(* simd_cells_t::run) (const uint32_t *glyph, const uint32_t *fg, const uint32_t *bg, size_t count)

Definition at line 20 of file cells.h.

Referenced by ascii_emit_prepared_row().


The documentation for this struct was generated from the following file: