-
Notifications
You must be signed in to change notification settings - Fork 0
/
algo.hpp
66 lines (53 loc) · 1.27 KB
/
algo.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef ALGO_HPP
#define ALGO_HPP
#include <vector>
#include <cstdint>
// Use one implementation of:
//#define ALGO_USE_DCT_LEE
//#define ALGO_USE_DCT_NAIVE
#define ALGO_USE_DCT_NAIVE_PY
namespace algo {
/**
* Zigzag pattern data struct.
*/
typedef struct {
uint8_t group;
uint8_t col;
uint8_t x;
uint8_t y;
} Position_t;
/**
* Zig-zag function
*/
void createZigzagLUT(std::vector<algo::Position_t>&, const size_t);
static constexpr uint8_t MER_PATTERN_SIZE = 9u; ///< Corners and sides on diamond pattern.
/**
* Motion estimation pattern data struct.
*/
struct MER_level_t {
uint8_t depth;
int16_t x0;
int16_t y0;
MER_level_t *points;
};
/**
* Motion estimation pattern function
*/
void createMERLUT(MER_level_t&, const size_t);
void printMERLUT(algo::MER_level_t&);
void destroyMERLUT(algo::MER_level_t&);
/**
* RLE data struct
*/
typedef struct {
uint8_t zeroes;
uint8_t data_bits;
int16_t data;
} RLE_data_t;
/**
* DCT functions
*/
void transformDCT(double[], const size_t);
void transformDCTinverse(double[], const std::size_t);
}
#endif // ALGO_HPP