@@ -10,7 +10,7 @@ use super::backward_references::{
10
10
H6Sub , HQ5Sub , HQ7Sub , HowPrepared , StoreLookaheadThenStore , Struct1 , UnionHasher , H9 ,
11
11
H9_BLOCK_BITS , H9_BLOCK_SIZE , H9_BUCKET_BITS , H9_NUM_LAST_DISTANCES_TO_CHECK ,
12
12
} ;
13
- use super :: bit_cost:: { BitsEntropy , ShannonEntropy } ;
13
+ use super :: bit_cost:: { shannon_entropy , BitsEntropy } ;
14
14
use super :: brotli_bit_stream:: {
15
15
store_meta_block, store_meta_block_fast, store_meta_block_trivial,
16
16
store_uncompressed_meta_block, BrotliWriteEmptyLastMetaBlock , BrotliWriteMetadataMetaBlock ,
@@ -1741,12 +1741,12 @@ fn ChooseContextMap(
1741
1741
}
1742
1742
i = i. wrapping_add ( 1 ) ;
1743
1743
}
1744
- entropy[ 1 ] = ShannonEntropy ( & monogram_histo[ ..] , 3 ) . 0 ;
1744
+ entropy[ 1 ] = shannon_entropy ( & monogram_histo[ ..] , 3 ) . 0 ;
1745
1745
entropy[ 2 ] =
1746
- ShannonEntropy ( & two_prefix_histo[ ..] , 3 ) . 0 + ShannonEntropy ( & two_prefix_histo[ 3 ..] , 3 ) . 0 ;
1746
+ shannon_entropy ( & two_prefix_histo[ ..] , 3 ) . 0 + shannon_entropy ( & two_prefix_histo[ 3 ..] , 3 ) . 0 ;
1747
1747
entropy[ 3 ] = 0.0 ;
1748
1748
for i in 0usize ..3usize {
1749
- entropy[ 3 ] += ShannonEntropy ( & bigram_histo[ ( 3usize ) . wrapping_mul ( i) ..] , 3 ) . 0 ;
1749
+ entropy[ 3 ] += shannon_entropy ( & bigram_histo[ ( 3usize ) . wrapping_mul ( i) ..] , 3 ) . 0 ;
1750
1750
}
1751
1751
let total: usize = monogram_histo[ 0 ]
1752
1752
. wrapping_add ( monogram_histo[ 1 ] )
@@ -1834,11 +1834,11 @@ fn ShouldUseComplexStaticContextMap(
1834
1834
}
1835
1835
start_pos += 4096 ;
1836
1836
}
1837
- entropy[ 1 ] = ShannonEntropy ( & combined_histo[ ..] , 32 ) . 0 ;
1837
+ entropy[ 1 ] = shannon_entropy ( & combined_histo[ ..] , 32 ) . 0 ;
1838
1838
entropy[ 2 ] = 0.0 ;
1839
1839
for i in 0 ..13 {
1840
1840
assert ! ( i < 13 ) ;
1841
- entropy[ 2 ] += ShannonEntropy ( & context_histo[ i] [ ..] , 32 ) . 0 ;
1841
+ entropy[ 2 ] += shannon_entropy ( & context_histo[ i] [ ..] , 32 ) . 0 ;
1842
1842
}
1843
1843
entropy[ 0 ] = 1.0 / ( total as floatX ) ;
1844
1844
entropy[ 1 ] *= entropy[ 0 ] ;
0 commit comments