-
Notifications
You must be signed in to change notification settings - Fork 9
/
watermark.h
53 lines (45 loc) · 1.29 KB
/
watermark.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
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef WATERMARK_H
#define WATERMARK_H 1
#define BUFFER_LEN 1024
#define TIME_LEN 1024
#define FREQ_LEN 513
#define WMARK_LEN 500
#define PATH_SIZE 64
#define ERROR (-1)
#define PLUS_SCHEMA 0
#define MULT_SCHEMA 1
#define POWR_SCHEMA 2
#define NOISE_FACTOR 1
#define SS_EMBED 1
#define FH_EMBED 2
#define V_LEN 20
typedef struct watermark{
char *message;
int len;
int schema;
double alpha;
unsigned key_seed;
int processing_gain;
int type;
int bpf;
} watermark;
void gen_default_wmark();
int parse_config(char *config);
void string_repeat(char *ssmall, char *slarge, int len);
void free_wmark();
void print_watermark_info();
void print_sfile_info(SF_INFO sfinfo);
double c_to_d(char a);
double pow_spect_dens(complex a);
void generate_noise(double *buffer, int buffer_len);
void embed_to_noise(double *noise_seq, int buffer_len);
int extract_sequence_indices(complex *freq_buff, int len, int **indices);
int get_schema(char *s);
int set_schema(int s);
int set_alpha(int a);
int get_deinterleave_i(int i, int size, int channels);
int get_interleave_i(int i, int size, int channels);
void interleave_d_array(double *buff, int size, int channels, int fwd);
void deinterleave_channels(double *time_buff, int channels);
void interleave_channels(double *time_buff, int channels);
#endif