Mercurial > libavcodec.hg
annotate armv4l/simple_idct_arm.S @ 4304:dbaae8e5ec55 libavcodec
limit x/ymin/max to me_range
slight psnr/bitrate gain for most but not all files if me_range is used
author | michael |
---|---|
date | Sun, 17 Dec 2006 12:07:09 +0000 |
parents | c8c591fe26f8 |
children | 470601203f44 |
rev | line source |
---|---|
2967 | 1 /* |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
2 * simple_idct_arm.S |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
3 * Copyright (C) 2002 Frederic 'dilb' Boulay. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
4 * All Rights Reserved. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
5 * |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
6 * Author: Frederic Boulay <dilb@handhelds.org> |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
7 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
8 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
9 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
10 * FFmpeg is free software; you can redistribute it and/or |
3683
dc1e28564bb2
Switch license from GPL to LGPL. The original author agreed to this as
diego
parents:
3036
diff
changeset
|
11 * modify it under the terms of the GNU Lesser General Public |
dc1e28564bb2
Switch license from GPL to LGPL. The original author agreed to this as
diego
parents:
3036
diff
changeset
|
12 * License as published by the Free Software Foundation; either |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
13 * version 2.1 of the License, or (at your option) any later version. |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
14 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
15 * FFmpeg is distributed in the hope that it will be useful, |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3683
dc1e28564bb2
Switch license from GPL to LGPL. The original author agreed to this as
diego
parents:
3036
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
dc1e28564bb2
Switch license from GPL to LGPL. The original author agreed to this as
diego
parents:
3036
diff
changeset
|
18 * Lesser General Public License for more details. |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
19 * |
3683
dc1e28564bb2
Switch license from GPL to LGPL. The original author agreed to this as
diego
parents:
3036
diff
changeset
|
20 * You should have received a copy of the GNU Lesser General Public |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3683
diff
changeset
|
21 * License along with FFmpeg; if not, write to the Free Software |
3036
0b546eab515d
Update licensing information: The FSF changed postal address.
diego
parents:
2979
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
23 * |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
24 * The function defined in this file, is derived from the simple_idct function |
2967 | 25 * from the libavcodec library part of the ffmpeg project. |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
26 */ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
27 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
28 /* useful constants for the algorithm, they are save in __constant_ptr__ at */ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
29 /* the end of the source code.*/ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
30 #define W1 22725 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
31 #define W2 21407 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
32 #define W3 19266 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
33 #define W4 16383 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
34 #define W5 12873 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
35 #define W6 8867 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
36 #define W7 4520 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
37 #define MASK_MSHW 0xFFFF0000 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
38 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
39 /* offsets of the constants in the vector */ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
40 #define offW1 0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
41 #define offW2 4 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
42 #define offW3 8 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
43 #define offW4 12 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
44 #define offW5 16 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
45 #define offW6 20 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
46 #define offW7 24 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
47 #define offMASK_MSHW 28 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
48 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
49 #define ROW_SHIFT 11 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
50 #define ROW_SHIFT2MSHW (16-11) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
51 #define COL_SHIFT 20 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
52 #define ROW_SHIFTED_1 1024 /* 1<< (ROW_SHIFT-1) */ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
53 #define COL_SHIFTED_1 524288 /* 1<< (COL_SHIFT-1) */ |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
54 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
55 |
2979 | 56 .text |
57 .align | |
58 .global simple_idct_ARM | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
59 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
60 simple_idct_ARM: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
61 @@ void simple_idct_ARM(int16_t *block) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
62 @@ save stack for reg needed (take all of them), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
63 @@ R0-R3 are scratch regs, so no need to save them, but R0 contains the pointer to block |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
64 @@ so it must not be overwritten, if it is not saved!! |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
65 @@ R12 is another scratch register, so it should not be saved too |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
66 @@ save all registers |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
67 stmfd sp!, {r4-r11, r14} @ R14 is also called LR |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
68 @@ at this point, R0=block, other registers are free. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
69 add r14, r0, #112 @ R14=&block[8*7], better start from the last row, and decrease the value until row=0, i.e. R12=block. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
70 add r12, pc, #(__constant_ptr__-.-8) @ R12=__constant_ptr__, the vector containing the constants, probably not necessary to reserve a register for it |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
71 @@ add 2 temporary variables in the stack: R0 and R14 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
72 sub sp, sp, #8 @ allow 2 local variables |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
73 str r0, [sp, #0] @ save block in sp[0] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
74 @@ stack status |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
75 @@ sp+4 free |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
76 @@ sp+0 R0 (block) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
77 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
78 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
79 @@ at this point, R0=block, R14=&block[56], R12=__const_ptr_, R1-R11 free |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
80 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
81 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
82 __row_loop: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
83 @@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimise ldr accesses (i.e. split 32bits in 2 16bits words), at least it gives more usable registers :) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
84 ldr r1, [r14, #0] @ R1=(int32)(R12)[0]=ROWr32[0] (relative row cast to a 32b pointer) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
85 ldr r2, [r14, #4] @ R2=(int32)(R12)[1]=ROWr32[1] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
86 ldr r3, [r14, #8] @ R3=ROWr32[2] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
87 ldr r4, [r14, #12] @ R4=ROWr32[3] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
88 @@ check if the words are null, if all of them are null, then proceed with next row (branch __end_row_loop), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
89 @@ if ROWr16[0] is the only one not null, then proceed with this special case (branch __almost_empty_row) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
90 @@ else follow the complete algorithm. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
91 @@ at this point, R0=block, R14=&block[n], R12=__const_ptr_, R1=ROWr32[0], R2=ROWr32[1], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
92 @@ R3=ROWr32[2], R4=ROWr32[3], R5-R11 free |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
93 orr r5, r4, r3 @ R5=R4 | R3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
94 orr r5, r5, r2 @ R5=R4 | R3 | R2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
95 orrs r6, r5, r1 @ Test R5 | R1 (the aim is to check if everything is null) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
96 beq __end_row_loop |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
97 mov r7, r1, asr #16 @ R7=R1>>16=ROWr16[1] (evaluate it now, as it could be useful later) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
98 ldrsh r6, [r14, #0] @ R6=ROWr16[0] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
99 orrs r5, r5, r7 @ R5=R4 | R3 | R2 | R7 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
100 beq __almost_empty_row |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
101 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
102 __b_evaluation: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
103 @@ at this point, R0=block (temp), R1(free), R2=ROWr32[1], R3=ROWr32[2], R4=ROWr32[3], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
104 @@ R5=(temp), R6=ROWr16[0], R7=ROWr16[1], R8-R11 free, |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
105 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
106 @@ to save some registers/calls, proceed with b0-b3 first, followed by a0-a3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
107 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
108 @@ MUL16(b0, W1, row[1]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
109 @@ MUL16(b1, W3, row[1]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
110 @@ MUL16(b2, W5, row[1]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
111 @@ MUL16(b3, W7, row[1]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
112 @@ MAC16(b0, W3, row[3]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
113 @@ MAC16(b1, -W7, row[3]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
114 @@ MAC16(b2, -W1, row[3]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
115 @@ MAC16(b3, -W5, row[3]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
116 ldr r8, [r12, #offW1] @ R8=W1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
117 mov r2, r2, asr #16 @ R2=ROWr16[3] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
118 mul r0, r8, r7 @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
119 ldr r9, [r12, #offW3] @ R9=W3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
120 ldr r10, [r12, #offW5] @ R10=W5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
121 mul r1, r9, r7 @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
122 ldr r11, [r12, #offW7] @ R11=W7 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
123 mul r5, r10, r7 @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
124 mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) |
2979 | 125 teq r2, #0 @ if null avoid muls |
126 mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
127 rsbne r2, r2, #0 @ R2=-ROWr16[3] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
128 mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
129 mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
130 mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
131 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
132 @@ at this point, R0=b0, R1=b1, R2 (free), R3=ROWr32[2], R4=ROWr32[3], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
133 @@ R5=b2, R6=ROWr16[0], R7=b3, R8=W1, R9=W3, R10=W5, R11=W7, |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
134 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
135 @@ temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
136 @@ if (temp != 0) {} |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
137 orrs r2, r3, r4 @ R2=ROWr32[2] | ROWr32[3] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
138 beq __end_b_evaluation |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
139 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
140 @@ at this point, R0=b0, R1=b1, R2 (free), R3=ROWr32[2], R4=ROWr32[3], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
141 @@ R5=b2, R6=ROWr16[0], R7=b3, R8=W1, R9=W3, R10=W5, R11=W7, |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
142 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
143 @@ MAC16(b0, W5, row[5]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
144 @@ MAC16(b2, W7, row[5]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
145 @@ MAC16(b3, W3, row[5]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
146 @@ MAC16(b1, -W1, row[5]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
147 @@ MAC16(b0, W7, row[7]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
148 @@ MAC16(b2, W3, row[7]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
149 @@ MAC16(b3, -W1, row[7]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
150 @@ MAC16(b1, -W5, row[7]); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
151 mov r3, r3, asr #16 @ R3=ROWr16[5] |
2979 | 152 teq r3, #0 @ if null avoid muls |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
153 mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5]=b0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
154 mov r4, r4, asr #16 @ R4=ROWr16[7] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
155 mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5]=b2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
156 mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5]=b3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
157 rsbne r3, r3, #0 @ R3=-ROWr16[5] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
158 mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5]=b1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
159 @@ R3 is free now |
2979 | 160 teq r4, #0 @ if null avoid muls |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
161 mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7]=b0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
162 mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7]=b2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
163 rsbne r4, r4, #0 @ R4=-ROWr16[7] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
164 mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7]=b3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
165 mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7]=b1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
166 @@ R4 is free now |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
167 __end_b_evaluation: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
168 @@ at this point, R0=b0, R1=b1, R2=ROWr32[2] | ROWr32[3] (tmp), R3 (free), R4 (free), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
169 @@ R5=b2, R6=ROWr16[0], R7=b3, R8 (free), R9 (free), R10 (free), R11 (free), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
170 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
171 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
172 __a_evaluation: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
173 @@ a0 = (W4 * row[0]) + (1 << (ROW_SHIFT - 1)); |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
174 @@ a1 = a0 + W6 * row[2]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
175 @@ a2 = a0 - W6 * row[2]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
176 @@ a3 = a0 - W2 * row[2]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
177 @@ a0 = a0 + W2 * row[2]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
178 ldr r9, [r12, #offW4] @ R9=W4 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
179 mul r6, r9, r6 @ R6=W4*ROWr16[0] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
180 ldr r10, [r12, #offW6] @ R10=W6 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
181 ldrsh r4, [r14, #4] @ R4=ROWr16[2] (a3 not defined yet) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
182 add r6, r6, #ROW_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(ROW_SHIFT-1) (a0) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
183 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
184 mul r11, r10, r4 @ R11=W6*ROWr16[2] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
185 ldr r8, [r12, #offW2] @ R8=W2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
186 sub r3, r6, r11 @ R3=a0-W6*ROWr16[2] (a2) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
187 @@ temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
188 @@ if (temp != 0) {} |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
189 teq r2, #0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
190 beq __end_bef_a_evaluation |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
191 |
2979 | 192 add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1) |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
193 mul r11, r8, r4 @ R11=W2*ROWr16[2] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
194 sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
195 add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
196 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
197 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
198 @@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3, |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
199 @@ R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
200 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
201 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
202 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
203 @@ a0 += W4*row[4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
204 @@ a1 -= W4*row[4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
205 @@ a2 -= W4*row[4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
206 @@ a3 += W4*row[4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
207 ldrsh r11, [r14, #8] @ R11=ROWr16[4] |
2979 | 208 teq r11, #0 @ if null avoid muls |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
209 mulne r11, r9, r11 @ R11=W4*ROWr16[4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
210 @@ R9 is free now |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
211 ldrsh r9, [r14, #12] @ R9=ROWr16[6] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
212 addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
213 subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
214 subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
215 addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
216 @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead |
2979 | 217 teq r9, #0 @ if null avoid muls |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
218 mulne r11, r10, r9 @ R11=W6*ROWr16[6] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
219 addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
220 mulne r10, r8, r9 @ R10=W2*ROWr16[6] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
221 @@ a0 += W6*row[6]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
222 @@ a3 -= W6*row[6]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
223 @@ a1 -= W2*row[6]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
224 @@ a2 += W2*row[6]; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
225 subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
226 subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
227 addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
228 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
229 __end_a_evaluation: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
230 @@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3, |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
231 @@ R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free), |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
232 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
233 @@ row[0] = (a0 + b0) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
234 @@ row[1] = (a1 + b1) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
235 @@ row[2] = (a2 + b2) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
236 @@ row[3] = (a3 + b3) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
237 @@ row[4] = (a3 - b3) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
238 @@ row[5] = (a2 - b2) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
239 @@ row[6] = (a1 - b1) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
240 @@ row[7] = (a0 - b0) >> ROW_SHIFT; |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
241 add r8, r6, r0 @ R8=a0+b0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
242 add r9, r2, r1 @ R9=a1+b1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
243 @@ put 2 16 bits half-words in a 32bits word |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
244 @@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only Little Endian compliant then!!!) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
245 ldr r10, [r12, #offMASK_MSHW] @ R10=0xFFFF0000 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
246 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a1+b1)<<5) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
247 mvn r11, r10 @ R11= NOT R10= 0x0000FFFF |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
248 and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a0+b0)>>11) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
249 orr r8, r8, r9 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
250 str r8, [r14, #0] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
251 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
252 add r8, r3, r5 @ R8=a2+b2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
253 add r9, r4, r7 @ R9=a3+b3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
254 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a3+b3)<<5) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
255 and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a2+b2)>>11) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
256 orr r8, r8, r9 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
257 str r8, [r14, #4] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
258 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
259 sub r8, r4, r7 @ R8=a3-b3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
260 sub r9, r3, r5 @ R9=a2-b2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
261 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a2-b2)<<5) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
262 and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a3-b3)>>11) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
263 orr r8, r8, r9 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
264 str r8, [r14, #8] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
265 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
266 sub r8, r2, r1 @ R8=a1-b1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
267 sub r9, r6, r0 @ R9=a0-b0 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
268 and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a0-b0)<<5) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
269 and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a1-b1)>>11) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
270 orr r8, r8, r9 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
271 str r8, [r14, #12] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
272 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
273 bal __end_row_loop |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
274 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
275 __almost_empty_row: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
276 @@ the row was empty, except ROWr16[0], now, management of this special case |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
277 @@ at this point, R0=block, R14=&block[n], R12=__const_ptr_, R1=ROWr32[0], R2=ROWr32[1], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
278 @@ R3=ROWr32[2], R4=ROWr32[3], R5=(temp), R6=ROWr16[0], R7=ROWr16[1], |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
279 @@ R8=0xFFFF (temp), R9-R11 free |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
280 mov r8, #0x10000 @ R8=0xFFFF (2 steps needed!) it saves a ldr call (because of delay run). |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
281 sub r8, r8, #1 @ R8 is now ready. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
282 and r5, r8, r6, lsl #3 @ R5=R8 & (R6<<3)= (ROWr16[0]<<3) & 0xFFFF |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
283 orr r5, r5, r5, lsl #16 @ R5=R5 | (R5<<16) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
284 str r5, [r14, #0] @ R14[0]=ROWr32[0]=R5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
285 str r5, [r14, #4] @ R14[4]=ROWr32[1]=R5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
286 str r5, [r14, #8] @ R14[8]=ROWr32[2]=R5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
287 str r5, [r14, #12] @ R14[12]=ROWr32[3]=R5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
288 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
289 __end_row_loop: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
290 @@ at this point, R0-R11 (free) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
291 @@ R12=__const_ptr_, R14=&block[n] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
292 ldr r0, [sp, #0] @ R0=block |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
293 teq r0, r14 @ compare current &block[8*n] to block, when block is reached, the loop is finished. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
294 sub r14, r14, #16 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
295 bne __row_loop |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
296 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
297 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
298 |
2979 | 299 @@ at this point, R0=block, R1-R11 (free) |
300 @@ R12=__const_ptr_, R14=&block[n] | |
301 add r14, r0, #14 @ R14=&block[7], better start from the last col, and decrease the value until col=0, i.e. R14=block. | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
302 __col_loop: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
303 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
304 __b_evaluation2: |
2979 | 305 @@ at this point, R0=block (temp), R1-R11 (free) |
306 @@ R12=__const_ptr_, R14=&block[n] | |
307 @@ proceed with b0-b3 first, followed by a0-a3 | |
308 @@ MUL16(b0, W1, col[8x1]); | |
309 @@ MUL16(b1, W3, col[8x1]); | |
310 @@ MUL16(b2, W5, col[8x1]); | |
311 @@ MUL16(b3, W7, col[8x1]); | |
312 @@ MAC16(b0, W3, col[8x3]); | |
313 @@ MAC16(b1, -W7, col[8x3]); | |
314 @@ MAC16(b2, -W1, col[8x3]); | |
315 @@ MAC16(b3, -W5, col[8x3]); | |
316 ldr r8, [r12, #offW1] @ R8=W1 | |
317 ldrsh r7, [r14, #16] | |
318 mul r0, r8, r7 @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) | |
319 ldr r9, [r12, #offW3] @ R9=W3 | |
320 ldr r10, [r12, #offW5] @ R10=W5 | |
321 mul r1, r9, r7 @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) | |
322 ldr r11, [r12, #offW7] @ R11=W7 | |
323 mul r5, r10, r7 @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) | |
324 ldrsh r2, [r14, #48] | |
325 mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle) | |
326 teq r2, #0 @ if 0, then avoid muls | |
327 mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) | |
328 rsbne r2, r2, #0 @ R2=-ROWr16[3] | |
329 mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) | |
330 mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) | |
331 mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle) | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
332 |
2979 | 333 @@ at this point, R0=b0, R1=b1, R2 (free), R3 (free), R4 (free), |
334 @@ R5=b2, R6 (free), R7=b3, R8=W1, R9=W3, R10=W5, R11=W7, | |
335 @@ R12=__const_ptr_, R14=&block[n] | |
336 @@ MAC16(b0, W5, col[5x8]); | |
337 @@ MAC16(b2, W7, col[5x8]); | |
338 @@ MAC16(b3, W3, col[5x8]); | |
339 @@ MAC16(b1, -W1, col[5x8]); | |
340 @@ MAC16(b0, W7, col[7x8]); | |
341 @@ MAC16(b2, W3, col[7x8]); | |
342 @@ MAC16(b3, -W1, col[7x8]); | |
343 @@ MAC16(b1, -W5, col[7x8]); | |
344 ldrsh r3, [r14, #80] @ R3=COLr16[5x8] | |
345 teq r3, #0 @ if 0 then avoid muls | |
346 mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5x8]=b0 | |
347 mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5x8]=b2 | |
348 mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5x8]=b3 | |
349 rsbne r3, r3, #0 @ R3=-ROWr16[5x8] | |
350 ldrsh r4, [r14, #112] @ R4=COLr16[7x8] | |
351 mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5x8]=b1 | |
352 @@ R3 is free now | |
353 teq r4, #0 @ if 0 then avoid muls | |
354 mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7x8]=b0 | |
355 mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7x8]=b2 | |
356 rsbne r4, r4, #0 @ R4=-ROWr16[7x8] | |
357 mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7x8]=b3 | |
358 mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7x8]=b1 | |
359 @@ R4 is free now | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
360 __end_b_evaluation2: |
2979 | 361 @@ at this point, R0=b0, R1=b1, R2 (free), R3 (free), R4 (free), |
362 @@ R5=b2, R6 (free), R7=b3, R8 (free), R9 (free), R10 (free), R11 (free), | |
363 @@ R12=__const_ptr_, R14=&block[n] | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
364 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
365 __a_evaluation2: |
2979 | 366 @@ a0 = (W4 * col[8x0]) + (1 << (COL_SHIFT - 1)); |
367 @@ a1 = a0 + W6 * row[2]; | |
368 @@ a2 = a0 - W6 * row[2]; | |
369 @@ a3 = a0 - W2 * row[2]; | |
370 @@ a0 = a0 + W2 * row[2]; | |
371 ldrsh r6, [r14, #0] | |
372 ldr r9, [r12, #offW4] @ R9=W4 | |
373 mul r6, r9, r6 @ R6=W4*ROWr16[0] | |
374 ldr r10, [r12, #offW6] @ R10=W6 | |
375 ldrsh r4, [r14, #32] @ R4=ROWr16[2] (a3 not defined yet) | |
376 add r6, r6, #COL_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(COL_SHIFT-1) (a0) | |
377 mul r11, r10, r4 @ R11=W6*ROWr16[2] | |
378 ldr r8, [r12, #offW2] @ R8=W2 | |
379 add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1) | |
380 sub r3, r6, r11 @ R3=a0-W6*ROWr16[2] (a2) | |
381 mul r11, r8, r4 @ R11=W2*ROWr16[2] | |
382 sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3) | |
383 add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0) | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
384 |
2979 | 385 @@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3, |
386 @@ R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free), | |
387 @@ R12=__const_ptr_, R14=&block[n] | |
388 @@ a0 += W4*row[4] | |
389 @@ a1 -= W4*row[4] | |
390 @@ a2 -= W4*row[4] | |
391 @@ a3 += W4*row[4] | |
392 ldrsh r11, [r14, #64] @ R11=ROWr16[4] | |
393 teq r11, #0 @ if null avoid muls | |
394 mulne r11, r9, r11 @ R11=W4*ROWr16[4] | |
395 @@ R9 is free now | |
396 addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0) | |
397 subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1) | |
398 subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2) | |
399 ldrsh r9, [r14, #96] @ R9=ROWr16[6] | |
400 addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3) | |
401 @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead | |
402 teq r9, #0 @ if null avoid muls | |
403 mulne r11, r10, r9 @ R11=W6*ROWr16[6] | |
404 addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0) | |
405 mulne r10, r8, r9 @ R10=W2*ROWr16[6] | |
406 @@ a0 += W6*row[6]; | |
407 @@ a3 -= W6*row[6]; | |
408 @@ a1 -= W2*row[6]; | |
409 @@ a2 += W2*row[6]; | |
410 subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3) | |
411 subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1) | |
412 addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2) | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
413 __end_a_evaluation2: |
2979 | 414 @@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3, |
415 @@ R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free), | |
416 @@ R12=__const_ptr_, R14=&block[n] | |
417 @@ col[0 ] = ((a0 + b0) >> COL_SHIFT); | |
418 @@ col[8 ] = ((a1 + b1) >> COL_SHIFT); | |
419 @@ col[16] = ((a2 + b2) >> COL_SHIFT); | |
420 @@ col[24] = ((a3 + b3) >> COL_SHIFT); | |
421 @@ col[32] = ((a3 - b3) >> COL_SHIFT); | |
422 @@ col[40] = ((a2 - b2) >> COL_SHIFT); | |
423 @@ col[48] = ((a1 - b1) >> COL_SHIFT); | |
424 @@ col[56] = ((a0 - b0) >> COL_SHIFT); | |
425 @@@@@ no optimisation here @@@@@ | |
426 add r8, r6, r0 @ R8=a0+b0 | |
427 add r9, r2, r1 @ R9=a1+b1 | |
428 mov r8, r8, asr #COL_SHIFT | |
429 mov r9, r9, asr #COL_SHIFT | |
430 strh r8, [r14, #0] | |
431 strh r9, [r14, #16] | |
432 add r8, r3, r5 @ R8=a2+b2 | |
433 add r9, r4, r7 @ R9=a3+b3 | |
434 mov r8, r8, asr #COL_SHIFT | |
435 mov r9, r9, asr #COL_SHIFT | |
436 strh r8, [r14, #32] | |
437 strh r9, [r14, #48] | |
438 sub r8, r4, r7 @ R8=a3-b3 | |
439 sub r9, r3, r5 @ R9=a2-b2 | |
440 mov r8, r8, asr #COL_SHIFT | |
441 mov r9, r9, asr #COL_SHIFT | |
442 strh r8, [r14, #64] | |
443 strh r9, [r14, #80] | |
444 sub r8, r2, r1 @ R8=a1-b1 | |
445 sub r9, r6, r0 @ R9=a0-b0 | |
446 mov r8, r8, asr #COL_SHIFT | |
447 mov r9, r9, asr #COL_SHIFT | |
448 strh r8, [r14, #96] | |
449 strh r9, [r14, #112] | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
450 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
451 __end_col_loop: |
2979 | 452 @@ at this point, R0-R11 (free) |
453 @@ R12=__const_ptr_, R14=&block[n] | |
454 ldr r0, [sp, #0] @ R0=block | |
455 teq r0, r14 @ compare current &block[n] to block, when block is reached, the loop is finished. | |
456 sub r14, r14, #2 | |
457 bne __col_loop | |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
458 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
459 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
460 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
461 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
462 __end_simple_idct_ARM: |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
463 @@ restore registers to previous status! |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
464 add sp, sp, #8 @@ the local variables! |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
465 ldmfd sp!, {r4-r11, r15} @@ update PC with LR content. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
466 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
467 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
468 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
469 @@ kind of sub-function, here not to overload the common case. |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
470 __end_bef_a_evaluation: |
2979 | 471 add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1) |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
472 mul r11, r8, r4 @ R11=W2*ROWr16[2] |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
473 sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3) |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
474 add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0) |
2979 | 475 bal __end_a_evaluation |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
476 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
477 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
478 __constant_ptr__: @@ see #defines at the beginning of the source code for values. |
2979 | 479 .align |
1347
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
480 .word W1 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
481 .word W2 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
482 .word W3 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
483 .word W4 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
484 .word W5 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
485 .word W6 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
486 .word W7 |
cca26199ab17
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
al3x
parents:
diff
changeset
|
487 .word MASK_MSHW |