Mercurial > libavcodec.hg
comparison ra288.c @ 7916:2a4c42e6aecb libavcodec
Cosmetics: move convolve() together with the other DSP functions
author | vitor |
---|---|
date | Wed, 24 Sep 2008 20:05:22 +0000 |
parents | 2d530c3d155e |
children | 518c86ed8008 |
comparison
equal
deleted
inserted
replaced
7915:2d530c3d155e | 7916:2a4c42e6aecb |
---|---|
67 { | 67 { |
68 while (n--) | 68 while (n--) |
69 *tgt++ = *m1++ * *m2++; | 69 *tgt++ = *m1++ * *m2++; |
70 } | 70 } |
71 | 71 |
72 static void convolve(float *tgt, const float *src, int len, int n) | |
73 { | |
74 for (; n >= 0; n--) | |
75 tgt[n] = scalar_product_float(src, src - n, len); | |
76 | |
77 } | |
78 | |
72 static void decode(RA288Context *ractx, float gain, int cb_coef) | 79 static void decode(RA288Context *ractx, float gain, int cb_coef) |
73 { | 80 { |
74 int i, j; | 81 int i, j; |
75 double sumsum; | 82 double sumsum; |
76 float sum, buffer[5]; | 83 float sum, buffer[5]; |
110 } | 117 } |
111 | 118 |
112 /* output */ | 119 /* output */ |
113 for (i=0; i < 5; i++) | 120 for (i=0; i < 5; i++) |
114 block[i] = av_clipf(block[i], -4095, 4095); | 121 block[i] = av_clipf(block[i], -4095, 4095); |
115 } | |
116 | |
117 static void convolve(float *tgt, const float *src, int len, int n) | |
118 { | |
119 for (; n >= 0; n--) | |
120 tgt[n] = scalar_product_float(src, src - n, len); | |
121 | |
122 } | 122 } |
123 | 123 |
124 /** | 124 /** |
125 * Hybrid window filtering, see blocks 36 and 49 of the G.728 specification. | 125 * Hybrid window filtering, see blocks 36 and 49 of the G.728 specification. |
126 * | 126 * |