/src/cmp_tool/programs/cmp_guess.h
Line | Count | Source |
1 | | /** |
2 | | * @file cmp_guess.h |
3 | | * @author Dominik Loidolt (dominik.loidolt@univie.ac.at) |
4 | | * @date 2020 |
5 | | * |
6 | | * @copyright GPLv2 |
7 | | * This program is free software; you can redistribute it and/or modify it |
8 | | * under the terms and conditions of the GNU General Public License, |
9 | | * version 2, as published by the Free Software Foundation. |
10 | | * |
11 | | * This program is distributed in the hope it will be useful, but WITHOUT |
12 | | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 | | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
14 | | * more details. |
15 | | * |
16 | | * @brief helps the user to find a good compression parameters for a given |
17 | | * dataset |
18 | | */ |
19 | | |
20 | | #ifndef CMP_GUESS_H |
21 | | #define CMP_GUESS_H |
22 | | |
23 | | #include <cmp_support.h> |
24 | | #include <cmp_chunk.h> |
25 | | |
26 | | |
27 | 56 | #define DEFAULT_GUESS_LEVEL 2 |
28 | | |
29 | 1 | #define CMP_GUESS_DEF_MODE_DIFF CMP_MODE_DIFF_ZERO |
30 | 9 | #define CMP_GUESS_DEF_MODE_MODEL CMP_MODE_MODEL_MULTI |
31 | | |
32 | | /* good guess for the spill parameter using the MODE_DIFF_MULTI */ |
33 | 576 | #define CMP_GOOD_SPILL_DIFF_MULTI 2U |
34 | | /* how often the model is updated before it is reset default value */ |
35 | | #define CMP_GUESS_N_MODEL_UPDATE_DEF 8 |
36 | | |
37 | | uint32_t cmp_guess(struct rdcu_cfg *rcfg, int level); |
38 | | |
39 | | uint32_t cmp_guess_chunk(const void *chunk, uint32_t chunk_size, |
40 | | const void *chunk_model, struct cmp_par *cmp_par, |
41 | | int guess_level); |
42 | | |
43 | | void cmp_guess_set_model_updates(int n_model_updates); |
44 | | |
45 | | uint32_t cmp_rdcu_get_good_spill(unsigned int golomb_par, enum cmp_mode cmp_mode); |
46 | | |
47 | | uint16_t cmp_guess_model_value(int n_model_updates); |
48 | | |
49 | | #endif /* CMP_GUESS_H */ |