Parent Directory | Revision Log
Revision 49 - (view) (download)
1 : | canard | 49 | # Copyright (C) 2002 Guillaume Morin, Alcôve |
2 : | # | ||
3 : | # This program is free software; you can redistribute it and/or modify | ||
4 : | # it under the terms of the GNU General Public License as published by | ||
5 : | # the Free Software Foundation; either version 2 of the License, or | ||
6 : | # (at your option) any later version. | ||
7 : | # | ||
8 : | # This program is distributed in the hope that it will be useful, | ||
9 : | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 : | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 : | # GNU General Public License for more details. | ||
12 : | # | ||
13 : | # You should have received a copy of the GNU General Public License | ||
14 : | # along with this program; if not, write to the Free Software | ||
15 : | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
16 : | # | ||
17 : | # | ||
18 : | # $Id: cbp_ppc.s,v 1.1 2002-03-21 23:42:53 canard Exp $ | ||
19 : | # $Source: /home/xvid/cvs_copy/cvs-server-root/xvid/xvidcore/src/bitstream/ppc_asm/cbp_ppc.s,v $ | ||
20 : | # $Date: 2002-03-21 23:42:53 $ | ||
21 : | # $Author: canard $ | ||
22 : | |||
23 : | #uint32_t calc_cbp_c(const int16_t codes[6][64]) | ||
24 : | #{ | ||
25 : | # uint32_t i, j; | ||
26 : | # uint32_t cbp = 0; | ||
27 : | # | ||
28 : | # for (i = 0; i < 6; i++) { | ||
29 : | # for (j = 1; j < 64/4; j+=4) { | ||
30 : | # if (codes[i][j] |codes[i][j+1]| | ||
31 : | # codes[i][j+2]|codes[i][j+3]) { | ||
32 : | # cbp |= 1 << (5 - i); | ||
33 : | # break; | ||
34 : | # } | ||
35 : | # } | ||
36 : | # } | ||
37 : | # return cbp; | ||
38 : | #} | ||
39 : | |||
40 : | .text | ||
41 : | .global calc_cbp_ppc | ||
42 : | calc_cbp_ppc: | ||
43 : | mr 9,3 | ||
44 : | li 8,5 | ||
45 : | xor 3,3,3 | ||
46 : | .loop: | ||
47 : | li 7,14 | ||
48 : | mr 6,9 | ||
49 : | .loop2: | ||
50 : | lha 4,2(6) | ||
51 : | lha 5,4(6) | ||
52 : | or 4,5,4 | ||
53 : | lha 5,6(6) | ||
54 : | or 4,5,4 | ||
55 : | lha 5,8(6) | ||
56 : | or 4,5,4 | ||
57 : | cmpwi 4,0 | ||
58 : | bne .cbp | ||
59 : | addi 6,6,8 | ||
60 : | subi 7,7,1 | ||
61 : | cmpwi 7,-1 | ||
62 : | beq .lastcoeffs | ||
63 : | b .loop2 | ||
64 : | .lastcoeffs: | ||
65 : | lha 4,2(6) | ||
66 : | lha 5,4(6) | ||
67 : | or 4,5,4 | ||
68 : | lha 5,6(6) | ||
69 : | or 4,5,4 | ||
70 : | cmpwi 4,0 | ||
71 : | beq .newline | ||
72 : | .cbp: | ||
73 : | li 4,1 | ||
74 : | slw 4,4,8 | ||
75 : | or 3,3,4 | ||
76 : | b .newline | ||
77 : | .newline: | ||
78 : | addi 9,9,128 | ||
79 : | subi 8,8,1 | ||
80 : | cmpwi 8,-1 | ||
81 : | bne .loop | ||
82 : | .end: | ||
83 : | blr |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |