Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: source/libvpx/vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm

Issue 7671004: Update libvpx snapshot to v0.9.7-p1 (Cayuga). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 11
12 EXPORT |vp8_variance_halfpixvar16x16_h_armv6| 12 EXPORT |vp8_variance_halfpixvar16x16_h_armv6|
13 13
14 ARM 14 ARM
15 REQUIRE8 15 REQUIRE8
16 PRESERVE8 16 PRESERVE8
17 17
18 AREA ||.text||, CODE, READONLY, ALIGN=2 18 AREA ||.text||, CODE, READONLY, ALIGN=2
19 19
20 ; r0 unsigned char *src_ptr 20 ; r0 unsigned char *src_ptr
21 ; r1 int source_stride 21 ; r1 int source_stride
22 ; r2 unsigned char *ref_ptr 22 ; r2 unsigned char *ref_ptr
23 ; r3 int recon_stride 23 ; r3 int recon_stride
24 ; stack unsigned int *sse 24 ; stack unsigned int *sse
25 |vp8_variance_halfpixvar16x16_h_armv6| PROC 25 |vp8_variance_halfpixvar16x16_h_armv6| PROC
26 26
27 stmfd sp!, {r4-r12, lr} 27 stmfd sp!, {r4-r12, lr}
28
29 pld [r0, r1, lsl #0]
30 pld [r2, r3, lsl #0]
31
28 mov r8, #0 ; initialize sum = 0 32 mov r8, #0 ; initialize sum = 0
29 ldr r10, c80808080 33 ldr r10, c80808080
30 mov r11, #0 ; initialize sse = 0 34 mov r11, #0 ; initialize sse = 0
31 mov r12, #16 ; set loop counter to 16 (=block height) 35 mov r12, #16 ; set loop counter to 16 (=block height)
32 mov lr, #0 ; constant zero 36 mov lr, #0 ; constant zero
33 loop 37 loop
34 ; 1st 4 pixels 38 ; 1st 4 pixels
35 ldr r4, [r0, #0] ; load 4 src pixels 39 ldr r4, [r0, #0] ; load 4 src pixels
36 ldr r6, [r0, #1] ; load 4 src pixels with 1 byte offset 40 ldr r6, [r0, #1] ; load 4 src pixels with 1 byte offset
37 ldr r5, [r2, #0] ; load 4 ref pixels 41 ldr r5, [r2, #0] ; load 4 ref pixels
38 42
39 ; bilinear interpolation 43 ; bilinear interpolation
40 mvn r6, r6 44 mvn r6, r6
41 uhsub8 r4, r4, r6 45 uhsub8 r4, r4, r6
42 eor r4, r4, r10 46 eor r4, r4, r10
43 47
44 usub8 r6, r4, r5 ; calculate difference 48 usub8 r6, r4, r5 ; calculate difference
49 pld [r0, r1, lsl #1]
45 sel r7, r6, lr ; select bytes with positive difference 50 sel r7, r6, lr ; select bytes with positive difference
46 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]
47 sel r6, r6, lr ; select bytes with negative difference 53 sel r6, r6, lr ; select bytes with negative difference
48 54
49 ; calculate partial sums 55 ; calculate partial sums
50 usad8 r4, r7, lr ; calculate sum of positive differences 56 usad8 r4, r7, lr ; calculate sum of positive differences
51 usad8 r5, r6, lr ; calculate sum of negative differences 57 usad8 r5, r6, lr ; calculate sum of negative differences
52 orr r6, r6, r7 ; differences of all 4 pixels 58 orr r6, r6, r7 ; differences of all 4 pixels
53 ; calculate total sum 59 ; calculate total sum
54 adds r8, r8, r4 ; add positive differences to sum 60 adds r8, r8, r4 ; add positive differences to sum
55 subs r8, r8, r5 ; substract negative differences from sum 61 subs r8, r8, r5 ; substract negative differences from sum
56 62
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 173
168 ldmfd sp!, {r4-r12, pc} 174 ldmfd sp!, {r4-r12, pc}
169 175
170 ENDP 176 ENDP
171 177
172 c80808080 178 c80808080
173 DCD 0x80808080 179 DCD 0x80808080
174 180
175 END 181 END
176 182
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698