ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
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#if SIMD_SUPPORT_AVX2
13
14// Thread-local storage for AVX2 working buffers
15extern THREAD_LOCAL _Alignas(32) uint8_t avx2_r_buffer[32];
16extern THREAD_LOCAL _Alignas(32) uint8_t avx2_g_buffer[32];
17extern THREAD_LOCAL _Alignas(32) uint8_t avx2_b_buffer[32];
18extern THREAD_LOCAL _Alignas(32) uint8_t avx2_luminance_buffer[32];
19
20// Helper functions
21void avx2_load_rgb32_optimized(const rgb_pixel_t *__restrict pixels, uint8_t *__restrict r_out,
22 uint8_t *__restrict g_out, uint8_t *__restrict b_out);
23void avx2_compute_luminance_32(const uint8_t *r_vals, const uint8_t *g_vals, const uint8_t *b_vals,
24 uint8_t *luminance_out);
25
26#endif // SIMD_SUPPORT_AVX2
27#endif // AVX2_COMMON_H
unsigned char uint8_t
Definition common.h:60
SIMD-optimized ASCII conversion interface.