]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/BrotliCompress/enc/histogram.h
BaseTools: Add DevicePath support for PCD values
[mirror_edk2.git] / BaseTools / Source / C / BrotliCompress / enc / histogram.h
CommitLineData
11b7501a
SB
1/* Copyright 2013 Google Inc. All Rights Reserved.\r
2\r
3 Distributed under MIT license.\r
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
5*/\r
6\r
7/* Models the histograms of literals, commands and distance codes. */\r
8\r
9#ifndef BROTLI_ENC_HISTOGRAM_H_\r
10#define BROTLI_ENC_HISTOGRAM_H_\r
11\r
12#include <string.h> /* memset */\r
13\r
14#include "../common/constants.h"\r
15#include "../common/types.h"\r
16#include "./block_splitter.h"\r
17#include "./command.h"\r
18#include "./context.h"\r
19#include "./port.h"\r
20\r
21#if defined(__cplusplus) || defined(c_plusplus)\r
22extern "C" {\r
23#endif\r
24\r
25#define FN(X) X ## Literal\r
26#define DATA_SIZE BROTLI_NUM_LITERAL_SYMBOLS\r
27#define DataType uint8_t\r
28#include "./histogram_inc.h" /* NOLINT(build/include) */\r
29#undef DataType\r
30#undef DATA_SIZE\r
31#undef FN\r
32\r
33#define FN(X) X ## Command\r
34#define DataType uint16_t\r
35#define DATA_SIZE BROTLI_NUM_COMMAND_SYMBOLS\r
36#include "./histogram_inc.h" /* NOLINT(build/include) */\r
37#undef DATA_SIZE\r
38#undef FN\r
39\r
40#define FN(X) X ## Distance\r
41#define DATA_SIZE BROTLI_NUM_DISTANCE_SYMBOLS\r
42#include "./histogram_inc.h" /* NOLINT(build/include) */\r
43#undef DataType\r
44#undef DATA_SIZE\r
45#undef FN\r
46\r
47BROTLI_INTERNAL void BrotliBuildHistogramsWithContext(\r
48 const Command* cmds, const size_t num_commands,\r
49 const BlockSplit* literal_split, const BlockSplit* insert_and_copy_split,\r
50 const BlockSplit* dist_split, const uint8_t* ringbuffer, size_t pos,\r
51 size_t mask, uint8_t prev_byte, uint8_t prev_byte2,\r
52 const ContextType* context_modes, HistogramLiteral* literal_histograms,\r
53 HistogramCommand* insert_and_copy_histograms,\r
54 HistogramDistance* copy_dist_histograms);\r
55\r
56#if defined(__cplusplus) || defined(c_plusplus)\r
57} /* extern "C" */\r
58#endif\r
59\r
60#endif /* BROTLI_ENC_HISTOGRAM_H_ */\r