MCPcopy Create free account
hub / github.com/crownengine/crown / ProcessRGB

Function ProcessRGB

3rdparty/bimg/3rdparty/etc2/ProcessRGB.cpp:678–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678uint64 ProcessRGB( const uint8* src )
679{
680 uint64 d = CheckSolid( src );
681 if( d != 0 ) return d;
682
683 v4i a[8];
684 uint err[4] = {};
685 PrepareAverages( a, src, err );
686 size_t idx = GetLeastError( err, 4 );
687 EncodeAverages( d, a, idx );
688
689#if defined __SSE4_1__ && !defined REFERENCE_IMPLEMENTATION
690 uint32 terr[2][8] = {};
691#else
692 uint64 terr[2][8] = {};
693#endif
694 uint16 tsel[16][8];
695 const uint32* id = g_id[idx];
696 FindBestFit( terr, tsel, a, id, src );
697
698 return FixByteOrder( EncodeSelectors( d, terr, tsel, id ) );
699}
700
701uint64 ProcessRGB_ETC2( const uint8* src )
702{

Callers

nothing calls this directly

Calls 7

CheckSolidFunction · 0.85
PrepareAveragesFunction · 0.85
GetLeastErrorFunction · 0.85
EncodeAveragesFunction · 0.85
FindBestFitFunction · 0.85
FixByteOrderFunction · 0.85
EncodeSelectorsFunction · 0.70

Tested by

no test coverage detected