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