| 1 | /* Copyright 2013 Google Inc. All Rights Reserved. |
| 2 | |
| 3 | Distributed under MIT license. |
| 4 | See file LICENSE for detail or copy at https://opensource.org/licenses/MIT |
| 5 | */ |
| 6 | |
| 7 | /* Models the histograms of literals, commands and distance codes. */ |
| 8 | |
| 9 | #ifndef BROTLI_ENC_HISTOGRAM_H_ |
| 10 | #define BROTLI_ENC_HISTOGRAM_H_cxx . . $ `c/enc/histogram.h:10:9`! |
| 11 | |
| 12 | #include "../common/constants.h"cxx . . $ `<file>/c/common/constants.h`/ |
| 13 | #include "../common/context.h"cxx . . $ `<file>/c/common/context.h`/ |
| 14 | #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/ |
| 15 | #include "block_splitter.h"cxx . . $ `<file>/c/enc/block_splitter.h`/ |
| 16 | #include "command.h"cxx . . $ `<file>/c/enc/command.h`/ |
| 17 | |
| 18 | #if defined(__cplusplus) || defined(c_plusplus) |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | /* The distance symbols effectively used by "Large Window Brotli" (32-bit). */ |
| 23 | #define BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLScxx . . $ `c/enc/histogram.h:23:9`! 544 |
| 24 | |
| 25 | #define FNcxx . . $ `c/enc/histogram.h:25:9`!(X) X ## Literal |
| 26 | #define DATA_SIZEcxx . . $ `c/enc/histogram.h:26:9`! BROTLI_NUM_LITERAL_SYMBOLScxx . . $ `c/common/constants.h:24:9`! |
| 27 | #define DataTypecxx . . $ `c/enc/histogram.h:27:9`! uint8_t |
| 28 | #include "histogram_inc.h"cxx . . $ `<file>/c/enc/histogram_inc.h`/ /* NOLINT(build/include) */ |
| 29 | #undef DataTypecxx . . $ `c/enc/histogram.h:27:9`! |
| 30 | #undef DATA_SIZEcxx . . $ `c/enc/histogram.h:26:9`! |
| 31 | #undef FNcxx . . $ `c/enc/histogram.h:25:9`! |
| 32 | |
| 33 | #define FNcxx . . $ `c/enc/histogram.h:33:9`!(X) X ## Command |
| 34 | #define DataTypecxx . . $ `c/enc/histogram.h:34:9`! uint16_t |
| 35 | #define DATA_SIZEcxx . . $ `c/enc/histogram.h:35:9`! BROTLI_NUM_COMMAND_SYMBOLScxx . . $ `c/common/constants.h:25:9`! |
| 36 | #include "histogram_inc.h"cxx . . $ `<file>/c/enc/histogram_inc.h`/ /* NOLINT(build/include) */ |
| 37 | #undef DATA_SIZEcxx . . $ `c/enc/histogram.h:35:9`! |
| 38 | #undef FNcxx . . $ `c/enc/histogram.h:33:9`! |
| 39 | |
| 40 | #define FNcxx . . $ `c/enc/histogram.h:40:9`!(X) X ## Distance |
| 41 | #define DATA_SIZEcxx . . $ `c/enc/histogram.h:41:9`! BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLScxx . . $ `c/enc/histogram.h:23:9`! |
| 42 | #include "histogram_inc.h"cxx . . $ `<file>/c/enc/histogram_inc.h`/ /* NOLINT(build/include) */ |
| 43 | #undef DataTypecxx . . $ `c/enc/histogram.h:34:9`! |
| 44 | #undef DATA_SIZEcxx . . $ `c/enc/histogram.h:41:9`! |
| 45 | #undef FNcxx . . $ `c/enc/histogram.h:40:9`! |
| 46 | |
| 47 | BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliBuildHistogramsWithContextcxx . . $ BrotliBuildHistogramsWithContext(f0e7c0d57a73a3d2).( |
| 48 | const Commandcxx . . $ Command#* cmds, const size_tcxx . . $ size_t# num_commands, |
| 49 | const BlockSplitcxx . . $ BlockSplit#* literal_split, const BlockSplitcxx . . $ BlockSplit#* insert_and_copy_split, |
| 50 | const BlockSplitcxx . . $ BlockSplit#* dist_split, const uint8_tcxx . . $ uint8_t#* ringbuffer, size_tcxx . . $ size_t# pos, |
| 51 | size_tcxx . . $ size_t# mask, uint8_tcxx . . $ uint8_t# prev_byte, uint8_tcxx . . $ uint8_t# prev_byte2, |
| 52 | const ContextTypecxx . . $ ContextType#* context_modes, HistogramLiteralcxx . . $ HistogramLiteral#* literal_histograms, |
| 53 | HistogramCommandcxx . . $ HistogramCommand#* insert_and_copy_histograms, |
| 54 | HistogramDistancecxx . . $ HistogramDistance#* copy_dist_histograms); |
| 55 | |
| 56 | #if defined(__cplusplus) || defined(c_plusplus) |
| 57 | } /* extern "C" */ |
| 58 | #endif |
| 59 | |
| 60 | #endif /* BROTLI_ENC_HISTOGRAM_H_ */ |