mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Improve readability.
This commit is contained in:
parent
43042a2aa8
commit
9b8c18f99e
@ -542,12 +542,16 @@ static tracy_force_inline void ProcessRGB_AVX( const uint8_t* src, char*& dst )
|
||||
__m256i p8 = _mm256_packus_epi32( p7, p7 );
|
||||
__m256i p = _mm256_packus_epi16( p8, p8 );
|
||||
|
||||
__m256i mmmr = _mm256_set_epi16( 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800 );
|
||||
__m256i mmmg = _mm256_set_epi16( 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000 );
|
||||
__m256i mmmb = _mm256_set_epi16( 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000 );
|
||||
|
||||
__m256i mm0 = _mm256_unpacklo_epi8( _mm256_setzero_si256(), min );
|
||||
__m256i mm1 = _mm256_unpacklo_epi8( _mm256_setzero_si256(), max );
|
||||
__m256i mm2 = _mm256_unpacklo_epi64( mm1, mm0 );
|
||||
__m256i mmr = _mm256_and_si256( mm2, _mm256_set_epi16( 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800 ) );
|
||||
__m256i mmg = _mm256_srli_epi64( _mm256_and_si256( mm2, _mm256_set_epi16( 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000, 0x0000, 0x0000, 0xFC00, 0x0000 ) ), 21 );
|
||||
__m256i mmb = _mm256_srli_epi64( _mm256_and_si256( mm2, _mm256_set_epi16( 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000, 0x0000, 0xF800, 0x0000, 0x0000 ) ), 43 );
|
||||
__m256i mmr = _mm256_and_si256( mm2, mmmr );
|
||||
__m256i mmg = _mm256_srli_epi64( _mm256_and_si256( mm2, mmmg ), 21 );
|
||||
__m256i mmb = _mm256_srli_epi64( _mm256_and_si256( mm2, mmmb ), 43 );
|
||||
__m256i mm3 = _mm256_or_si256( mmr, mmg );
|
||||
__m256i mm4 = _mm256_or_si256( mm3, mmb );
|
||||
__m256i mm5 = _mm256_packus_epi32( mm4, mm4 );
|
||||
|
Loading…
Reference in New Issue
Block a user