• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2016 Google Inc.
3 *
4 * This file is part of FFmpeg.
5 *
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.
10 *
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.
15 *
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
19 */
20
21#include "libavutil/aarch64/asm.S"
22
23// All public functions in this file have the following signature:
24// typedef void (*vp9_mc_func)(uint8_t *dst, ptrdiff_t dst_stride,
25//                            const uint8_t *ref, ptrdiff_t ref_stride,
26//                            int h, int mx, int my);
27
28function ff_vp9_copy128_aarch64, export=1
291:
30        ldp             x5,  x6,  [x2]
31        ldp             x7,  x8,  [x2, #16]
32        stp             x5,  x6,  [x0]
33        ldp             x9,  x10, [x2, #32]
34        stp             x7,  x8,  [x0, #16]
35        subs            w4,  w4,  #1
36        ldp             x11, x12, [x2, #48]
37        stp             x9,  x10, [x0, #32]
38        stp             x11, x12, [x0, #48]
39        ldp             x5,  x6,  [x2, #64]
40        ldp             x7,  x8,  [x2, #80]
41        stp             x5,  x6,  [x0, #64]
42        ldp             x9,  x10, [x2, #96]
43        stp             x7,  x8,  [x0, #80]
44        ldp             x11, x12, [x2, #112]
45        stp             x9,  x10, [x0, #96]
46        stp             x11, x12, [x0, #112]
47        add             x2,  x2,  x3
48        add             x0,  x0,  x1
49        b.ne            1b
50        ret
51endfunc
52
53function ff_vp9_copy64_aarch64, export=1
541:
55        ldp             x5,  x6,  [x2]
56        ldp             x7,  x8,  [x2, #16]
57        stp             x5,  x6,  [x0]
58        ldp             x9,  x10, [x2, #32]
59        stp             x7,  x8,  [x0, #16]
60        subs            w4,  w4,  #1
61        ldp             x11, x12, [x2, #48]
62        stp             x9,  x10, [x0, #32]
63        stp             x11, x12, [x0, #48]
64        add             x2,  x2,  x3
65        add             x0,  x0,  x1
66        b.ne            1b
67        ret
68endfunc
69
70function ff_vp9_copy32_aarch64, export=1
711:
72        ldp             x5,  x6,  [x2]
73        ldp             x7,  x8,  [x2, #16]
74        stp             x5,  x6,  [x0]
75        subs            w4,  w4,  #1
76        stp             x7,  x8,  [x0, #16]
77        add             x2,  x2,  x3
78        add             x0,  x0,  x1
79        b.ne            1b
80        ret
81endfunc
82