aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-07-17 22:59:53 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-07-17 22:59:53 +0000
commit4a51e06bfcadedd8f3cc3686bd2e5dead1906a32 (patch)
treefc8e577c173b1ae43056df1c168bd851c227160f /libavcodec/ra288.c
parent02a1eb932993bec634434390a1ffdffb712ce99a (diff)
downloadffmpeg-4a51e06bfcadedd8f3cc3686bd2e5dead1906a32.tar.gz
Simplify
Originally committed as revision 14268 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r--libavcodec/ra288.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 7ab2432bb3..ad65793ed0 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -108,14 +108,16 @@ static int pred(float *in, float *tgt, int n)
if ((f0 = *in) <= 0)
return 0;
+ in--; // To avoid a -1 subtraction in the inner loop
+
for (x=1; x <= n; x++) {
float *p1 = in + x;
float *p2 = tgt;
- f1 = *(p1--);
+ f1 = in[x+1];
for (y=0; y < x - 1; y++)
- f1 += (*(p1--))*(*(p2++));
+ f1 += in[x-y]*tgt[y];
p1 = tgt + x - 1;
p2 = tgt;