@@ -855,19 +855,19 @@ private unsafe static void DecodeIntseq(byte* input, int offset, int a, int b, i
855855 }
856856 }
857857
858- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
858+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
859859 private static uint Color( uint r , uint g , uint b , uint a )
860860 {
861861 return r << 16 | g << 8 | b | a << 24 ;
862862 }
863863
864- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
864+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
865865 private static byte BitReverseU8( byte c , int bits )
866866 {
867867 return ( byte ) ( BitReverseTable [ c ] >> ( 8 - bits ) ) ;
868868 }
869869
870- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
870+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
871871 private static ulong BitReverseU64( ulong d , int bits )
872872 {
873873 ulong ret;
@@ -886,13 +886,13 @@ private static ulong BitReverseU64(ulong d, int bits)
886886 return ret >> ( 64 - bits ) ;
887887 }
888888
889- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
889+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
890890 private unsafe static int GetBits( byte * input , int bit , int len )
891891 {
892892 return ( * ( ( int * ) ( input + bit / 8 ) ) >> ( bit % 8 ) ) & ( ( 1 << len ) - 1 ) ;
893893 }
894894
895- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
895+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
896896 private unsafe static ulong GetBits64( byte * input , int bit , int len )
897897 {
898898 ulong mask = len == 64 ? 0xffffffffffffffff : ( 1UL << len ) - 1 ;
@@ -918,13 +918,13 @@ private unsafe static ulong GetBits64(byte* input, int bit, int len)
918918 }
919919 }
920920
921- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
921+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
922922 private static byte Clamp( int n )
923923 {
924924 return n < 0 ? byte . MinValue : n > 255 ? byte . MaxValue : ( byte ) n ;
925925 }
926926
927- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
927+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
928928 private static unsafe void BitTransferSigned( int * a , int * b )
929929 {
930930 * b = ( * b >> 1 ) | ( * a & 0x80 ) ;
@@ -935,7 +935,7 @@ private static unsafe void BitTransferSigned(int* a, int* b)
935935 }
936936 }
937937
938- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
938+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
939939 private unsafe static void SetEndpoint( int * endpoint , int r1 , int g1 , int b1 , int a1 , int r2 , int g2 , int b2 , int a2 )
940940 {
941941 endpoint[ 0 ] = r1 ;
@@ -948,7 +948,7 @@ private unsafe static void SetEndpoint(int* endpoint, int r1, int g1, int b1, in
948948 endpoint[ 7 ] = a2 ;
949949 }
950950
951- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
951+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
952952 private unsafe static void SetEndpointClamp ( int * endpoint , int r1 , int g1 , int b1 , int a1 , int r2 , int g2 , int b2 , int a2 )
953953 {
954954 endpoint [ 0 ] = Clamp ( r1 ) ;
@@ -961,7 +961,7 @@ private unsafe static void SetEndpointClamp(int* endpoint, int r1, int g1, int b
961961 endpoint [ 7 ] = Clamp ( a2 ) ;
962962 }
963963
964- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
964+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
965965 private unsafe static void SetEndpointBlue( int * endpoint , int r1 , int g1 , int b1 , int a1 , int r2 , int g2 , int b2 , int a2 )
966966 {
967967 endpoint[ 0 ] = ( r1 + b1 ) >> 1 ;
@@ -974,7 +974,7 @@ private unsafe static void SetEndpointBlue(int* endpoint, int r1, int g1, int b1
974974 endpoint[ 7 ] = a2 ;
975975 }
976976
977- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
977+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
978978 private unsafe static void SetEndpointBlueClamp ( int * endpoint , int r1 , int g1 , int b1 , int a1 , int r2 , int g2 , int b2 , int a2 )
979979 {
980980 endpoint [ 0 ] = Clamp ( ( r1 + b1 ) >> 1 ) ;
@@ -987,7 +987,7 @@ private unsafe static void SetEndpointBlueClamp(int* endpoint, int r1, int g1, i
987987 endpoint [ 7 ] = Clamp ( a2 ) ;
988988 }
989989
990- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
990+ [ MethodImpl ( MethodImplOptions . AggressiveInlining | MethodImplOptions . AggressiveOptimization ) ]
991991 private static byte SelectColor( int v0 , int v1 , int weight )
992992 {
993993 return ( byte ) ( ( ( ( ( v0 << 8 | v0 ) * ( 64 - weight ) + ( v1 << 8 | v1 ) * weight + 32 ) >> 6 ) * 255 + 32768 ) / 65536 ) ;
0 commit comments