]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BrotliCompress/enc/histogram_inc.h
BaseTools: Make brotli a submodule
[mirror_edk2.git] / BaseTools / Source / C / BrotliCompress / enc / histogram_inc.h
diff --git a/BaseTools/Source/C/BrotliCompress/enc/histogram_inc.h b/BaseTools/Source/C/BrotliCompress/enc/histogram_inc.h
deleted file mode 100644 (file)
index a9d2e70..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* NOLINT(build/header_guard) */\r
-/* Copyright 2013 Google Inc. All Rights Reserved.\r
-\r
-   Distributed under MIT license.\r
-   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
-*/\r
-\r
-/* template parameters: Histogram, DATA_SIZE, DataType */\r
-\r
-/* A simple container for histograms of data in blocks. */\r
-\r
-typedef struct FN(Histogram) {\r
-  uint32_t data_[DATA_SIZE];\r
-  size_t total_count_;\r
-  double bit_cost_;\r
-} FN(Histogram);\r
-\r
-static BROTLI_INLINE void FN(HistogramClear)(FN(Histogram)* self) {\r
-  memset(self->data_, 0, sizeof(self->data_));\r
-  self->total_count_ = 0;\r
-  self->bit_cost_ = HUGE_VAL;\r
-}\r
-\r
-static BROTLI_INLINE void FN(ClearHistograms)(\r
-    FN(Histogram)* array, size_t length) {\r
-  size_t i;\r
-  for (i = 0; i < length; ++i) FN(HistogramClear)(array + i);\r
-}\r
-\r
-static BROTLI_INLINE void FN(HistogramAdd)(FN(Histogram)* self, size_t val) {\r
-  ++self->data_[val];\r
-  ++self->total_count_;\r
-}\r
-\r
-static BROTLI_INLINE void FN(HistogramAddVector)(FN(Histogram)* self,\r
-    const DataType* p, size_t n) {\r
-  self->total_count_ += n;\r
-  n += 1;\r
-  while (--n) ++self->data_[*p++];\r
-}\r
-\r
-static BROTLI_INLINE void FN(HistogramAddHistogram)(FN(Histogram)* self,\r
-    const FN(Histogram)* v) {\r
-  size_t i;\r
-  self->total_count_ += v->total_count_;\r
-  for (i = 0; i < DATA_SIZE; ++i) {\r
-    self->data_[i] += v->data_[i];\r
-  }\r
-}\r
-\r
-static BROTLI_INLINE size_t FN(HistogramDataSize)(void) { return DATA_SIZE; }\r