Mercurial > libavcodec.hg
annotate bfin/pixels_bfin.S @ 7662:dea70eae1e49 libavcodec
Whitespace cosmetics after the last commit
author | superdump |
---|---|
date | Fri, 22 Aug 2008 18:19:18 +0000 |
parents | 75bf61c6c385 |
children |
rev | line source |
---|---|
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
1 /* |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
2 * Blackfin Pixel Operations |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
3 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com> |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
4 * |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
5 * This file is part of FFmpeg. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
6 * |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
11 * |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
15 * Lesser General Public License for more details. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
16 * |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
20 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
21 #include "config_bfin.h" |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
22 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
23 DEFUN(put_pixels_clamped,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
24 (DCTELEM *block, uint8_t *dest, int line_size)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
25 [--SP] = (R7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
26 R4 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
27 R5.l = 0x00ff; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
28 R5.h = 0x00ff; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
29 I0 = R0; // block |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
30 I1 = R1; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
31 R2 += -4; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
32 M1 = R2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
33 P0 = 8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
34 R0 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
35 R1 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
36 R2 = MAX(R0, R4) (V); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
37 LSETUP (ppc$0,ppc$1) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
38 ppc$0: R2 = MIN(R2, R5) (V); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
39 R3 = MAX(R1, R4) (V); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
40 R3 = MIN(R3, R5) (V) || R0 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
41 R6 = BYTEPACK (R2,R3) || R1 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
42 R2 = MAX(R0, R4) (V) || [I1++] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
43 R2 = MIN(R2, R5) (V); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
44 R3 = MAX(R1, R4) (V); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
45 R3 = MIN(R3, R5) (V) || R0 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
46 R6 = BYTEPACK (R2,R3) || R1 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
47 ppc$1: R2 = Max(R0, R4) (V) || [I1++M1] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
48 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
49 (R7:4) = [SP++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
50 RTS; |
5001 | 51 DEFUN_END(put_pixels_clamped) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
52 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
53 DEFUN(add_pixels_clamped,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
54 (DCTELEM *block, uint8_t *dest, int line_size)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
55 [-- SP] = (R7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
56 R4 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
57 I0 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
58 R2 += -4; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
59 M0 = R2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
60 I1 = R1; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
61 I3 = R0; // block |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
62 I2 = R1; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
63 P0 = 8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
64 M3 = 2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
65 R0 = [I3++] || R2 = [I1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
66 R2 = R2 << 8 || R0.H = W[I3--] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
67 R3 = R3 >> 8 || R1.L = W[I3] || I3 += 4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
68 R6 = BYTEOP3P(R1:0, R3:2) (LO) || R1.H = W[I3++] || R2 = [I1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
69 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
70 LSETUP(apc$2,apc$3) LC1 = P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
71 apc$2: R7 = BYTEOP3P(R1:0, R3:2) (HI, R) || R0 = [I3++] || R3 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
72 R2 = R2 << 8 || R0.H = W[I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
73 R3 = R3 >> 8 || R1.L = W[I3] || I3 += 4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
74 R6 = R6 + R7 (S) || R1.H = W[I3]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
75 R6 = BYTEOP3P(R1:0, R3:2) (LO) || I3+=M3 || [I2++]=R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
76 R7 = BYTEOP3P(R1:0, R3:2) (HI, R) || R0 = [I3++] || R2 = [I1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
77 R2 = R2 << 8 || R0.H = W[I3--] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
78 R3 = R3 >> 8 || R1.L = W[I3] || I3 += 4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
79 R6 = R6 + R7 (S) || R1.H = W[I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
80 apc$3: R6 = BYTEOP3P(R1:0, R3:2) (LO) || [I2++M0] = R6 || R2 = [I1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
81 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
82 (R7:4) = [SP++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
83 RTS; |
5001 | 84 DEFUN_END(add_pixels_clamped) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
85 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
86 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
87 /* |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
88 motion compensation |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
89 primitives |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
90 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
91 * Halfpel motion compensation with rounding (a+b+1)>>1. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
92 * This is an array[4][4] of motion compensation funcions for 4 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
93 * horizontal blocksizes (8,16) and the 4 halfpel positions<br> |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
94 * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
95 * @param block destination where the result is stored |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
96 * @param pixels source |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
97 * @param line_size number of bytes in a horizontal line of block |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
98 * @param h height |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
99 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
100 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
101 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
102 DEFUN(put_pixels8uc,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
103 (uint8_t *block, const uint8_t *s0, const uint8_t *s1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
104 int dest_size, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
105 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
106 i0=r1; // src0 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
107 i1=r2; // src1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
108 r0=[sp+12]; // dest_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
109 r2=[sp+16]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
110 p0=[sp+20]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
111 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
112 r0+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
113 m3=r0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
114 r2+=-8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
115 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
116 LSETUP(pp8$0,pp8$1) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
117 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
118 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
119 pp8$0: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
120 R6 = BYTEOP1P(R1:0,R3:2) || R0 = [I0++M0]|| R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
121 R7 = BYTEOP1P(R1:0,R3:2)(R) || R0 = [I0++] || [I3++] = R6 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
122 pp8$1: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
123 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
124 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
125 RTS; |
5001 | 126 DEFUN_END(put_pixels8uc) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
127 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
128 DEFUN(put_pixels16uc,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
129 (uint8_t *block, const uint8_t *s0, const uint8_t *s1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
130 int dest_size, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
131 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
132 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
133 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
134 i0=r1; // src0 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
135 i1=r2; // src1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
136 r0=[fp+20]; // dest_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
137 r2=[fp+24]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
138 p0=[fp+28]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
139 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
140 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
141 r0+=-12; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
142 m3=r0; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
143 r2+=-16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
144 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
145 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
146 LSETUP(pp16$0,pp16$1) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
147 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
148 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
149 pp16$0: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
150 R6 = BYTEOP1P(R1:0,R3:2) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
151 R7 = BYTEOP1P(R1:0,R3:2)(R) || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
152 [I3++] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
153 R6 = BYTEOP1P(R1:0,R3:2) || R0 = [I0++M0] || R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
154 R7 = BYTEOP1P(R1:0,R3:2)(R) || R0 = [I0++] || [I3++] = R7 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
155 [I3++] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
156 pp16$1: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
157 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
158 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
159 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
160 RTS; |
5001 | 161 DEFUN_END(put_pixels16uc) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
162 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
163 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
164 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
165 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
166 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
167 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
168 DEFUN(put_pixels8uc_nornd,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
169 (uint8_t *block, const uint8_t *s0, const uint8_t *s1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
170 int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
171 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
172 i0=r1; // src0 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
173 i1=r2; // src1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
174 r2=[sp+12]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
175 p0=[sp+16]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
176 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
177 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
178 m3=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
179 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
180 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
181 LSETUP(pp8$2,pp8$3) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
182 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
183 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
184 pp8$2: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
185 R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++M0]|| R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
186 R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R0 = [I0++] || [I3++] = R6 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
187 pp8$3: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
188 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
189 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
190 RTS; |
5001 | 191 DEFUN_END(put_pixels8uc_nornd) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
192 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
193 DEFUN(put_pixels16uc_nornd,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
194 (uint8_t *block, const uint8_t *s0, const uint8_t *s1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
195 int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
196 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
197 i0=r1; // src0 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
198 i1=r2; // src1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
199 r2=[sp+12]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
200 p0=[sp+16]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
201 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
202 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
203 r2+=-12; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
204 m3=r2; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
205 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
206 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
207 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
208 LSETUP(pp16$2,pp16$3) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
209 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
210 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
211 pp16$2: |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
212 DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
213 R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
214 R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
215 [I3++] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
216 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
217 R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++M0] || R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
218 R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R0 = [I0++] || [I3++] = R7 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
219 [I3++] = R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
220 pp16$3: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
221 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
222 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
223 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
224 RTS; |
5001 | 225 DEFUN_END(put_pixels16uc_nornd) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
226 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
227 DEFUN(z_put_pixels16_xy2,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
228 (uint8_t *block, const uint8_t *s0, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
229 int dest_size, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
230 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
231 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
232 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
233 i0=r1; // src0--> pixels |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
234 i1=r1; // src1--> pixels + line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
235 r2+=-12; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
236 m2=r2; // m2=dest_width-4 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
237 r2=[fp+20]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
238 m3=r2; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
239 p0=[fp+24]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
240 r2+=-16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
241 i1+=m3; /* src1 + line_size */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
242 m0=r2; /* line-size - 20 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
243 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
244 B0 = I0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
245 B1 = I1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
246 B3 = I3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
247 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
248 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
249 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
250 LSETUP(LS$16E,LE$16E) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
251 LS$16E: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
252 R4 = BYTEOP2P (R3:2,R1:0) (RNDL) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
253 R5 = BYTEOP2P (R3:2,R1:0) (RNDL,R) || R1 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
254 DISALGNEXCPT || R3 = [I1++] || [I3++] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
255 R4 = BYTEOP2P (R3:2,R1:0) (RNDL) || R0 = [I0++M0]|| R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
256 R5 = BYTEOP2P (R3:2,R1:0) (RNDL,R) || R0 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
257 LE$16E: DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
258 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
259 M1 = 1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
260 I3 = B3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
261 I1 = B1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
262 I0 = B0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
263 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
264 I0 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
265 I1 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
266 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
267 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
268 LSETUP(LS$16O,LE$16O) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
269 LS$16O: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
270 R4 = BYTEOP2P (R3:2,R1:0) (RNDH) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
271 R5 = BYTEOP2P (R3:2,R1:0) (RNDH,R) || R1 = [I0++] || R6 =[I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
272 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
273 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
274 DISALGNEXCPT || R3 =[I1++] || [I3++] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
275 R4 = BYTEOP2P (R3:2,R1:0) (RNDH) || R0 = [I0++M0]|| R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
276 R5 = BYTEOP2P (R3:2,R1:0) (RNDH,R) || R0 = [I0++] || R6 = [I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
277 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
278 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
279 LE$16O: DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
280 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
281 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
282 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
283 rts; |
5001 | 284 DEFUN_END(z_put_pixels16_xy2) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
285 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
286 DEFUN(put_pixels16_xy2_nornd,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
287 (uint8_t *block, const uint8_t *s0, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
288 int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
289 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
290 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
291 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
292 i0=r1; // src0--> pixels |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
293 i1=r1; // src1--> pixels + line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
294 m3=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
295 r2+=-12; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
296 m2=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
297 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
298 i1+=m3; /* src1 + line_size */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
299 m0=r2; /* line-size - 20 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
300 p0=[fp+20]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
301 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
302 B0=I0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
303 B1=I1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
304 B3=I3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
305 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
306 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
307 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
308 LSETUP(LS$16ET,LE$16ET) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
309 LS$16ET:DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
310 R4 = BYTEOP2P (R3:2,R1:0) (TL) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
311 R5 = BYTEOP2P (R3:2,R1:0) (TL,R) || R1 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
312 DISALGNEXCPT || R3 = [I1++] || [I3++] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
313 R4 = BYTEOP2P (R3:2,R1:0) (TL) || R0 = [I0++M0]|| R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
314 R5 = BYTEOP2P (R3:2,R1:0) (TL,R) || R0 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
315 LE$16ET:DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
316 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
317 M1 = 1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
318 I3=B3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
319 I1=B1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
320 I0=B0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
321 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
322 I0 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
323 I1 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
324 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
325 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
326 LSETUP(LS$16OT,LE$16OT) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
327 LS$16OT:DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
328 R4 = BYTEOP2P (R3:2,R1:0) (TH) || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
329 R5 = BYTEOP2P (R3:2,R1:0) (TH,R) || R1 = [I0++] || R6 =[I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
330 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
331 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
332 DISALGNEXCPT || R3 =[I1++] || [I3++] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
333 R4 = BYTEOP2P (R3:2,R1:0) (TH) || R0 = [I0++M0]|| R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
334 R5 = BYTEOP2P (R3:2,R1:0) (TH,R) || R0 = [I0++] || R6 = [I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
335 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
336 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
337 LE$16OT:DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
338 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
339 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
340 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
341 rts; |
5001 | 342 DEFUN_END(put_pixels16_xy2_nornd) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
343 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
344 DEFUN(z_put_pixels8_xy2,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
345 (uint8_t *block, const uint8_t *s0, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
346 int dest_size, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
347 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
348 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
349 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
350 i0=r1; // src0--> pixels |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
351 i1=r1; // src1--> pixels + line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
352 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
353 m2=r2; // m2=dest_width-4 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
354 r2=[fp+20]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
355 m3=r2; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
356 p0=[fp+24]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
357 r2+=-8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
358 i1+=m3; /* src1 + line_size */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
359 m0=r2; /* line-size - 20 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
360 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
361 b0 = I0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
362 b1 = I1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
363 b3 = I3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
364 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
365 LSETUP(LS$8E,LE$8E) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
366 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
367 LS$8E: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
368 R4 = BYTEOP2P (R3:2,R1:0) (RNDL) || R0 = [I0++M0] || R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
369 R5 = BYTEOP2P (R3:2,R1:0) (RNDL,R) || R0 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
370 LE$8E: DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
371 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
372 M1 = 1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
373 I3 = b3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
374 I1 = b1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
375 I0 = b0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
376 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
377 I0 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
378 I1 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
379 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
380 LSETUP(LS$8O,LE$8O) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
381 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
382 LS$8O: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
383 R4 = BYTEOP2P (R3:2,R1:0) (RNDH) || R0 = [I0++M0] || R2 =[I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
384 R5 = BYTEOP2P (R3:2,R1:0) (RNDH,R) || R0 = [I0++] || R6 =[I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
385 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
386 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
387 LE$8O: DISALGNEXCPT || R2 =[I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
388 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
389 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
390 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
391 rts; |
5001 | 392 DEFUN_END(z_put_pixels8_xy2) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
393 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
394 DEFUN(put_pixels8_xy2_nornd,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
395 (uint8_t *block, const uint8_t *s0, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
396 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
397 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
398 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
399 i0=r1; // src0--> pixels |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
400 i1=r1; // src1--> pixels + line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
401 m3=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
402 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
403 m2=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
404 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
405 i1+=m3; /* src1 + line_size */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
406 m0=r2; /* line-size - 20 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
407 p0=[fp+20]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
408 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
409 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
410 b0 = I0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
411 b1 = I1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
412 b3 = I3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
413 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
414 LSETUP(LS$8ET,LE$8ET) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
415 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
416 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
417 LS$8ET: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
418 R4 = BYTEOP2P (R3:2,R1:0) (TL) || R0 = [I0++M0] || R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
419 R5 = BYTEOP2P (R3:2,R1:0) (TL,R) || R0 = [I0++] || [I3++] = R4 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
420 LE$8ET: DISALGNEXCPT || R2 = [I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
421 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
422 M1 = 1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
423 I3 = b3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
424 I1 = b1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
425 I0 = b0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
426 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
427 I0 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
428 I1 += M1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
429 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
430 LSETUP(LS$8OT,LE$8OT) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
431 DISALGNEXCPT || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
432 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
433 LS$8OT: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
434 R4 = BYTEOP2P (R3:2,R1:0) (TH) || R0 = [I0++M0] || R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
435 R5 = BYTEOP2P (R3:2,R1:0) (TH,R) || R0 = [I0++] || R6 = [I3++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
436 R4 = R4 +|+ R6 || R7 = [I3--]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
437 R5 = R5 +|+ R7 || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
438 LE$8OT: DISALGNEXCPT || R2 =[I1++] || [I3++M2] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
439 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
440 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
441 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
442 rts; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
443 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
444 DEFUN(diff_pixels,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
445 (DCTELEM *block, uint8_t *s1, uint8_t *s2, int stride)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
446 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
447 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
448 p0=8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
449 i3=r0; // block |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
450 i0=r1; // s1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
451 i1=r2; // s2 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
452 r2=[fp+20]; // stride |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
453 r2+=-8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
454 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
455 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
456 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
457 LSETUP(.LS0,.LE0) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
458 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
459 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
460 .LS0: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
461 (R5,R4) = BYTEOP16M (R1:0,R3:2) || R0 = [I0++M0] || R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
462 (R7,R6) = BYTEOP16M (R1:0,R3:2) (R)|| R0 = [I0++] || [I3++] = R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
463 DISALGNEXCPT || R2 = [I1++] || [I3++] = R5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
464 [i3++]=r6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
465 .LE0: [i3++]=r7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
466 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
467 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
468 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
469 rts; |
5001 | 470 DEFUN_END(put_pixels8_xy2_nornd) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
471 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
472 /* |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
473 for (i = 0; i < 16; i++) { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
474 for (j = 0; j < 16; j++) { |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
475 sum += pix[j]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
476 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
477 pix += line_size; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
478 } |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
479 */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
480 DEFUN(pix_sum,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
481 (uint8_t *p, int stride)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
482 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
483 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
484 p0=8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
485 i0=r0; // s1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
486 i1=r0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
487 m1=r1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
488 r1=r1+r1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
489 r1+=-16; // stride |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
490 m0=r1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
491 i1+=m1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
492 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
493 r6=0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
494 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
495 LSETUP(LS$PS,LE$PS) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
496 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
497 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
498 LS$PS: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
499 (R5,R4) = BYTEOP16P (R3:2,R1:0) || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
500 r6=r6+|+r5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
501 r6=r6+|+r4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
502 (R5,R4) = BYTEOP16P (R3:2,R1:0) (R)|| R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
503 r6=r6+|+r5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
504 r6=r6+|+r4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
505 (R5,R4) = BYTEOP16P (R3:2,R1:0) || R0 = [I0++m0] || R2 = [I1++m0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
506 r6=r6+|+r5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
507 r6=r6+|+r4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
508 (R5,R4) = BYTEOP16P (R3:2,R1:0) (R)|| R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
509 r6=r6+|+r5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
510 LE$PS: r6=r6+|+r4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
511 r0.l=r6.l+r6.h; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
512 r0.h=0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
513 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
514 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
515 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
516 rts; |
5001 | 517 DEFUN_END(pix_sum) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
518 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
519 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
520 DEFUN(get_pixels,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
521 (DCTELEM *restrict block, const uint8_t *pixels, int line_size)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
522 [--sp] = (r7:4); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
523 i3=r0; // dest |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
524 i0=r1; // src0 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
525 p0=8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
526 r2+=-8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
527 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
528 LSETUP(gp8$0,gp8$1) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
529 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
530 DISALGNEXCPT || R0 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
531 DISALGNEXCPT || R1 = [I0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
532 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
533 gp8$0: (R7,R6) = byteunpack R1:0 || R0 = [I0++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
534 (R5,R4) = byteunpack R1:0 (R) || R0 = [I0++] || [I3++]=R6; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
535 DISALGNEXCPT || R1 = [I0++] || [I3++]=R7; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
536 [I3++]=R4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
537 gp8$1: [I3++]=R5 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
538 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
539 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
540 (r7:4) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
541 RTS; |
5001 | 542 DEFUN_END(get_pixels) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
543 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
544 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
545 /* sad = sad16x16 (ubyte *mb, ubyte *refwin, srcwidth, refwinwidth, h) */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
546 /* 91 cycles */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
547 DEFUN(z_sad16x16,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
548 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
549 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
550 I0 = R0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
551 I1 = R1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
552 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
553 A1 = A0 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
554 R0 = [sp+20]; // rwidth |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
555 P2 = [sp+24]; // height |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
556 R3 = 16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
557 R0 = R0 - R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
558 R3 = R2 - R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
559 M1 = R0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
560 M0 = R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
561 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
562 DISALGNEXCPT || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
563 LSETUP (s$16, e$16) LC0=P2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
564 s$16: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
565 SAA (R1:0,R3:2) || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
566 SAA (R1:0,R3:2) (R) || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
567 SAA (R1:0,R3:2) || R0 = [I0++M0] || R2 = [I1++M1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
568 e$16: SAA (R1:0,R3:2) (R) || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
569 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
570 R3=A1.L+A1.H, R2=A0.L+A0.H ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
571 R0 = R2 + R3 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
572 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
573 RTS; |
5001 | 574 DEFUN_END(z_sad16x16) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
575 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
576 /* sad = sad8x8 (ubyte *mb, ubyte *refwin, int srcwidth, int refwinwidth, int h) */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
577 /* 36 cycles */ |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
578 DEFUN(z_sad8x8,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
579 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
580 I0 = R0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
581 I1 = R1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
582 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
583 A1 = A0 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
584 r0 = [sp+12]; // rwidth |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
585 P2 = [sp+16]; //height |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
586 R3 = 8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
587 R0 = R0 - R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
588 R3 = R2 - R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
589 M0 = R3; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
590 M1 = R0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
591 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
592 LSETUP (s$8, e$8) LC0=P2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
593 DISALGNEXCPT || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
594 DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
595 s$8: SAA (R1:0,R3:2) || R0 = [I0++M0] || R2 = [I1++M1]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
596 SAA (R1:0,R3:2) (R) || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
597 e$8: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
598 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
599 R3=A1.L+A1.H, R2=A0.L+A0.H ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
600 R0 = R2 + R3 ; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
601 RTS; |
5001 | 602 DEFUN_END(z_sad8x8) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
603 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
604 DEFUN(pix_norm1,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
605 (uint8_t * pix, int line_size)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
606 [--SP]=(R7:4,P5:3); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
607 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
608 // Fetch the input arguments. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
609 P1 = R0; // pix |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
610 P0 = R1; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
611 P5 = 16; // loop ctr. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
612 P0 -= P5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
613 M0 = P0; // M0 = line_size-16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
614 // Now for the real work. |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
615 A1 = A0 = 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
616 lsetup(_pix_norm1_blkfn_loopStart, _pix_norm1_blkfn_loopEnd) LC1 = P5; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
617 I0 = P1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
618 DISALGNEXCPT || r0 = [i0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
619 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
620 _pix_norm1_blkfn_loopStart: |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
621 // following unpacks pix1[0..15] pix1+line_size[0..15] |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
622 DISALGNEXCPT || r1 = [i0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
623 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
624 (r5, r4) = byteunpack r1:0 || r0 = [i0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
625 a1 += r5.h * r5.h, a0 += r5.l * r5.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
626 a1 += r4.h * r4.h, a0 += r4.l * r4.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
627 (r5, r4) = byteunpack r1:0(r) || r1 = [i0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
628 a1 += r5.h * r5.h, a0 += r5.l * r5.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
629 a1 += r4.h * r4.h, a0 += r4.l * r4.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
630 (r5, r4) = byteunpack r1:0 || r0 = [i0++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
631 a1 += r5.h * r5.h, a0 += r5.l * r5.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
632 a1 += r4.h * r4.h, a0 += r4.l * r4.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
633 (r5, r4) = byteunpack r1:0(r) || r0 = [i0++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
634 a1 += r5.h * r5.h, a0 += r5.l * r5.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
635 _pix_norm1_blkfn_loopEnd: |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
636 a1 += r4.h * r4.h, a0 += r4.l * r4.l (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
637 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
638 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
639 // Clean up at the end: |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
640 R2 = A0, R3 = A1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
641 R0 = R2 + R3 (S); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
642 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
643 (R7:4,P5:3)=[SP++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
644 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
645 RTS; |
5001 | 646 DEFUN_END(pix_norm1) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
647 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
648 DEFUN(sse4,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
649 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
650 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
651 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
652 p0=[fp+24]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
653 i0=r1; // pix1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
654 i1=r2; // pix2 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
655 r2=[fp+20]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
656 r2+=-4; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
657 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
658 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
659 a0=a1=0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
660 LSETUP(.S40,.E40) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
661 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
662 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
663 .S40: DISALGNEXCPT || R1 = [I0++M0] || R3 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
664 (R7,R6) = BYTEOP16M (R1:0,R3:2); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
665 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
666 .E40: a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
667 a0 += a1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
668 r0 = a0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
669 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
670 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
671 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
672 rts; |
5001 | 673 DEFUN_END(sse4) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
674 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
675 DEFUN(sse8,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
676 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
677 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
678 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
679 p0=[fp+24]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
680 i0=r1; // pix1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
681 i1=r2; // pix2 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
682 r2=[fp+20]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
683 r2+=-8; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
684 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
685 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
686 a0=a1=0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
687 LSETUP(.S80,.E80) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
688 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
689 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
690 .S80: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
691 (R7,R6) = BYTEOP16M (R1:0,R3:2) || R0 = [I0++M0] || R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
692 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
693 a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
694 (R7,R6) = BYTEOP16M (R1:0,R3:2) (R)|| R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
695 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
696 .E80: a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
697 a0 += a1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
698 r0 = a0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
699 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
700 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
701 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
702 rts; |
5001 | 703 DEFUN_END(sse8) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
704 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
705 DEFUN(sse16,mL1, |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
706 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)): |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
707 link 0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
708 [--sp] = (r7:6); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
709 p0=[fp+24]; // h |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
710 i0=r1; // pix1 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
711 i1=r2; // pix2 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
712 r2=[fp+20]; // line_size |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
713 r2+=-16; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
714 m0=r2; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
715 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
716 a0=a1=0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
717 DISALGNEXCPT || R0 = [I0++] || R2 =[I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
718 LSETUP(.S160,.E160) LC0=P0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
719 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
720 .S160: DISALGNEXCPT || R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
721 (R7,R6) = BYTEOP16M (R1:0,R3:2) || R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
722 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
723 a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
724 (R7,R6) = BYTEOP16M (R1:0,R3:2) (R)|| R1 = [I0++] || R3 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
725 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
726 a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
727 (R7,R6) = BYTEOP16M (R1:0,R3:2) || R0 = [I0++M0] || R2 = [I1++M0]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
728 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
729 a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
730 (R7,R6) = BYTEOP16M (R1:0,R3:2) (R)|| R0 = [I0++] || R2 = [I1++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
731 a0 += r7.l * r7.l, a1 += r7.h * r7.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
732 .E160: a0 += r6.l * r6.l, a1 += r6.h * r6.h (is); |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
733 a0 += a1; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
734 r0 = a0; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
735 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
736 (r7:6) = [sp++]; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
737 unlink; |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
738 rts; |
5001 | 739 DEFUN_END(sse16) |
4765
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
740 |
85298e8c55c4
bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents:
diff
changeset
|
741 |