Mercurial > libavcodec.hg
comparison ra288.c @ 7321:2db97a3e51ed libavcodec
Simplify co(): do not abuse pointer aritmetics
author | vitor |
---|---|
date | Sat, 19 Jul 2008 15:41:15 +0000 |
parents | d0937cc65db3 |
children | 6c8c561becce |
comparison
equal
deleted
inserted
replaced
7320:927ac918cddb | 7321:2db97a3e51ed |
---|---|
149 /* rotate and multiply */ | 149 /* rotate and multiply */ |
150 fp = st1 + i; | 150 fp = st1 + i; |
151 for (x=0; x < n + i + j; x++) { | 151 for (x=0; x < n + i + j; x++) { |
152 if (x == n + j) | 152 if (x == n + j) |
153 fp=in; | 153 fp=in; |
154 work[x] = *(table++) * (*(st1++) = *(fp++)); | 154 st1[x] = *(fp++); |
155 work[x] = table[x] * st1[x]; | |
155 } | 156 } |
156 | 157 |
157 prodsum(buffer1, work + n, i, n); | 158 prodsum(buffer1, work + n, i, n); |
158 prodsum(buffer2, work + n + i, j, n); | 159 prodsum(buffer2, work + n + i, j, n); |
159 | 160 |
160 for (x=0;x<=n;x++) { | 161 for (x=0;x<=n;x++) { |
161 *st2 = *st2 * (0.5625) + buffer1[x]; | 162 st2[x] = st2[x] * 0.5625 + buffer1[x]; |
162 out[x] = *(st2++) + buffer2[x]; | 163 out[x] = st2[x] + buffer2[x]; |
163 } | 164 } |
164 *out *= 1.00390625; /* to prevent clipping */ | 165 *out *= 1.00390625; /* to prevent clipping */ |
165 } | 166 } |
166 | 167 |
167 static void update(Real288_internal *glob) | 168 static void update(Real288_internal *glob) |