@@ -10,7 +10,7 @@ use super::backward_references::{
1010 H6Sub , HQ5Sub , HQ7Sub , HowPrepared , StoreLookaheadThenStore , Struct1 , UnionHasher , H9 ,
1111 H9_BLOCK_BITS , H9_BLOCK_SIZE , H9_BUCKET_BITS , H9_NUM_LAST_DISTANCES_TO_CHECK ,
1212} ;
13- use super :: bit_cost:: { BitsEntropy , ShannonEntropy } ;
13+ use super :: bit_cost:: { shannon_entropy , BitsEntropy } ;
1414use super :: brotli_bit_stream:: {
1515 store_meta_block, store_meta_block_fast, store_meta_block_trivial,
1616 store_uncompressed_meta_block, BrotliWriteEmptyLastMetaBlock , BrotliWriteMetadataMetaBlock ,
@@ -1741,12 +1741,12 @@ fn ChooseContextMap(
17411741 }
17421742 i = i. wrapping_add ( 1 ) ;
17431743 }
1744- entropy[ 1 ] = ShannonEntropy ( & monogram_histo[ ..] , 3 ) . 0 ;
1744+ entropy[ 1 ] = shannon_entropy ( & monogram_histo[ ..] , 3 ) . 0 ;
17451745 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 ;
17471747 entropy[ 3 ] = 0.0 ;
17481748 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 ;
17501750 }
17511751 let total: usize = monogram_histo[ 0 ]
17521752 . wrapping_add ( monogram_histo[ 1 ] )
@@ -1834,11 +1834,11 @@ fn ShouldUseComplexStaticContextMap(
18341834 }
18351835 start_pos += 4096 ;
18361836 }
1837- entropy[ 1 ] = ShannonEntropy ( & combined_histo[ ..] , 32 ) . 0 ;
1837+ entropy[ 1 ] = shannon_entropy ( & combined_histo[ ..] , 32 ) . 0 ;
18381838 entropy[ 2 ] = 0.0 ;
18391839 for i in 0 ..13 {
18401840 assert ! ( i < 13 ) ;
1841- entropy[ 2 ] += ShannonEntropy ( & context_histo[ i] [ ..] , 32 ) . 0 ;
1841+ entropy[ 2 ] += shannon_entropy ( & context_histo[ i] [ ..] , 32 ) . 0 ;
18421842 }
18431843 entropy[ 0 ] = 1.0 / ( total as floatX ) ;
18441844 entropy[ 1 ] *= entropy[ 0 ] ;
0 commit comments