cluster.h (997B)
1 /* Copyright 2013 Google Inc. All Rights Reserved. 2 3 Distributed under MIT license. 4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 5 */ 6 7 /* Functions for clustering similar histograms together. */ 8 9 #ifndef BROTLI_ENC_CLUSTER_H_ 10 #define BROTLI_ENC_CLUSTER_H_ 11 12 #include "../common/platform.h" 13 #include "histogram.h" 14 #include "memory.h" 15 16 #if defined(__cplusplus) || defined(c_plusplus) 17 extern "C" { 18 #endif 19 20 typedef struct HistogramPair { 21 uint32_t idx1; 22 uint32_t idx2; 23 double cost_combo; 24 double cost_diff; 25 } HistogramPair; 26 27 #define CODE(X) /* Declaration */; 28 29 #define FN(X) X ## Literal 30 #include "cluster_inc.h" /* NOLINT(build/include) */ 31 #undef FN 32 33 #define FN(X) X ## Command 34 #include "cluster_inc.h" /* NOLINT(build/include) */ 35 #undef FN 36 37 #define FN(X) X ## Distance 38 #include "cluster_inc.h" /* NOLINT(build/include) */ 39 #undef FN 40 41 #undef CODE 42 43 #if defined(__cplusplus) || defined(c_plusplus) 44 } /* extern "C" */ 45 #endif 46 47 #endif /* BROTLI_ENC_CLUSTER_H_ */