2 * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
4 * This file is part of FFmpeg.
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "libavutil/arm/asm.S"
23 .macro call_2x_pixels type, subp
24 function ff_\type\()_pixels16\subp\()_armv6, export=1
26 bl X(ff_\type\()_pixels8\subp\()_armv6)
30 b X(ff_\type\()_pixels8\subp\()_armv6)
35 call_2x_pixels put, _x2
36 call_2x_pixels put, _y2
37 call_2x_pixels put, _x2_no_rnd
38 call_2x_pixels put, _y2_no_rnd
40 function ff_put_pixels16_armv6, export=1
49 strd_post r4, r5, r0, r2
53 strd r10, r11, [r0, #8]
55 strd_post r8, r9, r0, r2
62 function ff_put_pixels8_armv6, export=1
68 strd_post r4, r5, r0, r2
71 strd_post r6, r7, r0, r2
78 function ff_put_pixels8_x2_armv6, export=1
81 orr r12, r12, r12, lsl #8
82 orr r12, r12, r12, lsl #16
90 orr r6, r6, r5, lsl #24
95 orr r10, r10, r9, lsl #24
111 strd_post r4, r5, r0, r2
113 strd_post r8, r9, r0, r2
119 function ff_put_pixels8_y2_armv6, export=1
122 orr r12, r12, r12, lsl #8
123 orr r12, r12, r12, lsl #16
149 strd_post r8, r9, r0, r2
151 strd_post r10, r11, r0, r2
158 function ff_put_pixels8_x2_no_rnd_armv6, export=1
170 orr r6, r6, r5, lsl #24
172 orr r12, r12, r9, lsl #24
186 function ff_put_pixels8_y2_no_rnd_armv6, export=1
211 function ff_avg_pixels8_armv6, export=1
215 orr lr, lr, lr, lsl #8
216 orr lr, lr, lr, lsl #16
226 ldrd_reg r6, r7, r0, r2
238 strd_post r4, r5, r0, r2
242 ldrd_reg r4, r5, r0, r2
249 strd_post r6, r7, r0, r2
256 strd_post r6, r7, r0, r2