| 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_cxx . . $ `c/enc/cluster.h:10:9`! |
| 11 | |
| 12 | #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/ |
| 13 | #include "histogram.h"cxx . . $ `<file>/c/enc/histogram.h`/ |
| 14 | #include "memory.h"cxx . . $ `<file>/c/enc/memory.h`/ |
| 15 | |
| 16 | #if defined(__cplusplus) || defined(c_plusplus) |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | typedef struct HistogramPaircxx . . $ HistogramPair# { |
| 21 | uint32_tcxx . . $ uint32_t# idx1cxx . . $ HistogramPair#idx1.; |
| 22 | uint32_tcxx . . $ uint32_t# idx2cxx . . $ HistogramPair#idx2.; |
| 23 | double cost_combocxx . . $ HistogramPair#cost_combo.; |
| 24 | double cost_diffcxx . . $ HistogramPair#cost_diff.; |
| 25 | } HistogramPaircxx . . $ HistogramPair#; |
| 26 | |
| 27 | #define CODEcxx . . $ `c/enc/cluster.h:27:9`!(X) /* Declaration */; |
| 28 | |
| 29 | #define FNcxx . . $ `c/enc/cluster.h:29:9`!(X) X ## Literal |
| 30 | #include "cluster_inc.h"cxx . . $ `<file>/c/enc/cluster_inc.h`/ /* NOLINT(build/include) */ |
| 31 | #undef FNcxx . . $ `c/enc/cluster.h:29:9`! |
| 32 | |
| 33 | #define FNcxx . . $ `c/enc/cluster.h:33:9`!(X) X ## Command |
| 34 | #include "cluster_inc.h"cxx . . $ `<file>/c/enc/cluster_inc.h`/ /* NOLINT(build/include) */ |
| 35 | #undef FNcxx . . $ `c/enc/cluster.h:33:9`! |
| 36 | |
| 37 | #define FNcxx . . $ `c/enc/cluster.h:37:9`!(X) X ## Distance |
| 38 | #include "cluster_inc.h"cxx . . $ `<file>/c/enc/cluster_inc.h`/ /* NOLINT(build/include) */ |
| 39 | #undef FNcxx . . $ `c/enc/cluster.h:37:9`! |
| 40 | |
| 41 | #undef CODEcxx . . $ `c/enc/cluster.h:27:9`! |
| 42 | |
| 43 | #if defined(__cplusplus) || defined(c_plusplus) |
| 44 | } /* extern "C" */ |
| 45 | #endif |
| 46 | |
| 47 | #endif /* BROTLI_ENC_CLUSTER_H_ */ |