Mercurial > libavcodec.hg
comparison ra288.c @ 7415:649496faa1d2 libavcodec
Move colmult() function to the beginning of file to group DSP-related functions.
author | vitor |
---|---|
date | Sat, 26 Jul 2008 14:35:50 +0000 |
parents | 5d1378447a07 |
children | a65363f8ab4b |
comparison
equal
deleted
inserted
replaced
7414:5d1378447a07 | 7415:649496faa1d2 |
---|---|
46 res += *v1++ * *v2++; | 46 res += *v1++ * *v2++; |
47 | 47 |
48 return res; | 48 return res; |
49 } | 49 } |
50 | 50 |
51 static void colmult(float *tgt, const float *m1, const float *m2, int n) | |
52 { | |
53 while (n--) | |
54 *(tgt++) = (*(m1++)) * (*(m2++)); | |
55 } | |
56 | |
51 /* Decode and produce output */ | 57 /* Decode and produce output */ |
52 static void decode(RA288Context *ractx, float gain, int cb_coef) | 58 static void decode(RA288Context *ractx, float gain, int cb_coef) |
53 { | 59 { |
54 int x, y; | 60 int x, y; |
55 double sumsum; | 61 double sumsum; |
86 /* output */ | 92 /* output */ |
87 for (x=0; x < 5; x++) { | 93 for (x=0; x < 5; x++) { |
88 ractx->output[ractx->phase*5+x] = ractx->sb[4-x] = | 94 ractx->output[ractx->phase*5+x] = ractx->sb[4-x] = |
89 av_clipf(ractx->sb[4-x] + buffer[x], -4095, 4095); | 95 av_clipf(ractx->sb[4-x] + buffer[x], -4095, 4095); |
90 } | 96 } |
91 } | |
92 | |
93 static void colmult(float *tgt, const float *m1, const float *m2, int n) | |
94 { | |
95 while (n--) | |
96 *(tgt++) = (*(m1++)) * (*(m2++)); | |
97 } | 97 } |
98 | 98 |
99 /** | 99 /** |
100 * Converts autocorrelation coefficients to LPC coefficients using the | 100 * Converts autocorrelation coefficients to LPC coefficients using the |
101 * Levinson-Durbin algorithm. See blocks 37 and 50 of the G.728 specification. | 101 * Levinson-Durbin algorithm. See blocks 37 and 50 of the G.728 specification. |