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_frame_func_neon|
17 INCLUDE asm_com_offsets.asm
19 AREA ||.text||
, CODE
, READONLY
, ALIGN=2
21 ;void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
23 |vp8_yv12_copy_frame_func_neon|
PROC
30 ldr r8
, [r0
, #yv12_buffer_config_u_buffer
] ;srcptr1
31 ldr r9
, [r1
, #yv12_buffer_config_u_buffer
] ;srcptr1
32 ldr r10
, [r0
, #yv12_buffer_config_v_buffer
] ;srcptr1
33 ldr r11
, [r1
, #yv12_buffer_config_v_buffer
] ;srcptr1
35 ldr r4
, [r0
, #yv12_buffer_config_y_height
]
36 ldr r5
, [r0
, #yv12_buffer_config_y_width
]
37 ldr r6
, [r0
, #yv12_buffer_config_y_stride
]
38 ldr r7
, [r1
, #yv12_buffer_config_y_stride
]
39 ldr r2
, [r0
, #yv12_buffer_config_y_buffer
] ;srcptr1
40 ldr r3
, [r1
, #yv12_buffer_config_y_buffer
] ;dstptr1
47 ; copy two rows at one time
50 cp_src_to_dst_height_loop
57 cp_src_to_dst_width_loop
58 vld1.8
{q0, q1}, [r8
]!
59 vld1.8
{q8, q9}, [r10
]!
60 vld1.8
{q2, q3}, [r8
]!
61 vld1.8
{q10, q11}, [r10
]!
62 vld1.8
{q4, q5}, [r8
]!
63 vld1.8
{q12, q13}, [r10
]!
64 vld1.8
{q6, q7}, [r8
]!
65 vld1.8
{q14, q15}, [r10
]!
69 vst1.8
{q0, q1}, [r9
]!
70 vst1.8
{q8, q9}, [r11
]!
71 vst1.8
{q2, q3}, [r9
]!
72 vst1.8
{q10, q11}, [r11
]!
73 vst1.8
{q4, q5}, [r9
]!
74 vst1.8
{q12, q13}, [r11
]!
75 vst1.8
{q6, q7}, [r9
]!
76 vst1.8
{q14, q15}, [r11
]!
78 bne cp_src_to_dst_width_loop
81 add r2
, r2
, r6
, lsl #
1
82 add r3
, r3
, r7
, lsl #
1
84 bne cp_src_to_dst_height_loop
86 ands r10
, r5
, #
0x7f ;check to see if extra copy is needed
88 ldr r2
, [r0
, #yv12_buffer_config_y_buffer
] ;srcptr1
89 ldr r3
, [r1
, #yv12_buffer_config_y_buffer
] ;dstptr1
90 bne extra_cp_src_to_dst_width
95 ldr r3
, [sp, #
4] ;dstptr1
96 mov r4
, r4
, lsr #
1 ;src uv_height
97 mov r5
, r5
, lsr #
1 ;src uv_width
98 mov r6
, r6
, lsr #
1 ;src uv_stride
99 mov r7
, r7
, lsr #
1 ;dst uv_stride
105 ;copy two rows at one time
108 cp_src_to_dst_height_uv_loop
115 cp_src_to_dst_width_uv_loop
116 vld1.8
{q0, q1}, [r8
]!
117 vld1.8
{q8, q9}, [r10
]!
118 vld1.8
{q2, q3}, [r8
]!
119 vld1.8
{q10, q11}, [r10
]!
123 vst1.8
{q0, q1}, [r9
]!
124 vst1.8
{q8, q9}, [r11
]!
125 vst1.8
{q2, q3}, [r9
]!
126 vst1.8
{q10, q11}, [r11
]!
128 bne cp_src_to_dst_width_uv_loop
131 add r2
, r2
, r6
, lsl #
1
132 add r3
, r3
, r7
, lsl #
1
134 bne cp_src_to_dst_height_uv_loop
136 ands r10
, r5
, #
0x3f ;check to see if extra copy is needed
138 ldr r2
, [sp] ;srcptr1
139 ldr r3
, [sp, #
4] ;dstptr1
140 bne extra_cp_src_to_dst_uv_width
141 end_of_cp_src_to_dst_uv
147 ldrne r2
, [sp] ;srcptr1
148 ldrne r3
, [sp, #
4] ;dstptr1
157 ;=============================
158 extra_cp_src_to_dst_width
165 extra_cp_src_to_dst_height_loop
173 extra_cp_src_to_dst_width_loop
181 bne extra_cp_src_to_dst_width_loop
185 add r2
, r2
, r6
, lsl #
1
186 add r3
, r3
, r7
, lsl #
1
188 bne extra_cp_src_to_dst_height_loop
190 b end_of_cp_src_to_dst
192 ;=================================
193 extra_cp_src_to_dst_uv_width
200 extra_cp_src_to_dst_height_uv_loop
208 extra_cp_src_to_dst_width_uv_loop
216 bne extra_cp_src_to_dst_width_uv_loop
220 add r2
, r2
, r6
, lsl #
1
221 add r3
, r3
, r7
, lsl #
1
223 bne extra_cp_src_to_dst_height_uv_loop
225 b end_of_cp_src_to_dst_uv