annotate arm/h264dsp_init_arm.c @ 11762:91b9bd17e79c libavcodec

aacenc: Trellis over scalefactors using an estimated codebook rather than every codebook. The minimal codebook to encode the band without clipping is used (as is done in the TLS).
author alexc
date Tue, 25 May 2010 18:31:55 +0000
parents 2a4dc3c0b012
children 21566c95834c
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
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
89 #if HAVE_NEON
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
90 static void ff_h264dsp_init_neon(H264DSPContext *c)
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
91 {
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
92 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
93 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
94 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
95 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
96
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
97 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
98 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
99 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
100 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
101 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
102 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
103 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
104 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
105
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
106 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
107 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
108 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
109 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
110 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
111 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
112 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
113 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
114
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
115 c->h264_idct_add = ff_h264_idct_add_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
116 c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
117 c->h264_idct_add16 = ff_h264_idct_add16_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
118 c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
119 c->h264_idct_add8 = ff_h264_idct_add8_neon;
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
120 }
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
121 #endif
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
122
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
123 void ff_h264dsp_init_arm(H264DSPContext *c)
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
124 {
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
125 if (HAVE_NEON) ff_h264dsp_init_neon(c);
2a4dc3c0b012 Move H264 dsputil functions into their own struct
mru
parents:
diff changeset
126 }