| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; Copyright (c) 2011 The WebM project authors. All Rights Reserved. | 2 ; Copyright (c) 2011 The WebM project authors. All Rights Reserved. |
| 3 ; | 3 ; |
| 4 ; Use of this source code is governed by a BSD-style license | 4 ; Use of this source code is governed by a BSD-style license |
| 5 ; that can be found in the LICENSE file in the root of the source | 5 ; that can be found in the LICENSE file in the root of the source |
| 6 ; tree. An additional intellectual property rights grant can be found | 6 ; tree. An additional intellectual property rights grant can be found |
| 7 ; in the file PATENTS. All contributing project authors may | 7 ; in the file PATENTS. All contributing project authors may |
| 8 ; be found in the AUTHORS file in the root of the source tree. | 8 ; be found in the AUTHORS file in the root of the source tree. |
| 9 ; | 9 ; |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 usub8 r6, r5, r4 ; calculate difference with reversed operands | 51 usub8 r6, r5, r4 ; calculate difference with reversed operands |
| 52 pld [r2, r3, lsl #1] | 52 pld [r2, r3, lsl #1] |
| 53 sel r6, r6, lr ; select bytes with negative difference | 53 sel r6, r6, lr ; select bytes with negative difference |
| 54 | 54 |
| 55 ; calculate partial sums | 55 ; calculate partial sums |
| 56 usad8 r4, r7, lr ; calculate sum of positive differences | 56 usad8 r4, r7, lr ; calculate sum of positive differences |
| 57 usad8 r5, r6, lr ; calculate sum of negative differences | 57 usad8 r5, r6, lr ; calculate sum of negative differences |
| 58 orr r6, r6, r7 ; differences of all 4 pixels | 58 orr r6, r6, r7 ; differences of all 4 pixels |
| 59 ; calculate total sum | 59 ; calculate total sum |
| 60 adds r8, r8, r4 ; add positive differences to sum | 60 adds r8, r8, r4 ; add positive differences to sum |
| 61 subs r8, r8, r5 ; substract negative differences from sum | 61 subs r8, r8, r5 ; subtract negative differences from sum |
| 62 | 62 |
| 63 ; calculate sse | 63 ; calculate sse |
| 64 uxtb16 r5, r6 ; byte (two pixels) to halfwords | 64 uxtb16 r5, r6 ; byte (two pixels) to halfwords |
| 65 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords | 65 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords |
| 66 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) | 66 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) |
| 67 | 67 |
| 68 ; 2nd 4 pixels | 68 ; 2nd 4 pixels |
| 69 ldr r4, [r0, #4] ; load 4 src pixels | 69 ldr r4, [r0, #4] ; load 4 src pixels |
| 70 ldr r6, [r0, #5] ; load 4 src pixels with 1 byte offset | 70 ldr r6, [r0, #5] ; load 4 src pixels with 1 byte offset |
| 71 ldr r5, [r2, #4] ; load 4 ref pixels | 71 ldr r5, [r2, #4] ; load 4 ref pixels |
| (...skipping 10 matching lines...) Expand all Loading... |
| 82 usub8 r6, r5, r4 ; calculate difference with reversed operands | 82 usub8 r6, r5, r4 ; calculate difference with reversed operands |
| 83 sel r6, r6, lr ; select bytes with negative difference | 83 sel r6, r6, lr ; select bytes with negative difference |
| 84 | 84 |
| 85 ; calculate partial sums | 85 ; calculate partial sums |
| 86 usad8 r4, r7, lr ; calculate sum of positive differences | 86 usad8 r4, r7, lr ; calculate sum of positive differences |
| 87 usad8 r5, r6, lr ; calculate sum of negative differences | 87 usad8 r5, r6, lr ; calculate sum of negative differences |
| 88 orr r6, r6, r7 ; differences of all 4 pixels | 88 orr r6, r6, r7 ; differences of all 4 pixels |
| 89 | 89 |
| 90 ; calculate total sum | 90 ; calculate total sum |
| 91 add r8, r8, r4 ; add positive differences to sum | 91 add r8, r8, r4 ; add positive differences to sum |
| 92 sub r8, r8, r5 ; substract negative differences from sum | 92 sub r8, r8, r5 ; subtract negative differences from sum |
| 93 | 93 |
| 94 ; calculate sse | 94 ; calculate sse |
| 95 uxtb16 r5, r6 ; byte (two pixels) to halfwords | 95 uxtb16 r5, r6 ; byte (two pixels) to halfwords |
| 96 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords | 96 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords |
| 97 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) | 97 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) |
| 98 | 98 |
| 99 ; 3rd 4 pixels | 99 ; 3rd 4 pixels |
| 100 ldr r4, [r0, #8] ; load 4 src pixels | 100 ldr r4, [r0, #8] ; load 4 src pixels |
| 101 ldr r6, [r0, #9] ; load 4 src pixels with 1 byte offset | 101 ldr r6, [r0, #9] ; load 4 src pixels with 1 byte offset |
| 102 ldr r5, [r2, #8] ; load 4 ref pixels | 102 ldr r5, [r2, #8] ; load 4 ref pixels |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 usub8 r6, r5, r4 ; calculate difference with reversed operands | 113 usub8 r6, r5, r4 ; calculate difference with reversed operands |
| 114 sel r6, r6, lr ; select bytes with negative difference | 114 sel r6, r6, lr ; select bytes with negative difference |
| 115 | 115 |
| 116 ; calculate partial sums | 116 ; calculate partial sums |
| 117 usad8 r4, r7, lr ; calculate sum of positive differences | 117 usad8 r4, r7, lr ; calculate sum of positive differences |
| 118 usad8 r5, r6, lr ; calculate sum of negative differences | 118 usad8 r5, r6, lr ; calculate sum of negative differences |
| 119 orr r6, r6, r7 ; differences of all 4 pixels | 119 orr r6, r6, r7 ; differences of all 4 pixels |
| 120 | 120 |
| 121 ; calculate total sum | 121 ; calculate total sum |
| 122 add r8, r8, r4 ; add positive differences to sum | 122 add r8, r8, r4 ; add positive differences to sum |
| 123 sub r8, r8, r5 ; substract negative differences from sum | 123 sub r8, r8, r5 ; subtract negative differences from sum |
| 124 | 124 |
| 125 ; calculate sse | 125 ; calculate sse |
| 126 uxtb16 r5, r6 ; byte (two pixels) to halfwords | 126 uxtb16 r5, r6 ; byte (two pixels) to halfwords |
| 127 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords | 127 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords |
| 128 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) | 128 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) |
| 129 | 129 |
| 130 ; 4th 4 pixels | 130 ; 4th 4 pixels |
| 131 ldr r4, [r0, #12] ; load 4 src pixels | 131 ldr r4, [r0, #12] ; load 4 src pixels |
| 132 ldr r6, [r0, #13] ; load 4 src pixels with 1 byte offset | 132 ldr r6, [r0, #13] ; load 4 src pixels with 1 byte offset |
| 133 ldr r5, [r2, #12] ; load 4 ref pixels | 133 ldr r5, [r2, #12] ; load 4 ref pixels |
| (...skipping 12 matching lines...) Expand all Loading... |
| 146 add r2, r2, r3 ; set dst_ptr to next row | 146 add r2, r2, r3 ; set dst_ptr to next row |
| 147 sel r6, r6, lr ; select bytes with negative difference | 147 sel r6, r6, lr ; select bytes with negative difference |
| 148 | 148 |
| 149 ; calculate partial sums | 149 ; calculate partial sums |
| 150 usad8 r4, r7, lr ; calculate sum of positive differences | 150 usad8 r4, r7, lr ; calculate sum of positive differences |
| 151 usad8 r5, r6, lr ; calculate sum of negative differences | 151 usad8 r5, r6, lr ; calculate sum of negative differences |
| 152 orr r6, r6, r7 ; differences of all 4 pixels | 152 orr r6, r6, r7 ; differences of all 4 pixels |
| 153 | 153 |
| 154 ; calculate total sum | 154 ; calculate total sum |
| 155 add r8, r8, r4 ; add positive differences to sum | 155 add r8, r8, r4 ; add positive differences to sum |
| 156 sub r8, r8, r5 ; substract negative differences from sum | 156 sub r8, r8, r5 ; subtract negative differences from sum |
| 157 | 157 |
| 158 ; calculate sse | 158 ; calculate sse |
| 159 uxtb16 r5, r6 ; byte (two pixels) to halfwords | 159 uxtb16 r5, r6 ; byte (two pixels) to halfwords |
| 160 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords | 160 uxtb16 r7, r6, ror #8 ; another two pixels to halfwords |
| 161 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) | 161 smlad r11, r5, r5, r11 ; dual signed multiply, add and accumulate (1) |
| 162 smlad r11, r7, r7, r11 ; dual signed multiply, add and accumulate (2) | 162 smlad r11, r7, r7, r11 ; dual signed multiply, add and accumulate (2) |
| 163 | 163 |
| 164 subs r12, r12, #1 | 164 subs r12, r12, #1 |
| 165 | 165 |
| 166 bne loop | 166 bne loop |
| 167 | 167 |
| 168 ; return stuff | 168 ; return stuff |
| 169 ldr r6, [sp, #40] ; get address of sse | 169 ldr r6, [sp, #40] ; get address of sse |
| 170 mul r0, r8, r8 ; sum * sum | 170 mul r0, r8, r8 ; sum * sum |
| 171 str r11, [r6] ; store sse | 171 str r11, [r6] ; store sse |
| 172 sub r0, r11, r0, lsr #8 ; return (sse - ((sum * sum) >> 8)) | 172 sub r0, r11, r0, lsr #8 ; return (sse - ((sum * sum) >> 8)) |
| 173 | 173 |
| 174 ldmfd sp!, {r4-r12, pc} | 174 ldmfd sp!, {r4-r12, pc} |
| 175 | 175 |
| 176 ENDP | 176 ENDP |
| 177 | 177 |
| 178 c80808080 | 178 c80808080 |
| 179 DCD 0x80808080 | 179 DCD 0x80808080 |
| 180 | 180 |
| 181 END | 181 END |
| 182 | 182 |
| OLD | NEW |