| 652 | |
| 653 | template<class T, class S> |
| 654 | uint64 EncodeSelectors( uint64 d, const T terr[2][8], const S tsel[16][8], const uint32* id, const uint64 value, const uint64 error) |
| 655 | { |
| 656 | size_t tidx[2]; |
| 657 | tidx[0] = GetLeastError( terr[0], 8 ); |
| 658 | tidx[1] = GetLeastError( terr[1], 8 ); |
| 659 | |
| 660 | if ((terr[0][tidx[0]] + terr[1][tidx[1]]) >= error) |
| 661 | { |
| 662 | return value; |
| 663 | } |
| 664 | |
| 665 | d |= tidx[0] << 26; |
| 666 | d |= tidx[1] << 29; |
| 667 | for( int i=0; i<16; i++ ) |
| 668 | { |
| 669 | uint64 t = tsel[i][tidx[id[i]%2]]; |
| 670 | d |= ( t & 0x1 ) << ( i + 32 ); |
| 671 | d |= ( t & 0x2 ) << ( i + 47 ); |
| 672 | } |
| 673 | |
| 674 | return FixByteOrder(d); |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | uint64 ProcessRGB( const uint8* src ) |
no test coverage detected