summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-10-19 22:57:19 +0000
committerJens Arnold <amiconn@rockbox.org>2007-10-19 22:57:19 +0000
commit87f5359d604a3d51526965a97c74896f392ed444 (patch)
treeb24323088f7b2b7e470d5b61feca19794f7b22a8 /apps/codecs/demac/libdemac
parent152f405cce90a285b9c4f1bcaba27dbccc51fdf2 (diff)
Shuffle some instructions around for that extra percent of performance. Fix a bunch of comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15216 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac')
-rw-r--r--apps/codecs/demac/libdemac/predictor-cf.S243
1 files changed, 123 insertions, 120 deletions
diff --git a/apps/codecs/demac/libdemac/predictor-cf.S b/apps/codecs/demac/libdemac/predictor-cf.S
index 19873420c3..3b9489e791 100644
--- a/apps/codecs/demac/libdemac/predictor-cf.S
+++ b/apps/codecs/demac/libdemac/predictor-cf.S
@@ -97,6 +97,8 @@ predictor_decode_stereo:
sub.l %d3, %d2
neg.l %d2 | %d2 = %d3 - %d2
+ move.l %d2, (YDELAYA-4,%a5) | p->buf[YDELAYA-1] = %d2
+
movem.l (YcoeffsA,%a6), %a0-%a3 | %a0 = p->YcoeffsA[0]
| %a1 = p->YcoeffsA[1]
| %a2 = p->YcoeffsA[2]
@@ -107,10 +109,7 @@ predictor_decode_stereo:
mac.l %d1, %a2, %acc0 | %acc0 += p->buf[YDELAYA-2] * p->YcoeffsA[2]
mac.l %d0, %a3, %acc0 | %acc0 += p->buf[YDELAYA-3] * p->YcoeffsA[3]
- move.l %d2, (YDELAYA-4,%a5) | p->buf[YDELAYA-1] = %d2
move.l %d3, (YDELAYA,%a5) | p->buf[YDELAYA] = %d3
-
- movclr.l %acc0, %d0
tst.l %d2
beq.s 1f
@@ -118,16 +117,18 @@ predictor_decode_stereo:
extb.l %d2 | pos: 0xffffffff, neg: 0x00000000
or.l #1, %d2 | pos: 0xffffffff, neg: 0x00000001
1: | %d2 = SIGN(%d2)
+ move.l %d2, (YADAPTCOEFFSA-4,%a5) | p->buf[YADAPTCOEFFSA-1] = %d2
+
tst.l %d3
beq.s 1f
spl.b %d3
extb.l %d3
or.l #1, %d3
1: | %d3 = SIGN(%d3)
-
- move.l %d2, (YADAPTCOEFFSA-4,%a5) | p->buf[YADAPTCOEFFSA-1] = %d2
move.l %d3, (YADAPTCOEFFSA,%a5) | p->buf[YADAPTCOEFFSA] = %d3
-
+
+ movclr.l %acc0, %d0
+
| NOTE: %d0 now contains predictionA - don't overwrite.
| Predictor Y, Filter B
@@ -149,11 +150,13 @@ predictor_decode_stereo:
sub.l %d3, %d7
neg.l %d7 | %d7 = %d3 - %d7
- movem.l (YcoeffsB,%a6), %d2/%a0-%a3 | %d2 = p->YcoeffsB[0]
- | %a0 = p->YcoeffsB[1]
- | %a1 = p->YcoeffsB[2]
- | %a2 = p->YcoeffsB[3]
- | %a3 = p->YcoeffsB[4]
+ move.l %d7, (YDELAYB-4,%a5) | p->buf[YDELAYB-1] = %d7
+
+ movem.l (YcoeffsB,%a6), %d2/%a0-%a3 | %d2 = p->YcoeffsB[0]
+ | %a0 = p->YcoeffsB[1]
+ | %a1 = p->YcoeffsB[2]
+ | %a2 = p->YcoeffsB[3]
+ | %a3 = p->YcoeffsB[4]
mac.l %d3, %d2, %acc0 | %acc0 = p->buf[YDELAYB] * p->YcoeffsB[0]
mac.l %d7, %a0, %acc0 | %acc0 += p->buf[YDELAYB-1] * p->YcoeffsB[1]
@@ -161,26 +164,24 @@ predictor_decode_stereo:
mac.l %d5, %a2, %acc0 | %acc0 += p->buf[YDELAYB-3] * p->YcoeffsB[3]
mac.l %d4, %a3, %acc0 | %acc0 += p->buf[YDELAYB-4] * p->YcoeffsB[4]
- move.l %d7, (YDELAYB-4,%a5) | p->buf[YDELAYB-1] = %d7
move.l %d3, (YDELAYB, %a5) | p->buf[YDELAYB] = %d3
- movclr.l %acc0, %d1
-
tst.l %d7
beq.s 1f
spl.b %d7
extb.l %d7
or.l #1, %d7
1: | %d7 = SIGN(%d7)
+ move.l %d7, (YADAPTCOEFFSB-4,%a5) | p->buf[YADAPTCOEFFSB-1] = %d7
tst.l %d3
beq.s 1f
spl.b %d3
extb.l %d3
or.l #1, %d3
1: | %d3 = SIGN(%d3)
-
- move.l %d7, (YADAPTCOEFFSB-4,%a5) | p->buf[YADAPTCOEFFSB-1] = %d7
move.l %d3, (YADAPTCOEFFSB, %a5) | p->buf[YADAPTCOEFFSB] = %d3
+
+ movclr.l %acc0, %d1
| %d0 still contains predictionA
| %d1 contains predictionB
@@ -215,70 +216,70 @@ predictor_decode_stereo:
move.l %d1, (%a4)+ | *(decoded0++) = %d1 (p->YfilterA)
move.l %a4, (%sp) | save decoded0
tst.l %d5
- beq.s 2f
+ beq.s 3f
- movem.l (YADAPTCOEFFSB-16,%a5), %d4-%d6 | d4 = p->buf[YADAPTCOEFFSB-4]
- | d5 = p->buf[YADAPTCOEFFSB-3]
- | d6 = p->buf[YADAPTCOEFFSB-2]
+ movem.l (YADAPTCOEFFSB-16,%a5), %d4-%d6 | %d4 = p->buf[YADAPTCOEFFSB-4]
+ | %d5 = p->buf[YADAPTCOEFFSB-3]
+ | %d6 = p->buf[YADAPTCOEFFSB-2]
bmi.s 1f | flags still valid here
| *decoded0 > 0
- sub.l %d3, %d2 | d2 = p->YcoeffsB[0] - p->buf[YADAPTCOEFFSB]
- sub.l %d7, %a0 | a0 = p->YcoeffsB[1] - p->buf[YADAPTCOEFFSB-1]
- sub.l %d6, %a1 | a1 = p->YcoeffsB[2] - p->buf[YADAPTCOEFFSB-2]
- sub.l %d5, %a2 | a2 = p->YcoeffsB[3] - p->buf[YADAPTCOEFFSB-3]
- sub.l %d4, %a3 | a3 = p->YcoeffsB[4] - p->buf[YADAPTCOEFFSB-4]
+ sub.l %d3, %d2 | %d2 = p->YcoeffsB[0] - p->buf[YADAPTCOEFFSB]
+ sub.l %d7, %a0 | %a0 = p->YcoeffsB[1] - p->buf[YADAPTCOEFFSB-1]
+ sub.l %d6, %a1 | %a1 = p->YcoeffsB[2] - p->buf[YADAPTCOEFFSB-2]
+ sub.l %d5, %a2 | %a2 = p->YcoeffsB[3] - p->buf[YADAPTCOEFFSB-3]
+ sub.l %d4, %a3 | %a3 = p->YcoeffsB[4] - p->buf[YADAPTCOEFFSB-4]
movem.l %d2/%a0-%a3, (YcoeffsB,%a6) | Save p->YcoeffsB[]
- movem.l (YcoeffsA,%a6), %d4-%d7 | d4 = p->YcoeffsA[0]
- | d5 = p->YcoeffsA[1]
- | d6 = p->YcoeffsA[2]
- | d7 = p->YcoeffsA[3]
+ movem.l (YcoeffsA,%a6), %d4-%d7 | %d4 = p->YcoeffsA[0]
+ | %d5 = p->YcoeffsA[1]
+ | %d6 = p->YcoeffsA[2]
+ | %d7 = p->YcoeffsA[3]
- movem.l (YADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | d2 = p->buf[YADAPTCOEFFSA-3]
- | a0 = p->buf[YADAPTCOEFFSA-2]
- | a1 = p->buf[YADAPTCOEFFSA-1]
- | a2 = p->buf[YADAPTCOEFFSA]
+ movem.l (YADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | %d2 = p->buf[YADAPTCOEFFSA-3]
+ | %a0 = p->buf[YADAPTCOEFFSA-2]
+ | %a1 = p->buf[YADAPTCOEFFSA-1]
+ | %a2 = p->buf[YADAPTCOEFFSA]
- sub.l %a2, %d4 | d4 = p->YcoeffsA[0] - p->buf[YADAPTCOEFFSA]
- sub.l %a1, %d5 | d5 = p->YcoeffsA[1] - p->buf[YADAPTCOEFFSA-1]
- sub.l %a0, %d6 | d6 = p->YcoeffsA[2] - p->buf[YADAPTCOEFFSA-2]
- sub.l %d2, %d7 | d7 = p->YcoeffsA[3] - p->buf[YADAPTCOEFFSA-3]
+ sub.l %a2, %d4 | %d4 = p->YcoeffsA[0] - p->buf[YADAPTCOEFFSA]
+ sub.l %a1, %d5 | %d5 = p->YcoeffsA[1] - p->buf[YADAPTCOEFFSA-1]
+ sub.l %a0, %d6 | %d6 = p->YcoeffsA[2] - p->buf[YADAPTCOEFFSA-2]
+ sub.l %d2, %d7 | %d7 = p->YcoeffsA[3] - p->buf[YADAPTCOEFFSA-3]
- movem.l %d4-%d7, (YcoeffsA,%a6) | Save p->YcoeffsA[]
bra.s 2f
1: | *decoded0 < 0
- add.l %d3, %d2 | d2 = p->YcoeffsB[0] + p->buf[YADAPTCOEFFSB]
- add.l %d7, %a0 | a0 = p->YcoeffsB[1] + p->buf[YADAPTCOEFFSB-1]
- add.l %d6, %a1 | a1 = p->YcoeffsB[2] + p->buf[YADAPTCOEFFSB-2]
- add.l %d5, %a2 | a2 = p->YcoeffsB[3] + p->buf[YADAPTCOEFFSB-3]
- add.l %d4, %a3 | a3 = p->YcoeffsB[4] + p->buf[YADAPTCOEFFSB-4]
+ add.l %d3, %d2 | %d2 = p->YcoeffsB[0] + p->buf[YADAPTCOEFFSB]
+ add.l %d7, %a0 | %a0 = p->YcoeffsB[1] + p->buf[YADAPTCOEFFSB-1]
+ add.l %d6, %a1 | %a1 = p->YcoeffsB[2] + p->buf[YADAPTCOEFFSB-2]
+ add.l %d5, %a2 | %a2 = p->YcoeffsB[3] + p->buf[YADAPTCOEFFSB-3]
+ add.l %d4, %a3 | %a3 = p->YcoeffsB[4] + p->buf[YADAPTCOEFFSB-4]
movem.l %d2/%a0-%a3, (YcoeffsB,%a6) | Save p->YcoeffsB[]
- movem.l (YcoeffsA,%a6), %d4-%d7 | d4 = p->YcoeffsA[0]
- | d5 = p->YcoeffsA[1]
- | d6 = p->YcoeffsA[2]
- | d7 = p->YcoeffsA[3]
+ movem.l (YcoeffsA,%a6), %d4-%d7 | %d4 = p->YcoeffsA[0]
+ | %d5 = p->YcoeffsA[1]
+ | %d6 = p->YcoeffsA[2]
+ | %d7 = p->YcoeffsA[3]
- movem.l (YADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | d2 = p->buf[YADAPTCOEFFSA-3]
- | a0 = p->buf[YADAPTCOEFFSA-2]
- | a1 = p->buf[YADAPTCOEFFSA-1]
- | a2 = p->buf[YADAPTCOEFFSA]
+ movem.l (YADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | %d2 = p->buf[YADAPTCOEFFSA-3]
+ | %a0 = p->buf[YADAPTCOEFFSA-2]
+ | %a1 = p->buf[YADAPTCOEFFSA-1]
+ | %a2 = p->buf[YADAPTCOEFFSA]
- add.l %a2, %d4 | d4 = p->YcoeffsA[0] + p->buf[YADAPTCOEFFSA]
- add.l %a1, %d5 | d5 = p->YcoeffsA[1] + p->buf[YADAPTCOEFFSA-1]
- add.l %a0, %d6 | d6 = p->YcoeffsA[2] + p->buf[YADAPTCOEFFSA-2]
- add.l %d2, %d7 | d7 = p->YcoeffsA[3] + p->buf[YADAPTCOEFFSA-3]
-
- movem.l %d4-%d7, (YcoeffsA,%a6) | Save p->YcoeffsA[]
+ add.l %a2, %d4 | %d4 = p->YcoeffsA[0] + p->buf[YADAPTCOEFFSA]
+ add.l %a1, %d5 | %d5 = p->YcoeffsA[1] + p->buf[YADAPTCOEFFSA-1]
+ add.l %a0, %d6 | %d6 = p->YcoeffsA[2] + p->buf[YADAPTCOEFFSA-2]
+ add.l %d2, %d7 | %d7 = p->YcoeffsA[3] + p->buf[YADAPTCOEFFSA-3]
2:
+ movem.l %d4-%d7, (YcoeffsA,%a6) | Save p->YcoeffsA[]
+
+3:
| ***** PREDICTOR X *****
@@ -293,6 +294,8 @@ predictor_decode_stereo:
sub.l %d3, %d2
neg.l %d2 | %d2 = %d3 -%d2
+ move.l %d2, (XDELAYA-4,%a5) | p->buf[XDELAYA-1] = %d2
+
movem.l (XcoeffsA,%a6), %a0-%a3 | %a0 = p->XcoeffsA[0]
| %a1 = p->XcoeffsA[1]
| %a2 = p->XcoeffsA[2]
@@ -303,27 +306,26 @@ predictor_decode_stereo:
mac.l %d1, %a2, %acc0 | %acc0 += p->buf[XDELAYA-2] * p->XcoeffsA[2]
mac.l %d0, %a3, %acc0 | %acc0 += p->buf[XDELAYA-3] * p->XcoeffsA[3]
- move.l %d2, (XDELAYA-4,%a5) | p->buf[XDELAYA-1] = %d2
move.l %d3, (XDELAYA,%a5) | p->buf[XDELAYA] = %d3
- movclr.l %acc0, %d0
-
tst.l %d2
beq.s 1f
spl.b %d2 | pos: 0x??????ff, neg: 0x??????00
extb.l %d2 | pos: 0xffffffff, neg: 0x00000000
or.l #1, %d2 | pos: 0xffffffff, neg: 0x00000001
1: | %d2 = SIGN(%d2)
+ move.l %d2, (XADAPTCOEFFSA-4,%a5) | p->buf[XADAPTCOEFFSA-1] = %d2
+
tst.l %d3
beq.s 1f
spl.b %d3
extb.l %d3
or.l #1, %d3
1: | %d3 = SIGN(%d3)
+ move.l %d3, (XADAPTCOEFFSA,%a5) | p->buf[XADAPTCOEFFSA] = %d3
+
+ movclr.l %acc0, %d0
- move.l %d2, (XADAPTCOEFFSA-4,%a5) | p->buf[XADAPTCOEFFSA-1] = r2
- move.l %d3, (XADAPTCOEFFSA,%a5) | p->buf[XADAPTCOEFFSA] = r3
-
| NOTE: %d0 now contains predictionA - don't overwrite.
| Predictor X, Filter B
@@ -345,11 +347,13 @@ predictor_decode_stereo:
sub.l %d3, %d7
neg.l %d7 | %d7 = %d3 - %d7
- movem.l (XcoeffsB,%a6), %d2/%a0-%a3 | %d2 = p->XcoeffsB[0]
- | %a0 = p->XcoeffsB[1]
- | %a1 = p->XcoeffsB[2]
- | %a2 = p->XcoeffsB[3]
- | %a3 = p->XcoeffsB[4]
+ move.l %d7, (XDELAYB-4,%a5) | p->buf[XDELAYB-1] = %d7
+
+ movem.l (XcoeffsB,%a6), %d2/%a0-%a3 | %d2 = p->XcoeffsB[0]
+ | %a0 = p->XcoeffsB[1]
+ | %a1 = p->XcoeffsB[2]
+ | %a2 = p->XcoeffsB[3]
+ | %a3 = p->XcoeffsB[4]
mac.l %d3, %d2, %acc0 | %acc0 = p->buf[XDELAYB] * p->XcoeffsB[0]
mac.l %d7, %a0, %acc0 | %acc0 += p->buf[XDELAYB-1] * p->XcoeffsB[1]
@@ -357,27 +361,26 @@ predictor_decode_stereo:
mac.l %d5, %a2, %acc0 | %acc0 += p->buf[XDELAYB-3] * p->XcoeffsB[3]
mac.l %d4, %a3, %acc0 | %acc0 += p->buf[XDELAYB-4] * p->XcoeffsB[4]
- move.l %d7, (XDELAYB-4,%a5) | p->buf[XDELAYB-1] = %d7
move.l %d3, (XDELAYB, %a5) | p->buf[XDELAYB] = %d3
- movclr.l %acc0, %d1
-
tst.l %d7
beq.s 1f
spl.b %d7
extb.l %d7
or.l #1, %d7
1: | %d7 = SIGN(%d7)
+ move.l %d7, (XADAPTCOEFFSB-4,%a5) | p->buf[XADAPTCOEFFSB-1] = %d7
+
tst.l %d3
beq.s 1f
spl.b %d3
extb.l %d3
or.l #1, %d3
1: | %d3 = SIGN(%d3)
-
- move.l %d7, (XADAPTCOEFFSB-4,%a5) | p->buf[XADAPTCOEFFSB-1] = %d7
move.l %d3, (XADAPTCOEFFSB, %a5) | p->buf[XADAPTCOEFFSB] = %d3
-
+
+ movclr.l %acc0, %d1
+
| %d0 still contains predictionA
| %d1 contains predictionB
@@ -405,76 +408,76 @@ predictor_decode_stereo:
| %a4 contains decoded1
| %d5 contains *decoded1
- | %d2, %a0, %a1, %a2, %a31 contain p->XcoeffsB[0..4]
+ | %d2, %a0, %a1, %a2, %a3 contain p->XcoeffsB[0..4]
| %d7, %d3 contain p->buf[XADAPTCOEFFSB-1] and p->buf[XADAPTCOEFFSB]
move.l %d1, (%a4)+ | *(decoded1++) = %d1 (p->XfilterA)
move.l %a4, (4,%sp) | save decoded1
tst.l %d5
- beq.s 2f
+ beq.s 3f
- movem.l (XADAPTCOEFFSB-16,%a5), %d4-%d6 | d4 = p->buf[XADAPTCOEFFSB-4]
- | d5 = p->buf[XADAPTCOEFFSB-3]
- | d6 = p->buf[XADAPTCOEFFSB-2]
+ movem.l (XADAPTCOEFFSB-16,%a5), %d4-%d6 | %d4 = p->buf[XADAPTCOEFFSB-4]
+ | %d5 = p->buf[XADAPTCOEFFSB-3]
+ | %d6 = p->buf[XADAPTCOEFFSB-2]
bmi.s 1f | flags still valid here
| *decoded1 > 0
- sub.l %d3, %d2 | d2 = p->XcoeffsB[0] - p->buf[XADAPTCOEFFSB]
- sub.l %d7, %a0 | a0 = p->XcoeffsB[1] - p->buf[XADAPTCOEFFSB-1]
- sub.l %d6, %a1 | a1 = p->XcoeffsB[2] - p->buf[XADAPTCOEFFSB-2]
- sub.l %d5, %a2 | a2 = p->XcoeffsB[3] - p->buf[XADAPTCOEFFSB-3]
- sub.l %d4, %a3 | a3 = p->XcoeffsB[4] - p->buf[XADAPTCOEFFSB-4]
+ sub.l %d3, %d2 | %d2 = p->XcoeffsB[0] - p->buf[XADAPTCOEFFSB]
+ sub.l %d7, %a0 | %a0 = p->XcoeffsB[1] - p->buf[XADAPTCOEFFSB-1]
+ sub.l %d6, %a1 | %a1 = p->XcoeffsB[2] - p->buf[XADAPTCOEFFSB-2]
+ sub.l %d5, %a2 | %a2 = p->XcoeffsB[3] - p->buf[XADAPTCOEFFSB-3]
+ sub.l %d4, %a3 | %a3 = p->XcoeffsB[4] - p->buf[XADAPTCOEFFSB-4]
movem.l %d2/%a0-%a3, (XcoeffsB,%a6) | Save p->XcoeffsB[]
- movem.l (XcoeffsA,%a6), %d4-%d7 | d4 = p->XcoeffsA[0]
- | d5 = p->XcoeffsA[1]
- | d6 = p->XcoeffsA[2]
- | d7 = p->XcoeffsA[3]
+ movem.l (XcoeffsA,%a6), %d4-%d7 | %d4 = p->XcoeffsA[0]
+ | %d5 = p->XcoeffsA[1]
+ | %d6 = p->XcoeffsA[2]
+ | %d7 = p->XcoeffsA[3]
- movem.l (XADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | d2 = p->buf[XADAPTCOEFFSA-3]
- | a0 = p->buf[XADAPTCOEFFSA-2]
- | a1 = p->buf[XADAPTCOEFFSA-1]
- | a2 = p->buf[XADAPTCOEFFSA]
+ movem.l (XADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | %d2 = p->buf[XADAPTCOEFFSA-3]
+ | %a0 = p->buf[XADAPTCOEFFSA-2]
+ | %a1 = p->buf[XADAPTCOEFFSA-1]
+ | %a2 = p->buf[XADAPTCOEFFSA]
- sub.l %a2, %d4 | d4 = p->XcoeffsA[0] - p->buf[XADAPTCOEFFSA]
- sub.l %a1, %d5 | d5 = p->XcoeffsA[1] - p->buf[XADAPTCOEFFSA-1]
- sub.l %a0, %d6 | d6 = p->XcoeffsA[2] - p->buf[XADAPTCOEFFSA-2]
- sub.l %d2, %d7 | d7 = p->XcoeffsA[3] - p->buf[XADAPTCOEFFSA-3]
+ sub.l %a2, %d4 | %d4 = p->XcoeffsA[0] - p->buf[XADAPTCOEFFSA]
+ sub.l %a1, %d5 | %d5 = p->XcoeffsA[1] - p->buf[XADAPTCOEFFSA-1]
+ sub.l %a0, %d6 | %d6 = p->XcoeffsA[2] - p->buf[XADAPTCOEFFSA-2]
+ sub.l %d2, %d7 | %d7 = p->XcoeffsA[3] - p->buf[XADAPTCOEFFSA-3]
- movem.l %d4-%d7, (XcoeffsA,%a6) | Save p->XcoeffsA[]
bra.s 2f
1: | *decoded1 < 0
- add.l %d3, %d2 | d2 = p->XcoeffsB[0] + p->buf[XADAPTCOEFFSB]
- add.l %d7, %a0 | a0 = p->XcoeffsB[1] + p->buf[XADAPTCOEFFSB-1]
- add.l %d6, %a1 | a1 = p->XcoeffsB[2] + p->buf[XADAPTCOEFFSB-2]
- add.l %d5, %a2 | a2 = p->XcoeffsB[3] + p->buf[XADAPTCOEFFSB-3]
- add.l %d4, %a3 | a3 = p->XcoeffsB[4] + p->buf[XADAPTCOEFFSB-4]
+ add.l %d3, %d2 | %d2 = p->XcoeffsB[0] + p->buf[XADAPTCOEFFSB]
+ add.l %d7, %a0 | %a0 = p->XcoeffsB[1] + p->buf[XADAPTCOEFFSB-1]
+ add.l %d6, %a1 | %a1 = p->XcoeffsB[2] + p->buf[XADAPTCOEFFSB-2]
+ add.l %d5, %a2 | %a2 = p->XcoeffsB[3] + p->buf[XADAPTCOEFFSB-3]
+ add.l %d4, %a3 | %a3 = p->XcoeffsB[4] + p->buf[XADAPTCOEFFSB-4]
movem.l %d2/%a0-%a3, (XcoeffsB,%a6) | Save p->XcoeffsB[]
- movem.l (XcoeffsA,%a6), %d4-%d7 | d4 = p->XcoeffsA[0]
- | d5 = p->XcoeffsA[1]
- | d6 = p->XcoeffsA[2]
- | d7 = p->XcoeffsA[3]
+ movem.l (XcoeffsA,%a6), %d4-%d7 | %d4 = p->XcoeffsA[0]
+ | %d5 = p->XcoeffsA[1]
+ | %d6 = p->XcoeffsA[2]
+ | %d7 = p->XcoeffsA[3]
- movem.l (XADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | d2 = p->buf[XADAPTCOEFFSA-3]
- | a0 = p->buf[XADAPTCOEFFSA-2]
- | a1 = p->buf[XADAPTCOEFFSA-1]
- | a2 = p->buf[XADAPTCOEFFSA]
+ movem.l (XADAPTCOEFFSA-12,%a5), %d2/%a0-%a2 | %d2 = p->buf[XADAPTCOEFFSA-3]
+ | %a0 = p->buf[XADAPTCOEFFSA-2]
+ | %a1 = p->buf[XADAPTCOEFFSA-1]
+ | %a2 = p->buf[XADAPTCOEFFSA]
- add.l %a2, %d4 | d4 = p->XcoeffsA[0] + p->buf[XADAPTCOEFFSA]
- add.l %a1, %d5 | d5 = p->XcoeffsA[1] + p->buf[XADAPTCOEFFSA-1]
- add.l %a0, %d6 | d6 = p->XcoeffsA[2] + p->buf[XADAPTCOEFFSA-2]
- add.l %d2, %d7 | d7 = p->XcoeffsA[3] + p->buf[XADAPTCOEFFSA-3]
-
- movem.l %d4-%d7, (XcoeffsA,%a6) | Save p->XcoeffsA[]
+ add.l %a2, %d4 | %d4 = p->XcoeffsA[0] + p->buf[XADAPTCOEFFSA]
+ add.l %a1, %d5 | %d5 = p->XcoeffsA[1] + p->buf[XADAPTCOEFFSA-1]
+ add.l %a0, %d6 | %d6 = p->XcoeffsA[2] + p->buf[XADAPTCOEFFSA-2]
+ add.l %d2, %d7 | %d7 = p->XcoeffsA[3] + p->buf[XADAPTCOEFFSA-3]
2:
+ movem.l %d4-%d7, (XcoeffsA,%a6) | Save p->XcoeffsA[]
+
+3:
| ***** COMMON *****
@@ -484,10 +487,10 @@ predictor_decode_stereo:
cmp.l %a3, %a5
bne.s .endofloop
-
+
| The history buffer is full, we need to do a memmove:
-
- lea.l (historybuffer,%a6), %a3
+
+ lea.l (historybuffer,%a6), %a3
| dest = %a3 (p->historybuffer)
| src = %a5 (p->buf)
@@ -515,7 +518,7 @@ predictor_decode_stereo:
lea.l (40,%a3), %a3
lea.l (historybuffer,%a6), %a5 | p->buf = &p->historybuffer[0]
-
+
.endofloop:
subq.l #1, (8,%sp) | decrease loop count
bne.w .loop