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 |vpx_yv12_copy_y_neon|
18 INCLUDE vpx_scale_asm_offsets.asm
20 AREA ||.text||, CODE, READONLY, ALIGN=2
22 ;void vpx_yv12_copy_y_neon(const YV12_BUFFER_CONFIG *src_ybc,
23 ; YV12_BUFFER_CONFIG *dst_ybc)
24 |vpx_yv12_copy_y_neon| PROC
28 ldr r4, [r0, #yv12_buffer_config_y_height]
29 ldr r5, [r0, #yv12_buffer_config_y_width]
30 ldr r6, [r0, #yv12_buffer_config_y_stride]
31 ldr r7, [r1, #yv12_buffer_config_y_stride]
32 ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1
33 ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1
35 ; copy two rows at one time
38 cp_src_to_dst_height_loop1
44 ble extra_copy_needed ; y_width < 128
46 cp_src_to_dst_width_loop1
47 vld1.8 {q0, q1}, [r8]!
48 vld1.8 {q8, q9}, [r10]!
49 vld1.8 {q2, q3}, [r8]!
50 vld1.8 {q10, q11}, [r10]!
51 vld1.8 {q4, q5}, [r8]!
52 vld1.8 {q12, q13}, [r10]!
53 vld1.8 {q6, q7}, [r8]!
54 vld1.8 {q14, q15}, [r10]!
58 vst1.8 {q0, q1}, [r9]!
59 vst1.8 {q8, q9}, [r11]!
60 vst1.8 {q2, q3}, [r9]!
61 vst1.8 {q10, q11}, [r11]!
62 vst1.8 {q4, q5}, [r9]!
63 vst1.8 {q12, q13}, [r11]!
64 vst1.8 {q6, q7}, [r9]!
65 vst1.8 {q14, q15}, [r11]!
67 bne cp_src_to_dst_width_loop1
70 add r2, r2, r6, lsl #1
71 add r3, r3, r7, lsl #1
73 bne cp_src_to_dst_height_loop1
76 ands r10, r5, #0x7f ;check to see if extra copy is needed
78 ldr r2, [r0, #yv12_buffer_config_y_buffer] ;srcptr1
79 ldr r3, [r1, #yv12_buffer_config_y_buffer] ;dstptr1
80 bne extra_cp_src_to_dst_width1
86 ;=============================
87 extra_cp_src_to_dst_width1
94 extra_cp_src_to_dst_height_loop1
102 extra_cp_src_to_dst_width_loop1
110 bne extra_cp_src_to_dst_width_loop1
114 add r2, r2, r6, lsl #1
115 add r3, r3, r7, lsl #1
117 bne extra_cp_src_to_dst_height_loop1
119 b end_of_cp_src_to_dst1