ARM: NEON optimised {put,avg}_h264_chroma_mc[48]
[libav.git] / libavcodec / armv4l / dsputil_neon.c
CommitLineData
569f5a75
MR
1/*
2 * ARM NEON optimised DSP functions
3 * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include <stdint.h>
23
24#include "libavcodec/avcodec.h"
25#include "libavcodec/dsputil.h"
26
27void ff_put_pixels16_neon(uint8_t *, const uint8_t *, int, int);
28void ff_put_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
29void ff_put_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int);
30void ff_put_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int);
31void ff_put_pixels8_neon(uint8_t *, const uint8_t *, int, int);
32void ff_put_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int);
33void ff_put_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int);
34void ff_put_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
35void ff_put_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
36void ff_put_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
37void ff_put_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
38void ff_put_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
39void ff_put_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
40void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
41
42void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
43
44void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
45void ff_put_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int);
46
47void ff_avg_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
48
1cce897a
MR
49void ff_put_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
50void ff_put_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
51
52void ff_avg_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
53void ff_avg_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
54
569f5a75
MR
55void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
56{
57 c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
58 c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
59 c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
60 c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
61 c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
62 c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
63 c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
64 c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
65
66 c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
67 c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
68 c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
69 c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
70 c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
71 c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
72 c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
73 c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
74
75 c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
76
1cce897a
MR
77 c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
78 c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
79
80 c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_neon;
81 c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_neon;
82
569f5a75
MR
83 c->put_h264_qpel_pixels_tab[0][0] = ff_put_h264_qpel16_mc00_neon;
84 c->put_h264_qpel_pixels_tab[1][0] = ff_put_h264_qpel8_mc00_neon;
85
86 c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon;
87}