Add phase/magnitude objective output types
[xiph/unicode.git] / w3d / wavelet.h
blob4d6fdde582756966caa5b8d451c0311d383a3b93
1 #ifndef __WAVELET_H
2 #define __WAVELET_H
4 #include "w3dtypes.h"
7 typedef struct {
8 TYPE *data;
9 uint32_t width;
10 uint32_t height;
11 uint32_t frames;
12 uint32_t scales;
13 uint32_t *w;
14 uint32_t *h;
15 uint32_t *f;
16 uint32_t (*offset)[8];
17 TYPE *scratchbuf;
18 } Wavelet3DBuf;
21 extern Wavelet3DBuf* wavelet_3d_buf_new (uint32_t width, uint32_t height,
22 uint32_t frames);
24 extern void wavelet_3d_buf_destroy (Wavelet3DBuf* buf);
26 /**
27 * transform buf->data
28 * a_moments is the number of vanishing moments of the analyzing
29 * highpass filter,
30 * s_moments the one of the synthesizing lowpass filter.
32 extern void wavelet_3d_buf_fwd_xform (Wavelet3DBuf* buf,
33 int a_moments, int s_moments);
34 extern void wavelet_3d_buf_inv_xform (Wavelet3DBuf* buf,
35 int a_moments, int s_moments);
37 extern int wavelet_3d_buf_encode_coeff (const Wavelet3DBuf* buf,
38 uint8_t *bitstream,
39 uint32_t limit);
41 extern void wavelet_3d_buf_decode_coeff (Wavelet3DBuf* buf,
42 uint8_t *bitstream,
43 uint32_t limit);
45 #if defined(DBG_XFORM)
46 extern void wavelet_3d_buf_dump (char *fmt,
47 uint32_t first_frame_in_buf,
48 uint32_t id,
49 Wavelet3DBuf* buf,
50 int16_t offset);
51 #else
52 #define wavelet_3d_buf_dump(fmt,f,id,buf,offset)
53 #endif
55 #endif