|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
⚡ Main SIMD ASCII rendering dispatcher with architecture detection and fallback handling More...
Go to the source code of this file.
Functions | |
| size_t | write_rgb_triplet (uint8_t value, char *dst) |
| void | init_default_luminance_palette (void) |
| void | init_dec3 (void) |
| void | ascii_simd_init (void) |
| ImageRGB | alloc_image (int w, int h) |
| void | str_init (Str *s) |
| void | str_destroy (Str *s) |
| void | str_reserve (Str *s, size_t need) |
| void | str_append_bytes (Str *s, const void *src, size_t n) |
| void | str_append_c (Str *s, char c) |
| void | str_printf (Str *s, const char *fmt,...) |
| void | convert_pixels_scalar (const rgb_pixel_t *pixels, char *ascii_chars, int count, const char luminance_palette[256]) |
| char * | convert_pixels_scalar_with_newlines (image_t *image, const char luminance_palette[256]) |
| char * | image_print_simd (image_t *image, const char *ascii_chars) |
| void | print_simd_capabilities (void) |
| simd_benchmark_t | benchmark_simd_conversion (int width, int height, int iterations) |
| simd_benchmark_t | benchmark_simd_color_conversion (int width, int height, int iterations, bool background_mode) |
| simd_benchmark_t | benchmark_simd_conversion_with_source (int width, int height, int iterations, bool background_mode, const image_t *source_image, bool use_256color) |
| simd_benchmark_t | benchmark_simd_color_conversion_with_source (int width, int height, int iterations, bool background_mode, const image_t *source_image, bool use_256color) |
Variables | |
| global_dec3_cache_t | g_dec3_cache = {.dec3_initialized = false} |
| char | g_default_luminance_palette [256] |
⚡ Main SIMD ASCII rendering dispatcher with architecture detection and fallback handling
Definition in file ascii_simd.c.
| ImageRGB alloc_image | ( | int | w, |
| int | h | ||
| ) |
Definition at line 106 of file ascii_simd.c.
| void ascii_simd_init | ( | void | ) |
Definition at line 98 of file ascii_simd.c.
References init_dec3(), and init_default_luminance_palette().
Referenced by ansi_fast_init(), and server_main().
| simd_benchmark_t benchmark_simd_color_conversion | ( | int | width, |
| int | height, | ||
| int | iterations, | ||
| bool | background_mode | ||
| ) |
Definition at line 501 of file ascii_simd.c.
References DEFAULT_ASCII_PALETTE, image_destroy(), image_new(), image_print_color(), and time_get_ns().
| simd_benchmark_t benchmark_simd_color_conversion_with_source | ( | int | width, |
| int | height, | ||
| int | iterations, | ||
| bool | background_mode, | ||
| const image_t * | source_image, | ||
| bool | use_256color | ||
| ) |
Definition at line 861 of file ascii_simd.c.
References ascii_convert(), DEFAULT_ASCII_PALETTE, g_default_luminance_palette, image_destroy(), image_new(), prewarm_sgr256_cache(), prewarm_sgr256_fg_cache(), and time_get_ns().
| simd_benchmark_t benchmark_simd_conversion | ( | int | width, |
| int | height, | ||
| int | iterations | ||
| ) |
Definition at line 334 of file ascii_simd.c.
References DEFAULT_ASCII_PALETTE, image_destroy(), image_new(), image_print(), and time_get_ns().
| simd_benchmark_t benchmark_simd_conversion_with_source | ( | int | width, |
| int | height, | ||
| int | iterations, | ||
| bool | background_mode, | ||
| const image_t * | source_image, | ||
| bool | use_256color | ||
| ) |
Definition at line 656 of file ascii_simd.c.
References DEFAULT_ASCII_PALETTE, image_destroy(), image_new(), image_print_color(), and time_get_ns().
| void convert_pixels_scalar | ( | const rgb_pixel_t * | pixels, |
| char * | ascii_chars, | ||
| int | count, | ||
| const char | luminance_palette[256] | ||
| ) |
Definition at line 175 of file ascii_simd.c.
| char * convert_pixels_scalar_with_newlines | ( | image_t * | image, |
| const char | luminance_palette[256] | ||
| ) |
Definition at line 190 of file ascii_simd.c.
References emit_rep(), ob_putc(), ob_term(), and rep_is_profitable().
| char * image_print_simd | ( | image_t * | image, |
| const char * | ascii_chars | ||
| ) |
Definition at line 260 of file ascii_simd.c.
References image_print().
Referenced by ascii_convert(), and image_print_with_capabilities().
| void init_dec3 | ( | void | ) |
Definition at line 66 of file ascii_simd.c.
References g_dec3_cache.
Referenced by append_truecolor_bg(), append_truecolor_fg(), append_truecolor_fg_bg(), and ascii_simd_init().
| void init_default_luminance_palette | ( | void | ) |
Definition at line 40 of file ascii_simd.c.
References DEFAULT_ASCII_PALETTE, DEFAULT_ASCII_PALETTE_LEN, and g_default_luminance_palette.
Referenced by ascii_simd_init().
| void print_simd_capabilities | ( | void | ) |
Definition at line 284 of file ascii_simd.c.
| void str_append_bytes | ( | Str * | s, |
| const void * | src, | ||
| size_t | n | ||
| ) |
Definition at line 138 of file ascii_simd.c.
References str_reserve().
Referenced by str_printf().
| void str_append_c | ( | Str * | s, |
| char | c | ||
| ) |
Definition at line 144 of file ascii_simd.c.
References str_reserve().
| void str_destroy | ( | Str * | s | ) |
Definition at line 122 of file ascii_simd.c.
| void str_init | ( | Str * | s | ) |
Definition at line 116 of file ascii_simd.c.
| void str_printf | ( | Str * | s, |
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 149 of file ascii_simd.c.
References safe_vsnprintf(), and str_append_bytes().
| void str_reserve | ( | Str * | s, |
| size_t | need | ||
| ) |
Definition at line 128 of file ascii_simd.c.
Referenced by str_append_bytes(), and str_append_c().
| size_t write_rgb_triplet | ( | uint8_t | value, |
| char * | dst | ||
| ) |
Definition at line 28 of file ascii_simd.c.
References g_dec3_cache.
| global_dec3_cache_t g_dec3_cache = {.dec3_initialized = false} |
Definition at line 25 of file ascii_simd.c.
Referenced by append_sgr_truecolor_bg(), append_sgr_truecolor_fg(), append_sgr_truecolor_fg_bg(), append_truecolor_bg(), append_truecolor_fg(), append_truecolor_fg_bg(), init_dec3(), and write_rgb_triplet().
| char g_default_luminance_palette[256] |
Definition at line 35 of file ascii_simd.c.
Referenced by benchmark_simd_color_conversion_with_source(), and init_default_luminance_palette().