diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-07-24 03:28:01 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-07-24 03:28:01 +0000 |
commit | 0f72a2b7d3871ff6249c79590e2f5ae01c8191e5 (patch) | |
tree | 212957f6e3805244d54cdd8ae58fa41ef113528c /libavcodec/ra288.c | |
parent | 427981c7a6f6f89f192d0b2831558c7b8898cc2b (diff) | |
download | ffmpeg-0f72a2b7d3871ff6249c79590e2f5ae01c8191e5.tar.gz |
Give parameters of do_hybrid_window() more meaningful names
Originally committed as revision 14358 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r-- | libavcodec/ra288.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index 38e58e39d7..dbe1707e2f 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -137,8 +137,9 @@ static void prodsum(float *tgt, const float *src, int len, int n) } -static void do_hybrid_window(int n, int i, int j, const float *in, float *out, float *st1, - float *st2, const float *table) +static void do_hybrid_window(int order, int n, int non_rec, const float *in, + float *out, float *hist, float *out2, + const float *window) { unsigned int x; float buffer1[37]; @@ -146,17 +147,17 @@ static void do_hybrid_window(int n, int i, int j, const float *in, float *out, f float work[111]; /* rotate and multiply */ - memmove(st1 , st1 + i, (n + j)*sizeof(*st1)); - memcpy (st1 + n + j, in , i *sizeof(*st1)); + memmove(hist , hist + n, (order + non_rec)*sizeof(*hist)); + memcpy (hist + order + non_rec, in , n *sizeof(*hist)); - colmult(work, table, st1, n + i + j); + colmult(work, window, hist, order + n + non_rec); - prodsum(buffer1, work + n , i, n); - prodsum(buffer2, work + n + i, j, n); + prodsum(buffer1, work + order , n , order); + prodsum(buffer2, work + order + n, non_rec, order); - for (x=0; x <= n; x++) { - st2[x] = st2[x] * 0.5625 + buffer1[x]; - out[x] = st2[x] + buffer2[x]; + for (x=0; x <= order; x++) { + out2[x] = out2[x] * 0.5625 + buffer1[x]; + out [x] = out2[x] + buffer2[x]; } /* Multiply by the white noise correcting factor (WNCF) */ @@ -171,7 +172,8 @@ static void update(Real288_internal *glob) memcpy(buffer1 , glob->output + 20, 20*sizeof(*buffer1)); memcpy(buffer1 + 20, glob->output , 20*sizeof(*buffer1)); - do_hybrid_window(36, 40, 35, buffer1, temp1, glob->st1a, glob->st1b, table1); + do_hybrid_window(36, 40, 35, buffer1, temp1, glob->st1a, glob->st1b, + table1); if (pred(temp1, glob->st1, 36)) colmult(glob->pr1, glob->st1, table1a, 36); @@ -179,7 +181,8 @@ static void update(Real288_internal *glob) memcpy(buffer2 , glob->history + 4, 4*sizeof(*buffer2)); memcpy(buffer2 + 4, glob->history , 4*sizeof(*buffer2)); - do_hybrid_window(10, 8, 20, buffer2, temp2, glob->st2a, glob->st2b, table2); + do_hybrid_window(10, 8, 20, buffer2, temp2, glob->st2a, glob->st2b, + table2); if (pred(temp2, glob->st2, 10)) colmult(glob->pr2, glob->st2, table2a, 10); |