[svn] / trunk / xvidcore / src / bitstream / ppc_asm / cbp_ppc.s Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/bitstream/ppc_asm/cbp_ppc.s

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 74, Thu Mar 28 12:26:44 2002 UTC revision 75, Thu Mar 28 12:29:58 2002 UTC
# Line 15  Line 15 
15  #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  #  #
17  #  #
18  #    $Id: cbp_ppc.s,v 1.8 2002-03-27 15:06:14 canard Exp $  #    $Id: cbp_ppc.s,v 1.9 2002-03-28 12:29:58 canard Exp $
19  #    $Source: /home/xvid/cvs_copy/cvs-server-root/xvid/xvidcore/src/bitstream/ppc_asm/cbp_ppc.s,v $  #    $Source: /home/xvid/cvs_copy/cvs-server-root/xvid/xvidcore/src/bitstream/ppc_asm/cbp_ppc.s,v $
20  #    $Date: 2002-03-27 15:06:14 $  #    $Date: 2002-03-28 12:29:58 $
21  #    $Author: canard $  #    $Author: canard $
22  #  #
23  #    This is my first PPC ASM attempt. So I might do nasty things.  #    This is my first PPC ASM attempt. So I might do nasty things.
# Line 59  Line 59 
59  .global calc_cbp_ppc  .global calc_cbp_ppc
60  calc_cbp_ppc:  calc_cbp_ppc:
61          # r9 will contain coeffs addr          # r9 will contain coeffs addr
62          mr 9,3          mr %r9,%r3
63          # r8 is the loop counter (rows)          # r8 is the loop counter (rows)
64          li 8,5          li %r8,5
65          # r3 contains the result, therefore we set it to 0          # r3 contains the result, therefore we set it to 0
66          li 3,0          li %r3,0
67  .loop:  .loop:
68          # CTR is the loop2 counter          # CTR is the loop2 counter
69          li 4,16          li %r4,16
70          mtctr 4          mtctr %r4
71          # r6 is coeff pointer for this line          # r6 is coeff pointer for this line
72          mr 6,9          mr %r6,%r9
73          lis 7,.skip@ha          lis %r7,.skip@ha
74          addi 7,7,.skip@l          addi %r7,%r7,.skip@l
75          lwz 7,0(7)          lwz %r7,0(%r7)
76  .loop2:  .loop2:
77          # coeffs is a matrix of 16 bits cells          # coeffs is a matrix of 16 bits cells
78          lwz 4,0(6)          lwz %r4,0(%r6)
79          and 4,4,7          and %r4,%r4,%r7
80          li 7,-1          li %r7,-1
81    
82          lwz 5,4(6)          lwz %r5,4(%r6)
83          # or. updates CR0          # or. updates CR0
84          or. 4,5,4          or. %r4,%r5,%r4
85          # testing bit 2 (is zero) of CR0          # testing bit 2 (is zero) of CR0
86          bf 2,.cbp          bf 2,.cbp
87          addi 6,6,8          addi %r6,%r6,8
88          bdnz .loop2          bdnz .loop2
89          b .newline          b .newline
90  .cbp:  .cbp:
91          li 4,1          li %r4,1
92          slw 4,4,8          slw %r4,%r4,%r8
93          or 3,3,4          or %r3,%r3,%r4
94  .newline:  .newline:
95          addi 9,9,128          addi %r9,%r9,128
96          # updates CR0, blabla          # updates CR0, blabla
97          subic. 8,8,1          subic. %r8,%r8,1
98          bf 0,.loop          bf 0,.loop
99          blr          blr

Legend:
Removed from v.74  
changed lines
  Added in v.75

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4