ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/video/ascii/avx2/common.h
Go to the documentation of this file.
1
5
6#ifndef AVX2_COMMON_H
7#define AVX2_COMMON_H
8
9#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#if SIMD_SUPPORT_AVX2
17
18// Thread-local storage for AVX2 working buffers
19extern THREAD_LOCAL _Alignas(32) uint8_t avx2_r_buffer[32];
20extern THREAD_LOCAL _Alignas(32) uint8_t avx2_g_buffer[32];
21extern THREAD_LOCAL _Alignas(32) uint8_t avx2_b_buffer[32];
22extern THREAD_LOCAL _Alignas(32) uint8_t avx2_luminance_buffer[32];
23
24// Helper functions
25void avx2_load_rgb32_optimized(const rgb_pixel_t *__restrict pixels, uint8_t *__restrict r_out, uint8_t *__restrict g_out, uint8_t *__restrict b_out);
26void avx2_compute_luminance_32(const uint8_t *r_vals, const uint8_t *g_vals, const uint8_t *b_vals, uint8_t *luminance_out);
27
28#endif // SIMD_SUPPORT_AVX2
29#endif // AVX2_COMMON_H
30
31#ifdef __cplusplus
32}
33#endif
unsigned char uint8_t
SIMD-optimized ASCII conversion interface.