1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
/*
* Copyright (c) 2019, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AOM_AV1_ENCODER_RDOPT_DATA_DEFS_H_
#define AOM_AV1_ENCODER_RDOPT_DATA_DEFS_H_
#ifdef __cplusplus
extern "C" {
#endif
static const THR_MODES intra_to_mode_idx[INTRA_MODE_NUM] = {
THR_DC, // DC_PRED,
THR_V_PRED, // V_PRED,
THR_H_PRED, // H_PRED,
THR_D45_PRED, // D45_PRED,
THR_D135_PRED, // D135_PRED,
THR_D113_PRED, // D113_PRED,
THR_D157_PRED, // D157_PRED,
THR_D203_PRED, // D203_PRED,
THR_D67_PRED, // D67_PRED,
THR_SMOOTH, // SMOOTH_PRED,
THR_SMOOTH_V, // SMOOTH_V_PRED,
THR_SMOOTH_H, // SMOOTH_H_PRED,
THR_PAETH, // PAETH_PRED,
};
/* clang-format off */
static const THR_MODES single_inter_to_mode_idx[SINGLE_INTER_MODE_NUM]
[REF_FRAMES] = {
// NEARESTMV,
{ THR_INVALID, THR_NEARESTMV, THR_NEARESTL2, THR_NEARESTL3,
THR_NEARESTG, THR_NEARESTB, THR_NEARESTA2, THR_NEARESTA, },
// NEARMV,
{ THR_INVALID, THR_NEARMV, THR_NEARL2, THR_NEARL3,
THR_NEARG, THR_NEARB, THR_NEARA2, THR_NEARA, },
// GLOBALMV,
{ THR_INVALID, THR_GLOBALMV, THR_GLOBALL2, THR_GLOBALL3,
THR_GLOBALG, THR_GLOBALB, THR_GLOBALA2, THR_GLOBALA, },
// NEWMV,
{ THR_INVALID, THR_NEWMV, THR_NEWL2, THR_NEWL3,
THR_NEWG, THR_NEWB, THR_NEWA2, THR_NEWA, },
};
/* clang-format on */
/* clang-format off */
static const THR_MODES comp_inter_to_mode_idx[COMP_INTER_MODE_NUM][REF_FRAMES]
[REF_FRAMES] = {
// NEAREST_NEARESTMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEAREST_NEARESTLL2, THR_COMP_NEAREST_NEARESTLL3,
THR_COMP_NEAREST_NEARESTLG, THR_COMP_NEAREST_NEARESTLB,
THR_COMP_NEAREST_NEARESTLA2, THR_COMP_NEAREST_NEARESTLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEARESTL2B,
THR_COMP_NEAREST_NEARESTL2A2, THR_COMP_NEAREST_NEARESTL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEARESTL3B,
THR_COMP_NEAREST_NEARESTL3A2, THR_COMP_NEAREST_NEARESTL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEARESTGB,
THR_COMP_NEAREST_NEARESTGA2, THR_COMP_NEAREST_NEARESTGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEARESTBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEAR_NEARMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEAR_NEARLL2, THR_COMP_NEAR_NEARLL3,
THR_COMP_NEAR_NEARLG, THR_COMP_NEAR_NEARLB,
THR_COMP_NEAR_NEARLA2, THR_COMP_NEAR_NEARLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEARL2B,
THR_COMP_NEAR_NEARL2A2, THR_COMP_NEAR_NEARL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEARL3B,
THR_COMP_NEAR_NEARL3A2, THR_COMP_NEAR_NEARL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEARGB,
THR_COMP_NEAR_NEARGA2, THR_COMP_NEAR_NEARGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEARBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEAREST_NEWMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEAREST_NEWLL2, THR_COMP_NEAREST_NEWLL3,
THR_COMP_NEAREST_NEWLG, THR_COMP_NEAREST_NEWLB,
THR_COMP_NEAREST_NEWLA2, THR_COMP_NEAREST_NEWLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEWL2B,
THR_COMP_NEAREST_NEWL2A2, THR_COMP_NEAREST_NEWL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEWL3B,
THR_COMP_NEAREST_NEWL3A2, THR_COMP_NEAREST_NEWL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEWGB,
THR_COMP_NEAREST_NEWGA2, THR_COMP_NEAREST_NEWGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAREST_NEWBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEW_NEARESTMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEW_NEARESTLL2, THR_COMP_NEW_NEARESTLL3,
THR_COMP_NEW_NEARESTLG, THR_COMP_NEW_NEARESTLB,
THR_COMP_NEW_NEARESTLA2, THR_COMP_NEW_NEARESTLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARESTL2B,
THR_COMP_NEW_NEARESTL2A2, THR_COMP_NEW_NEARESTL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARESTL3B,
THR_COMP_NEW_NEARESTL3A2, THR_COMP_NEW_NEARESTL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARESTGB,
THR_COMP_NEW_NEARESTGA2, THR_COMP_NEW_NEARESTGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARESTBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEAR_NEWMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEAR_NEWLL2, THR_COMP_NEAR_NEWLL3,
THR_COMP_NEAR_NEWLG, THR_COMP_NEAR_NEWLB,
THR_COMP_NEAR_NEWLA2, THR_COMP_NEAR_NEWLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEWL2B,
THR_COMP_NEAR_NEWL2A2, THR_COMP_NEAR_NEWL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEWL3B,
THR_COMP_NEAR_NEWL3A2, THR_COMP_NEAR_NEWL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEWGB,
THR_COMP_NEAR_NEWGA2, THR_COMP_NEAR_NEWGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEAR_NEWBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEW_NEARMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEW_NEARLL2, THR_COMP_NEW_NEARLL3,
THR_COMP_NEW_NEARLG, THR_COMP_NEW_NEARLB,
THR_COMP_NEW_NEARLA2, THR_COMP_NEW_NEARLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARL2B,
THR_COMP_NEW_NEARL2A2, THR_COMP_NEW_NEARL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARL3B,
THR_COMP_NEW_NEARL3A2, THR_COMP_NEW_NEARL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARGB,
THR_COMP_NEW_NEARGA2, THR_COMP_NEW_NEARGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEARBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// GLOBAL_GLOBALMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_GLOBAL_GLOBALLL2, THR_COMP_GLOBAL_GLOBALLL3,
THR_COMP_GLOBAL_GLOBALLG, THR_COMP_GLOBAL_GLOBALLB,
THR_COMP_GLOBAL_GLOBALLA2, THR_COMP_GLOBAL_GLOBALLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_GLOBAL_GLOBALL2B,
THR_COMP_GLOBAL_GLOBALL2A2, THR_COMP_GLOBAL_GLOBALL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_GLOBAL_GLOBALL3B,
THR_COMP_GLOBAL_GLOBALL3A2, THR_COMP_GLOBAL_GLOBALL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_GLOBAL_GLOBALGB,
THR_COMP_GLOBAL_GLOBALGA2, THR_COMP_GLOBAL_GLOBALGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_GLOBAL_GLOBALBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
// NEW_NEWMV,
{
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID,
THR_COMP_NEW_NEWLL2, THR_COMP_NEW_NEWLL3,
THR_COMP_NEW_NEWLG, THR_COMP_NEW_NEWLB,
THR_COMP_NEW_NEWLA2, THR_COMP_NEW_NEWLA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEWL2B,
THR_COMP_NEW_NEWL2A2, THR_COMP_NEW_NEWL2A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEWL3B,
THR_COMP_NEW_NEWL3A2, THR_COMP_NEW_NEWL3A, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEWGB,
THR_COMP_NEW_NEWGA2, THR_COMP_NEW_NEWGA, },
{ THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID,
THR_INVALID, THR_COMP_NEW_NEWBA, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
{ THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID, THR_INVALID,
THR_INVALID, THR_INVALID, THR_INVALID, },
},
};
#ifdef __cplusplus
} // extern "C"
#endif
#endif // AOM_AV1_ENCODER_RDOPT_DATA_DEFS_H_
|