brotli/enc/cluster.h

49 lines
1.0 KiB
C
Raw Normal View History

/* Copyright 2013 Google Inc. All Rights Reserved.
2015-12-11 10:11:51 +00:00
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
/* Functions for clustering similar histograms together. */
#ifndef BROTLI_ENC_CLUSTER_H_
#define BROTLI_ENC_CLUSTER_H_
#include "../common/types.h"
#include "./histogram.h"
2016-06-13 09:01:04 +00:00
#include "./memory.h"
#include "./port.h"
2016-06-13 09:01:04 +00:00
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
2016-06-13 09:01:04 +00:00
typedef struct HistogramPair {
2016-01-07 15:27:49 +00:00
uint32_t idx1;
uint32_t idx2;
double cost_combo;
double cost_diff;
2016-06-13 09:01:04 +00:00
} HistogramPair;
2016-06-13 09:01:04 +00:00
#define CODE(X) /* Declaration */;
2016-06-13 09:01:04 +00:00
#define FN(X) X ## Literal
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
2016-06-13 09:01:04 +00:00
#define FN(X) X ## Command
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
2016-06-13 09:01:04 +00:00
#define FN(X) X ## Distance
#include "./cluster_inc.h" /* NOLINT(build/include) */
#undef FN
2016-06-13 09:01:04 +00:00
#undef CODE
2016-06-13 09:01:04 +00:00
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
#endif /* BROTLI_ENC_CLUSTER_H_ */