ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
video/ascii/avx2/common.h
Go to the documentation of this file.
1
6#ifndef AVX2_COMMON_H
7#define AVX2_COMMON_H
8
9#include <stdint.h>
11
12#if SIMD_SUPPORT_AVX2
13
14// Thread-local storage for AVX2 working buffers
15extern THREAD_LOCAL ALIGNED_32 uint8_t avx2_r_buffer[32];
16extern THREAD_LOCAL ALIGNED_32 uint8_t avx2_g_buffer[32];
17extern THREAD_LOCAL ALIGNED_32 uint8_t avx2_b_buffer[32];
18extern THREAD_LOCAL ALIGNED_32 uint8_t avx2_luminance_buffer[32];
19
20// Helper functions
21char *emit_rle_count(char *pos, uint32_t rep_count);
22void avx2_load_rgb32_optimized(const rgb_pixel_t *__restrict pixels, uint8_t *__restrict r_out,
23 uint8_t *__restrict g_out, uint8_t *__restrict b_out);
24void avx2_compute_luminance_32(const uint8_t *r_vals, const uint8_t *g_vals, const uint8_t *b_vals,
25 uint8_t *luminance_out);
26
27#endif // SIMD_SUPPORT_AVX2
28#endif // AVX2_COMMON_H
unsigned int uint32_t
Definition common.h:58
unsigned char uint8_t
Definition common.h:56
RGB pixel structure.
SIMD-optimized ASCII conversion interface.