Motorola DSP96002 User Manual
Page 611
B-92
DSP96002 USER’S MANUAL
MOTOROLA
;---------------------------------------------------------
;
; Accept loop single-clip routine
;
;---------------------------------------------------------
; Dispatch to single-plane clipping routines
_accept_clip
fsub.s d0,d2 d2.s,d1.s ; 1 1
fjslt _clip1_xp ; 2 2
fadd.s d0,d1 d1.s,d2.s ; 1 1
fjslt _clip1_xn ; 2 2
fsub.s d5,d2 d2.s,d1.s ; 1 1
fjslt _clip1_yp ; 2 2
fadd.s d5,d1 d1.s,d2.s ; 1 1
fjslt _clip1_yn ; 2 2
fsub.s d6,d2 d2.s,d1.s ; 1 1
fjslt _clip1_zp ; 2 2
ftst d6 ; 1 1
fjslt _clip1_zn ; 2 2
; Calculate reciprocal 1/W
fseedd d1,d6 ; 1 1
fmpy.s d1,d6,d1 d9.s,d4.s ; 1 1
fsub.s d1,d4 d4.s,d3.s y:(r1)+n1,d2.s ; r1+2 1 1
fmpy.s d1,d4,d1 x:(r1)+n1,d2.s y:,d7.s ;Yn Wn 1 1
fmpy d6,d4,d1 fsub.s d1,d3 d2.s,x:(r1)+ d7.s,y: ;Yo Wo 1 1
fmpy.s d1,d3,d1 x:(r4)+,d4.s y:,d3.s ;Xs Xf 1 1
; Multiply coordinates by 1/W, scale and add offset
fmpy.s d0,d4,d2 x:(r1)+n1,d0.s y:,d7.s ;Xn Zn 1 1