AN2094 Freescale Semiconductor / Motorola, AN2094 Datasheet - Page 43

no-image

AN2094

Manufacturer Part Number
AN2094
Description
ITU-T G.729 Implementation on StarCore SC140
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor
;* **************************************************************************************** *;
;* Determine maximal correlation using two values—one for even and one for odd.
;* Four correlations are computed in parallel using multisample technique.
;* **************************************************************************************** *;
loopend2
;* final comparison
;* **************************************************************************************** *;
;* Determine maximal correlation between the two suboptimal values.
;* Index of maximal correlation is also stored.
;* **************************************************************************************** *;
;****************************************************************************************** *;
;* Compute energy for index of maximal correlation.
;* Data is not aligned; therefore only 2 parallel macs can be done.
;****************************************************************************************** *;
[
]
[
]
loopend3
cmpgt d0,d7
[
]
[
]
]
[
]
cmpgt d0,d1
[
]
[
]
move.l d6,r2
clr d0
adda r0,r2
move.f (r2)+n3,d5
loopstart3
[
move.f (r2)+,d10
move.f (r3)+,d3
mac d3,d11,d4
mac d3,d8,d5
mac d3,d9,d6
mac d3,d10,d7
move.f (r2)+,d11
move.f (r3)+,d3
ift
ifa
ift
ifa
ift
ifa
ift
ift
ifa
ift
ifa
mac d5,d5,d0
cmpgt d1,d4
sub #2,d2
tfr d7,d0
add d12,d2,d15
cmpgt d1,d6
sub #2,d2
tfr d6,d1
add d12,d2,d14
cmpgt d0,d5
sub #2,d2
tfr d5,d0
add d12,d2,d15
tfr d4,d1
add d12,d2,d14
tfr d1,d0
tfr d14,d6
cmpeq d0,d1
tfr d14,d2
max d2,d6
tfr d0,d7
ITU-T G.729 Implementation on the StarCore™ SC140/SC1400 Cores, Rev. 1
clr d2
move.l #2,r3
adda r0,r3
adda #-176,r2,r2
adda r2,r3
move.f (r3)+n3,d4
tfr d15,d6
doensh3 #40
; max in d7
*;
*;
*;
*;
*;
*;
p_max in d6
References
43

Related parts for AN2094