-
Notifications
You must be signed in to change notification settings - Fork 0
/
Frame.hpp
42 lines (30 loc) · 1.12 KB
/
Frame.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
#ifndef FRAME_HPP
#define FRAME_HPP
#include "BitStream.hpp"
#include "ImageBase.hpp"
#include "Block.hpp"
namespace dc {
/**
* @brief Filler data for decoded UV components.
*/
static constexpr uint8_t VIDEO_UV_FILL = 0x80;
class Frame : protected ImageProcessor {
private:
const bool is_i_frame;
Frame * const reference_frame;
void processFindMotionOffset(MacroBlock * const b) const;
public:
Frame(uint8_t * const raw, Frame * const reference_frame,
const uint16_t& width, const uint16_t& height,
const bool &use_rle, MatrixReader<> &quant_m, bool i_frame);
~Frame(void);
inline bool isIFrame(void) const { return this->is_i_frame; }
size_t streamSize(void) const;
void streamEncoded(util::BitStreamWriter& writer) const;
void loadFromStream(util::BitStreamReader& reader, bool);
dc::MacroBlock* getBlockAtCoord(int16_t, int16_t) const;
bool process(void);
static uint8_t MVEC_BIT_SIZE;
};
}
#endif // FRAME_HPP