Removed unused vp8_recon_intra4x4mb function
[libvpx.git] / vp8 / encoder / ppc / encodemb_altivec.asm
blob6e0099ddc885859ef8412ab85ce621eb36b6b636
2 ; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 ; tree. An additional intellectual property rights grant can be found
7 ; in the file PATENTS. All contributing project authors may
8 ; be found in the AUTHORS file in the root of the source tree.
12 .globl vp8_subtract_mbuv_ppc
13 .globl vp8_subtract_mby_ppc
15 ;# r3 short *diff
16 ;# r4 unsigned char *usrc
17 ;# r5 unsigned char *vsrc
18 ;# r6 unsigned char *pred
19 ;# r7 int stride
20 vp8_subtract_mbuv_ppc:
21 mfspr r11, 256 ;# get old VRSAVE
22 oris r12, r11, 0xf000
23 mtspr 256, r12 ;# set VRSAVE
25 li r9, 256
26 add r3, r3, r9
27 add r3, r3, r9
28 add r6, r6, r9
30 li r10, 16
31 li r9, 4
32 mtctr r9
34 vspltisw v0, 0
36 mbu_loop:
37 lvsl v5, 0, r4 ;# permutate value for alignment
38 lvx v1, 0, r4 ;# src
39 lvx v2, 0, r6 ;# pred
41 add r4, r4, r7
42 addi r6, r6, 16
44 vperm v1, v1, v0, v5
46 vmrghb v3, v0, v1 ;# unpack high src to short
47 vmrghb v4, v0, v2 ;# unpack high pred to short
49 lvsl v5, 0, r4 ;# permutate value for alignment
50 lvx v1, 0, r4 ;# src
52 add r4, r4, r7
54 vsubshs v3, v3, v4
56 stvx v3, 0, r3 ;# store out diff
58 vperm v1, v1, v0, v5
60 vmrghb v3, v0, v1 ;# unpack high src to short
61 vmrglb v4, v0, v2 ;# unpack high pred to short
63 vsubshs v3, v3, v4
65 stvx v3, r10, r3 ;# store out diff
67 addi r3, r3, 32
69 bdnz mbu_loop
71 mtctr r9
73 mbv_loop:
74 lvsl v5, 0, r5 ;# permutate value for alignment
75 lvx v1, 0, r5 ;# src
76 lvx v2, 0, r6 ;# pred
78 add r5, r5, r7
79 addi r6, r6, 16
81 vperm v1, v1, v0, v5
83 vmrghb v3, v0, v1 ;# unpack high src to short
84 vmrghb v4, v0, v2 ;# unpack high pred to short
86 lvsl v5, 0, r5 ;# permutate value for alignment
87 lvx v1, 0, r5 ;# src
89 add r5, r5, r7
91 vsubshs v3, v3, v4
93 stvx v3, 0, r3 ;# store out diff
95 vperm v1, v1, v0, v5
97 vmrghb v3, v0, v1 ;# unpack high src to short
98 vmrglb v4, v0, v2 ;# unpack high pred to short
100 vsubshs v3, v3, v4
102 stvx v3, r10, r3 ;# store out diff
104 addi r3, r3, 32
106 bdnz mbv_loop
108 mtspr 256, r11 ;# reset old VRSAVE
112 ;# r3 short *diff
113 ;# r4 unsigned char *src
114 ;# r5 unsigned char *pred
115 ;# r6 int stride
116 vp8_subtract_mby_ppc:
117 mfspr r11, 256 ;# get old VRSAVE
118 oris r12, r11, 0xf800
119 mtspr 256, r12 ;# set VRSAVE
121 li r10, 16
122 mtctr r10
124 vspltisw v0, 0
126 mby_loop:
127 lvx v1, 0, r4 ;# src
128 lvx v2, 0, r5 ;# pred
130 add r4, r4, r6
131 addi r5, r5, 16
133 vmrghb v3, v0, v1 ;# unpack high src to short
134 vmrghb v4, v0, v2 ;# unpack high pred to short
136 vsubshs v3, v3, v4
138 stvx v3, 0, r3 ;# store out diff
140 vmrglb v3, v0, v1 ;# unpack low src to short
141 vmrglb v4, v0, v2 ;# unpack low pred to short
143 vsubshs v3, v3, v4
145 stvx v3, r10, r3 ;# store out diff
147 addi r3, r3, 32
149 bdnz mby_loop
151 mtspr 256, r11 ;# reset old VRSAVE