2015-11-27 10:27:11 +00:00
|
|
|
/* Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
|
2015-12-11 10:11:51 +00:00
|
|
|
Distributed under MIT license.
|
2015-11-27 10:27:11 +00:00
|
|
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
2016-06-03 09:19:23 +00:00
|
|
|
/* Functions for clustering similar histograms together. */
|
2013-10-23 11:06:13 +00:00
|
|
|
|
|
|
|
#ifndef BROTLI_ENC_CLUSTER_H_
|
|
|
|
#define BROTLI_ENC_CLUSTER_H_
|
|
|
|
|
2016-08-23 12:40:33 +00:00
|
|
|
#include <brotli/types.h>
|
2013-10-23 11:06:13 +00:00
|
|
|
#include "./histogram.h"
|
2016-06-13 09:01:04 +00:00
|
|
|
#include "./memory.h"
|
2015-11-23 10:05:12 +00:00
|
|
|
#include "./port.h"
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2013-10-23 11:06:13 +00:00
|
|
|
|
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;
|
2013-10-23 11:06:13 +00:00
|
|
|
double cost_combo;
|
|
|
|
double cost_diff;
|
2016-06-13 09:01:04 +00:00
|
|
|
} HistogramPair;
|
2016-03-15 09:50:16 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#define CODE(X) /* Declaration */;
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#define FN(X) X ## Literal
|
|
|
|
#include "./cluster_inc.h" /* NOLINT(build/include) */
|
|
|
|
#undef FN
|
2016-03-15 09:50:16 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#define FN(X) X ## Command
|
|
|
|
#include "./cluster_inc.h" /* NOLINT(build/include) */
|
|
|
|
#undef FN
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#define FN(X) X ## Distance
|
|
|
|
#include "./cluster_inc.h" /* NOLINT(build/include) */
|
|
|
|
#undef FN
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#undef CODE
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-03 09:19:23 +00:00
|
|
|
#endif /* BROTLI_ENC_CLUSTER_H_ */
|