MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / GetProjecedImage

Function GetProjecedImage

cmp_core/shaders/bc7_encode_kernel.cpp:550–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550void GetProjecedImage(CGV_FLOAT projection_out[SOURCE_BLOCK_SIZE], //output projected data
551 CGV_FLOAT image_centered[SOURCE_BLOCK_SIZE * MAX_CHANNELS],
552 CGV_INT numEntries, // < 16
553 CGV_FLOAT EigenVector[MAX_CHANNELS],
554 CGU_UINT8 channels3or4)
555{ // 3 = RGB or 4 = RGBA
556 projection_out[0] = 0.0F;
557
558 // EigenVector must be normalized
559 for (CGV_INT k = 0; k < numEntries; k++)
560 {
561 projection_out[k] = 0.0F;
562 for (CGU_UINT8 ch = 0; ch < channels3or4; ch++)
563 {
564 projection_out[k] = projection_out[k] + (image_centered[k + (ch * SOURCE_BLOCK_SIZE)] * EigenVector[ch]);
565 }
566 }
567}
568
569INLINE CGV_UINT8 get_partition_subset(CGV_INT part_id, CGU_INT maxSubsets, CGV_INT index)
570{

Callers 1

GetQuantizeIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected