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 EXPORT |vp8_yv12_copy_src_frame_func_neon|
17 INCLUDE asm_com_offsets.asm
19 AREA ||.text||
, CODE
, READONLY
, ALIGN=2
20 ;Note: This function is used to copy source data in src_buffer[i] at beginning of
21 ;the encoding. The buffer has a width and height of cpi->oxcf.Width and cpi->oxcf.Height,
22 ;which can be ANY numbers(NOT always multiples of 16 or 4).
24 ;void vp8_yv12_copy_src_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
26 |vp8_yv12_copy_src_frame_func_neon|
PROC
31 ldr r4
, [r0
, #yv12_buffer_config_y_height
]
32 ldr r5
, [r0
, #yv12_buffer_config_y_width
]
33 ldr r6
, [r0
, #yv12_buffer_config_y_stride
]
34 ldr r7
, [r1
, #yv12_buffer_config_y_stride
]
35 ldr r2
, [r0
, #yv12_buffer_config_y_buffer
] ;srcptr1
36 ldr r3
, [r1
, #yv12_buffer_config_y_buffer
] ;dstptr1
38 add r10
, r2
, r6
;second row src
39 add r11
, r3
, r7
;second row dst
42 sub r6
, r6
, r5
;adjust stride
45 ; copy two rows at one time
48 cp_src_to_dst_height_loop
52 vld1.8
{q0, q1}, [r2
]!
53 vld1.8
{q4, q5}, [r10
]!
54 vld1.8
{q2, q3}, [r2
]!
55 vld1.8
{q6, q7}, [r10
]!
56 vld1.8
{q8, q9}, [r2
]!
57 vld1.8
{q12, q13}, [r10
]!
58 vld1.8
{q10, q11}, [r2
]!
59 vld1.8
{q14, q15}, [r10
]!
62 vst1.8
{q0, q1}, [r3
]!
63 vst1.8
{q4, q5}, [r11
]!
64 vst1.8
{q2, q3}, [r3
]!
65 vst1.8
{q6, q7}, [r11
]!
66 vst1.8
{q8, q9}, [r3
]!
67 vst1.8
{q12, q13}, [r11
]!
68 vst1.8
{q10, q11}, [r3
]!
69 vst1.8
{q14, q15}, [r11
]!
101 bne cp_src_to_dst_height_loop
103 ;copy last line for Y if y_height is odd
109 vld1.8
{q0, q1}, [r2
]!
110 vld1.8
{q2, q3}, [r2
]!
111 vld1.8
{q8, q9}, [r2
]!
112 vld1.8
{q10, q11}, [r2
]!
115 vst1.8
{q0, q1}, [r3
]!
116 vst1.8
{q2, q3}, [r3
]!
117 vst1.8
{q8, q9}, [r3
]!
118 vst1.8
{q10, q11}, [r3
]!
119 bhs cp_width_128_loop_1
129 bhs cp_width_8_loop_1
138 bne cp_width_1_loop_1
142 ldr r4
, [r0
, #yv12_buffer_config_uv_height
]
143 ldr r5
, [r0
, #yv12_buffer_config_uv_width
]
144 ldr r6
, [r0
, #yv12_buffer_config_uv_stride
]
145 ldr r7
, [r1
, #yv12_buffer_config_uv_stride
]
146 ldr r2
, [r0
, #yv12_buffer_config_u_buffer
] ;srcptr1
147 ldr r3
, [r1
, #yv12_buffer_config_u_buffer
] ;dstptr1
149 add r10
, r2
, r6
;second row src
150 add r11
, r3
, r7
;second row dst
153 sub r6
, r6
, r5
;adjust stride
159 ;copy two rows at one time
162 cp_src_to_dst_height_uv_loop
166 vld1.8
{q0, q1}, [r2
]!
167 vld1.8
{q4, q5}, [r10
]!
168 vld1.8
{q2, q3}, [r2
]!
169 vld1.8
{q6, q7}, [r10
]!
172 vst1.8
{q0, q1}, [r3
]!
173 vst1.8
{q4, q5}, [r11
]!
174 vst1.8
{q2, q3}, [r3
]!
175 vst1.8
{q6, q7}, [r11
]!
176 bhs cp_width_uv_64_loop
188 bhs cp_width_uv_8_loop
199 bne cp_width_uv_1_loop
207 bne cp_src_to_dst_height_uv_loop
209 ;copy last line for U & V if uv_height is odd
211 beq cp_width_uv_done_1
214 cp_width_uv_64_loop_1
215 vld1.8
{q0, q1}, [r2
]!
216 vld1.8
{q2, q3}, [r2
]!
219 vst1.8
{q0, q1}, [r3
]!
220 vst1.8
{q2, q3}, [r3
]!
221 bhs cp_width_uv_64_loop_1
224 beq cp_width_uv_done_1
231 bhs cp_width_uv_8_loop_1
234 beq cp_width_uv_done_1
240 bne cp_width_uv_1_loop_1
244 ldrne r2
, [r0
, #yv12_buffer_config_v_buffer
] ;srcptr1
245 ldrne r3
, [r1
, #yv12_buffer_config_v_buffer
] ;dstptr1
246 ldrne r10
, [r0
, #yv12_buffer_config_uv_stride
]
247 ldrne r11
, [r1
, #yv12_buffer_config_uv_stride
]
249 addne r10
, r2
, r10
;second row src
250 addne r11
, r3
, r11
;second row dst