annotate arm/h264dsp_init_arm.c @ 12530:63edd10ad4bc libavcodec tip

Try to fix crashes introduced by r25218 r25218 made assumptions about the existence of past reference frames that weren't necessarily true.
author darkshikari
date Tue, 28 Sep 2010 09:06:22 +0000
parents ba14e3adeccd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11499
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
1 /*
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
2 * Copyright (c) 2010 Mans Rullgard <mans@mansr.com>
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
3 *
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
4 * This file is part of FFmpeg.
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
5 *
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
10 *
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
14 * Lesser General Public License for more details.
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
15 *
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
19 */
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
20
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
21 #include <stdint.h>
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
22
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
23 #include "libavcodec/dsputil.h"
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
24 #include "libavcodec/h264dsp.h"
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
25
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
26 void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
27 int beta, int8_t *tc0);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
28 void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
29 int beta, int8_t *tc0);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
30 void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
31 int beta, int8_t *tc0);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
32 void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
33 int beta, int8_t *tc0);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
34
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
35 void ff_weight_h264_pixels_16x16_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
36 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
37 void ff_weight_h264_pixels_16x8_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
38 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
39 void ff_weight_h264_pixels_8x16_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
40 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
41 void ff_weight_h264_pixels_8x8_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
42 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
43 void ff_weight_h264_pixels_8x4_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
44 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
45 void ff_weight_h264_pixels_4x8_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
46 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
47 void ff_weight_h264_pixels_4x4_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
48 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
49 void ff_weight_h264_pixels_4x2_neon(uint8_t *ds, int stride, int log2_den,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
50 int weight, int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
51
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
52 void ff_biweight_h264_pixels_16x16_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
53 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
54 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
55 void ff_biweight_h264_pixels_16x8_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
56 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
57 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
58 void ff_biweight_h264_pixels_8x16_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
59 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
60 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
61 void ff_biweight_h264_pixels_8x8_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
62 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
63 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
64 void ff_biweight_h264_pixels_8x4_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
65 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
66 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
67 void ff_biweight_h264_pixels_4x8_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
68 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
69 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
70 void ff_biweight_h264_pixels_4x4_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
71 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
72 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
73 void ff_biweight_h264_pixels_4x2_neon(uint8_t *dst, uint8_t *src, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
74 int log2_den, int weightd, int weights,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
75 int offset);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
76
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
77 void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
78 void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
79 void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
80 DCTELEM *block, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
81 const uint8_t nnzc[6*8]);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
82 void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
83 DCTELEM *block, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
84 const uint8_t nnzc[6*8]);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
85 void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
86 DCTELEM *block, int stride,
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
87 const uint8_t nnzc[6*8]);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
88
12368
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
89 void ff_h264_idct8_add_neon(uint8_t *dst, DCTELEM *block, int stride);
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
90 void ff_h264_idct8_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
91 void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset,
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
92 DCTELEM *block, int stride,
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
93 const uint8_t nnzc[6*8]);
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
94
11499
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
95 static void ff_h264dsp_init_neon(H264DSPContext *c)
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
96 {
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
97 c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
98 c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
99 c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
100 c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
101
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
102 c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16x16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
103 c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_16x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
104 c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_8x16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
105 c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels_8x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
106 c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels_8x4_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
107 c->weight_h264_pixels_tab[5] = ff_weight_h264_pixels_4x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
108 c->weight_h264_pixels_tab[6] = ff_weight_h264_pixels_4x4_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
109 c->weight_h264_pixels_tab[7] = ff_weight_h264_pixels_4x2_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
110
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
111 c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16x16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
112 c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_16x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
113 c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_8x16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
114 c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels_8x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
115 c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels_8x4_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
116 c->biweight_h264_pixels_tab[5] = ff_biweight_h264_pixels_4x8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
117 c->biweight_h264_pixels_tab[6] = ff_biweight_h264_pixels_4x4_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
118 c->biweight_h264_pixels_tab[7] = ff_biweight_h264_pixels_4x2_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
119
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
120 c->h264_idct_add = ff_h264_idct_add_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
121 c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
122 c->h264_idct_add16 = ff_h264_idct_add16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
123 c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
124 c->h264_idct_add8 = ff_h264_idct_add8_neon;
12368
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
125 c->h264_idct8_add = ff_h264_idct8_add_neon;
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
126 c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon;
ba14e3adeccd ARM: NEON H264 8x8 IDCT
mru
parents: 11817
diff changeset
127 c->h264_idct8_add4 = ff_h264_idct8_add4_neon;
11499
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
128 }
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
129
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
130 void ff_h264dsp_init_arm(H264DSPContext *c)
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
131 {
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
132 if (HAVE_NEON) ff_h264dsp_init_neon(c);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
133 }