Mercurial > libavcodec.hg
comparison ra288.c @ 7367:f8e1a1ef4a56 libavcodec
Add comments to do_hybrid_window()
author | vitor |
---|---|
date | Thu, 24 Jul 2008 03:28:42 +0000 |
parents | d74804a3a18b |
children | 166e5712dcd8 |
comparison
equal
deleted
inserted
replaced
7366:d74804a3a18b | 7367:f8e1a1ef4a56 |
---|---|
135 for (; n >= 0; n--) | 135 for (; n >= 0; n--) |
136 tgt[n] = scalar_product_float(src, src - n, len); | 136 tgt[n] = scalar_product_float(src, src - n, len); |
137 | 137 |
138 } | 138 } |
139 | 139 |
140 /** | |
141 * Hybrid window filtering. See blocks 36 and 49 of the G.728 specification. | |
142 * | |
143 * @param order the order of the filter | |
144 * @param n the length of the input | |
145 * @param non_rec the number of non recursive samples | |
146 * @param out the filter output | |
147 * @param in pointer to the input of the filter | |
148 * @param hist pointer to the input history of the filter. It is updated by | |
149 * this function. | |
150 * @param out pointer to the non recursive part of the output | |
151 * @param out2 pointer to the recursive part of the output | |
152 * @param window pointer to the windowing function table | |
153 */ | |
140 static void do_hybrid_window(int order, int n, int non_rec, const float *in, | 154 static void do_hybrid_window(int order, int n, int non_rec, const float *in, |
141 float *out, float *hist, float *out2, | 155 float *out, float *hist, float *out2, |
142 const float *window) | 156 const float *window) |
143 { | 157 { |
144 unsigned int x; | 158 unsigned int x; |
145 float buffer1[37]; | 159 float buffer1[37]; |
146 float buffer2[37]; | 160 float buffer2[37]; |
147 float work[111]; | 161 float work[111]; |
148 | 162 |
149 /* rotate and multiply */ | 163 /* update history */ |
150 memmove(hist , hist + n, (order + non_rec)*sizeof(*hist)); | 164 memmove(hist , hist + n, (order + non_rec)*sizeof(*hist)); |
151 memcpy (hist + order + non_rec, in , n *sizeof(*hist)); | 165 memcpy (hist + order + non_rec, in , n *sizeof(*hist)); |
152 | 166 |
153 colmult(work, window, hist, order + n + non_rec); | 167 colmult(work, window, hist, order + n + non_rec); |
154 | 168 |