-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompress.h
40 lines (32 loc) · 1.55 KB
/
compress.h
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
#ifndef _COMPRESS_H_
#define _COMPRESS_H_
#include "param.h"
#include "operations.h"
#include "frame.h"
#include "rice.h"
#include "constants.h"
#include "bitwriter.h"
void compress_flac(pr_param ¶m);
uint32_t evaluate_verbatium_subframe(const int32_t signal[],
uint32_t blocksize,
uint32_t bps,
Subframe_header &subframe);
uint32_t evaluate_constant_subframe(const int32_t signal[],
uint32_t blocksize,
uint32_t bps,
Subframe_header &subframe);
uint32_t evaluate_fixed_subframe(const int32_t signal[],
int32_t order,
int32_t blocksize,
int32_t rice_parameter,
uint32_t bps,
Subframe_header &subframe);
uint32_t get_constant_subframe_size(uint32_t bps);
uint32_t get_verbatium_subframe_size(uint32_t blocksize, uint32_t bps);
uint32_t get_fixed_subframe_size(bitwriter &bw, uint32_t bps);
void output_main_header(const Main_header &frame, bitwriter &bw);
void output_frame_header(const Frame_header &frame, bitwriter &bw);
void output_subframe_header(const Subframe_header &sub_frame, bitwriter &bw, uint32_t blocksize, uint32_t subframe_bps);
uint32_t compute_best_predictor(const int32_t data[], uint32_t data_len, float residual_bits_per_sample[]);
void set_block_size(pr_param ¶m);
#endif