• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 The libgav1 Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "src/dsp/intrapred.h"
16 
17 #include <algorithm>
18 #include <cassert>
19 #include <cstddef>
20 #include <cstdint>
21 #include <cstdlib>
22 #include <cstring>
23 
24 #include "src/dsp/constants.h"
25 #include "src/dsp/dsp.h"
26 #include "src/utils/common.h"
27 #include "src/utils/constants.h"
28 #include "src/utils/memory.h"
29 
30 namespace libgav1 {
31 namespace dsp {
32 namespace {
33 
34 template <int block_width, int block_height, typename Pixel>
35 struct IntraPredFuncs_C {
36   IntraPredFuncs_C() = delete;
37 
38   static void DcTop(void* dest, ptrdiff_t stride, const void* top_row,
39                     const void* left_column);
40   static void DcLeft(void* dest, ptrdiff_t stride, const void* top_row,
41                      const void* left_column);
42   static void Dc(void* dest, ptrdiff_t stride, const void* top_row,
43                  const void* left_column);
44   static void Vertical(void* dest, ptrdiff_t stride, const void* top_row,
45                        const void* left_column);
46   static void Horizontal(void* dest, ptrdiff_t stride, const void* top_row,
47                          const void* left_column);
48   static void Paeth(void* dest, ptrdiff_t stride, const void* top_row,
49                     const void* left_column);
50 };
51 
52 // Intra-predictors that require bitdepth.
53 template <int block_width, int block_height, int bitdepth, typename Pixel>
54 struct IntraPredBppFuncs_C {
55   IntraPredBppFuncs_C() = delete;
56 
57   static void DcFill(void* dest, ptrdiff_t stride, const void* top_row,
58                      const void* left_column);
59 };
60 
61 //------------------------------------------------------------------------------
62 // IntraPredFuncs_C::DcPred
63 
64 template <int block_width, int block_height, typename Pixel>
DcTop(void * const dest,ptrdiff_t stride,const void * const top_row,const void *)65 void IntraPredFuncs_C<block_width, block_height, Pixel>::DcTop(
66     void* const dest, ptrdiff_t stride, const void* const top_row,
67     const void* /*left_column*/) {
68   int sum = block_width >> 1;  // rounder
69   const auto* const top = static_cast<const Pixel*>(top_row);
70   for (int x = 0; x < block_width; ++x) sum += top[x];
71   const int dc = sum >> FloorLog2(block_width);
72 
73   auto* dst = static_cast<Pixel*>(dest);
74   stride /= sizeof(Pixel);
75   for (int y = 0; y < block_height; ++y) {
76     Memset(dst, dc, block_width);
77     dst += stride;
78   }
79 }
80 
81 template <int block_width, int block_height, typename Pixel>
DcLeft(void * const dest,ptrdiff_t stride,const void *,const void * const left_column)82 void IntraPredFuncs_C<block_width, block_height, Pixel>::DcLeft(
83     void* const dest, ptrdiff_t stride, const void* /*top_row*/,
84     const void* const left_column) {
85   int sum = block_height >> 1;  // rounder
86   const auto* const left = static_cast<const Pixel*>(left_column);
87   for (int y = 0; y < block_height; ++y) sum += left[y];
88   const int dc = sum >> FloorLog2(block_height);
89 
90   auto* dst = static_cast<Pixel*>(dest);
91   stride /= sizeof(Pixel);
92   for (int y = 0; y < block_height; ++y) {
93     Memset(dst, dc, block_width);
94     dst += stride;
95   }
96 }
97 
98 // Note for square blocks the divide in the Dc() function reduces to a shift.
99 // For rectangular block sizes the following multipliers can be used with the
100 // corresponding shifts.
101 // 8-bit
102 //  1:2 (e.g,, 4x8):  scale = 0x5556
103 //  1:4 (e.g., 4x16): scale = 0x3334
104 //  final_descale = 16
105 // 10/12-bit
106 //  1:2: scale = 0xaaab
107 //  1:4: scale = 0x6667
108 //  final_descale = 17
109 //  Note these may be halved to the values used in 8-bit in all cases except
110 //  when bitdepth == 12 and block_width + block_height is divisible by 5 (as
111 //  opposed to 3).
112 //
113 // The calculation becomes:
114 //  (dc_sum >> intermediate_descale) * scale) >> final_descale
115 // where intermediate_descale is:
116 // sum = block_width + block_height
117 // intermediate_descale =
118 //     (sum <= 20) ? 2 : (sum <= 40) ? 3 : (sum <= 80) ? 4 : 5
119 //
120 // The constants (multiplier and shifts) for a given block size are obtained
121 // as follows:
122 // - Let sum = block width + block height
123 // - Shift 'sum' right until we reach an odd number
124 // - Let the number of shifts for that block size be called 'intermediate_scale'
125 //   and let the odd number be 'd' (d has only 2 possible values: d = 3 for a
126 //   1:2 rectangular block and d = 5 for a 1:4 rectangular block).
127 // - Find multipliers by dividing by 'd' using "Algorithm 1" in:
128 //   http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1467632
129 //   by ensuring that m + n = 16 (in that algorithm). This ensures that our 2nd
130 //   shift will be 16, regardless of the block size.
131 // TODO(jzern): the base implementation could be updated to use this method.
132 
133 template <int block_width, int block_height, typename Pixel>
Dc(void * const dest,ptrdiff_t stride,const void * const top_row,const void * const left_column)134 void IntraPredFuncs_C<block_width, block_height, Pixel>::Dc(
135     void* const dest, ptrdiff_t stride, const void* const top_row,
136     const void* const left_column) {
137   const int divisor = block_width + block_height;
138   int sum = divisor >> 1;  // rounder
139 
140   const auto* const top = static_cast<const Pixel*>(top_row);
141   const auto* const left = static_cast<const Pixel*>(left_column);
142   for (int x = 0; x < block_width; ++x) sum += top[x];
143   for (int y = 0; y < block_height; ++y) sum += left[y];
144 
145   const int dc = sum / divisor;
146 
147   auto* dst = static_cast<Pixel*>(dest);
148   stride /= sizeof(Pixel);
149   for (int y = 0; y < block_height; ++y) {
150     Memset(dst, dc, block_width);
151     dst += stride;
152   }
153 }
154 
155 //------------------------------------------------------------------------------
156 // IntraPredFuncs_C directional predictors
157 
158 // IntraPredFuncs_C::Vertical -- apply top row vertically
159 template <int block_width, int block_height, typename Pixel>
Vertical(void * const dest,ptrdiff_t stride,const void * const top_row,const void *)160 void IntraPredFuncs_C<block_width, block_height, Pixel>::Vertical(
161     void* const dest, ptrdiff_t stride, const void* const top_row,
162     const void* /*left_column*/) {
163   auto* dst = static_cast<uint8_t*>(dest);
164   for (int y = 0; y < block_height; ++y) {
165     memcpy(dst, top_row, block_width * sizeof(Pixel));
166     dst += stride;
167   }
168 }
169 
170 // IntraPredFuncs_C::Horizontal -- apply left column horizontally
171 template <int block_width, int block_height, typename Pixel>
Horizontal(void * const dest,ptrdiff_t stride,const void *,const void * const left_column)172 void IntraPredFuncs_C<block_width, block_height, Pixel>::Horizontal(
173     void* const dest, ptrdiff_t stride, const void* /*top_row*/,
174     const void* const left_column) {
175   const auto* const left = static_cast<const Pixel*>(left_column);
176   auto* dst = static_cast<Pixel*>(dest);
177   stride /= sizeof(Pixel);
178   for (int y = 0; y < block_height; ++y) {
179     Memset(dst, left[y], block_width);
180     dst += stride;
181   }
182 }
183 
184 // IntraPredFuncs_C::Paeth
185 template <int block_width, int block_height, typename Pixel>
Paeth(void * const dest,ptrdiff_t stride,const void * const top_row,const void * const left_column)186 void IntraPredFuncs_C<block_width, block_height, Pixel>::Paeth(
187     void* const dest, ptrdiff_t stride, const void* const top_row,
188     const void* const left_column) {
189   const auto* const top = static_cast<const Pixel*>(top_row);
190   const auto* const left = static_cast<const Pixel*>(left_column);
191   const Pixel top_left = top[-1];
192   const int top_left_x2 = top_left + top_left;
193   auto* dst = static_cast<Pixel*>(dest);
194   stride /= sizeof(Pixel);
195 
196   for (int y = 0; y < block_height; ++y) {
197     const int left_pixel = left[y];
198     for (int x = 0; x < block_width; ++x) {
199       // The Paeth filter selects the value closest to:
200       // top[x] + left[y] - top_left
201       // To calculate the absolute distance for the left value this would be:
202       // abs((top[x] + left[y] - top_left) - left[y])
203       // or, because left[y] cancels out:
204       // abs(top[x] - top_left)
205       const int left_dist = std::abs(top[x] - top_left);
206       const int top_dist = std::abs(left_pixel - top_left);
207       const int top_left_dist = std::abs(top[x] + left_pixel - top_left_x2);
208 
209       // Select the closest value to the initial estimate of 'T + L - TL'.
210       if (left_dist <= top_dist && left_dist <= top_left_dist) {
211         dst[x] = left_pixel;
212       } else if (top_dist <= top_left_dist) {
213         dst[x] = top[x];
214       } else {
215         dst[x] = top_left;
216       }
217     }
218     dst += stride;
219   }
220 }
221 
222 //------------------------------------------------------------------------------
223 // IntraPredBppFuncs_C
224 template <int fill, typename Pixel>
DcFill_C(void * const dest,ptrdiff_t stride,const int block_width,const int block_height)225 inline void DcFill_C(void* const dest, ptrdiff_t stride, const int block_width,
226                      const int block_height) {
227   static_assert(sizeof(Pixel) == 1 || sizeof(Pixel) == 2,
228                 "Only 1 & 2 byte pixels are supported");
229 
230   auto* dst = static_cast<Pixel*>(dest);
231   stride /= sizeof(Pixel);
232   for (int y = 0; y < block_height; ++y) {
233     Memset(dst, fill, block_width);
234     dst += stride;
235   }
236 }
237 
238 template <int block_width, int block_height, int bitdepth, typename Pixel>
DcFill(void * const dest,ptrdiff_t stride,const void *,const void *)239 void IntraPredBppFuncs_C<block_width, block_height, bitdepth, Pixel>::DcFill(
240     void* const dest, ptrdiff_t stride, const void* /*top_row*/,
241     const void* /*left_column*/) {
242   DcFill_C<0x80 << (bitdepth - 8), Pixel>(dest, stride, block_width,
243                                           block_height);
244 }
245 
246 // -----------------------------------------------------------------------------
247 
248 template <typename Pixel>
249 struct IntraPredDefs {
250   IntraPredDefs() = delete;
251 
252   using _4x4 = IntraPredFuncs_C<4, 4, Pixel>;
253   using _4x8 = IntraPredFuncs_C<4, 8, Pixel>;
254   using _4x16 = IntraPredFuncs_C<4, 16, Pixel>;
255   using _8x4 = IntraPredFuncs_C<8, 4, Pixel>;
256   using _8x8 = IntraPredFuncs_C<8, 8, Pixel>;
257   using _8x16 = IntraPredFuncs_C<8, 16, Pixel>;
258   using _8x32 = IntraPredFuncs_C<8, 32, Pixel>;
259   using _16x4 = IntraPredFuncs_C<16, 4, Pixel>;
260   using _16x8 = IntraPredFuncs_C<16, 8, Pixel>;
261   using _16x16 = IntraPredFuncs_C<16, 16, Pixel>;
262   using _16x32 = IntraPredFuncs_C<16, 32, Pixel>;
263   using _16x64 = IntraPredFuncs_C<16, 64, Pixel>;
264   using _32x8 = IntraPredFuncs_C<32, 8, Pixel>;
265   using _32x16 = IntraPredFuncs_C<32, 16, Pixel>;
266   using _32x32 = IntraPredFuncs_C<32, 32, Pixel>;
267   using _32x64 = IntraPredFuncs_C<32, 64, Pixel>;
268   using _64x16 = IntraPredFuncs_C<64, 16, Pixel>;
269   using _64x32 = IntraPredFuncs_C<64, 32, Pixel>;
270   using _64x64 = IntraPredFuncs_C<64, 64, Pixel>;
271 };
272 
273 template <int bitdepth, typename Pixel>
274 struct IntraPredBppDefs {
275   IntraPredBppDefs() = delete;
276 
277   using _4x4 = IntraPredBppFuncs_C<4, 4, bitdepth, Pixel>;
278   using _4x8 = IntraPredBppFuncs_C<4, 8, bitdepth, Pixel>;
279   using _4x16 = IntraPredBppFuncs_C<4, 16, bitdepth, Pixel>;
280   using _8x4 = IntraPredBppFuncs_C<8, 4, bitdepth, Pixel>;
281   using _8x8 = IntraPredBppFuncs_C<8, 8, bitdepth, Pixel>;
282   using _8x16 = IntraPredBppFuncs_C<8, 16, bitdepth, Pixel>;
283   using _8x32 = IntraPredBppFuncs_C<8, 32, bitdepth, Pixel>;
284   using _16x4 = IntraPredBppFuncs_C<16, 4, bitdepth, Pixel>;
285   using _16x8 = IntraPredBppFuncs_C<16, 8, bitdepth, Pixel>;
286   using _16x16 = IntraPredBppFuncs_C<16, 16, bitdepth, Pixel>;
287   using _16x32 = IntraPredBppFuncs_C<16, 32, bitdepth, Pixel>;
288   using _16x64 = IntraPredBppFuncs_C<16, 64, bitdepth, Pixel>;
289   using _32x8 = IntraPredBppFuncs_C<32, 8, bitdepth, Pixel>;
290   using _32x16 = IntraPredBppFuncs_C<32, 16, bitdepth, Pixel>;
291   using _32x32 = IntraPredBppFuncs_C<32, 32, bitdepth, Pixel>;
292   using _32x64 = IntraPredBppFuncs_C<32, 64, bitdepth, Pixel>;
293   using _64x16 = IntraPredBppFuncs_C<64, 16, bitdepth, Pixel>;
294   using _64x32 = IntraPredBppFuncs_C<64, 32, bitdepth, Pixel>;
295   using _64x64 = IntraPredBppFuncs_C<64, 64, bitdepth, Pixel>;
296 };
297 
298 using Defs = IntraPredDefs<uint8_t>;
299 using Defs8bpp = IntraPredBppDefs<8, uint8_t>;
300 
301 // Initializes dsp entries for kTransformSize|W|x|H| from |DEFS|/|DEFSBPP| of
302 // the same size.
303 #define INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, W, H)                         \
304   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorDcFill] =     \
305       DEFSBPP::_##W##x##H::DcFill;                                            \
306   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorDcTop] =      \
307       DEFS::_##W##x##H::DcTop;                                                \
308   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorDcLeft] =     \
309       DEFS::_##W##x##H::DcLeft;                                               \
310   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorDc] =         \
311       DEFS::_##W##x##H::Dc;                                                   \
312   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorVertical] =   \
313       DEFS::_##W##x##H::Vertical;                                             \
314   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorHorizontal] = \
315       DEFS::_##W##x##H::Horizontal;                                           \
316   dsp->intra_predictors[kTransformSize##W##x##H][kIntraPredictorPaeth] =      \
317       DEFS::_##W##x##H::Paeth
318 
319 #define INIT_INTRAPREDICTORS(DEFS, DEFSBPP)        \
320   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 4, 4);   \
321   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 4, 8);   \
322   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 4, 16);  \
323   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 8, 4);   \
324   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 8, 8);   \
325   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 8, 16);  \
326   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 8, 32);  \
327   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 16, 4);  \
328   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 16, 8);  \
329   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 16, 16); \
330   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 16, 32); \
331   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 16, 64); \
332   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 32, 8);  \
333   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 32, 16); \
334   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 32, 32); \
335   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 32, 64); \
336   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 64, 16); \
337   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 64, 32); \
338   INIT_INTRAPREDICTORS_WxH(DEFS, DEFSBPP, 64, 64)
339 
Init8bpp()340 void Init8bpp() {
341   Dsp* const dsp = dsp_internal::GetWritableDspTable(8);
342   assert(dsp != nullptr);
343 #if LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
344   INIT_INTRAPREDICTORS(Defs, Defs8bpp);
345 #else  // !LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
346 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorDcFill
347   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcFill] =
348       Defs8bpp::_4x4::DcFill;
349 #endif
350 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorDcTop
351   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcTop] =
352       Defs::_4x4::DcTop;
353 #endif
354 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorDcLeft
355   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcLeft] =
356       Defs::_4x4::DcLeft;
357 #endif
358 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorDc
359   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDc] = Defs::_4x4::Dc;
360 #endif
361 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorVertical
362   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorVertical] =
363       Defs::_4x4::Vertical;
364 #endif
365 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorHorizontal
366   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorHorizontal] =
367       Defs::_4x4::Horizontal;
368 #endif
369 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x4_IntraPredictorPaeth
370   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorPaeth] =
371       Defs::_4x4::Paeth;
372 #endif
373 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorDcFill
374   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcFill] =
375       Defs8bpp::_4x8::DcFill;
376 #endif
377 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorDcTop
378   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcTop] =
379       Defs::_4x8::DcTop;
380 #endif
381 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorDcLeft
382   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcLeft] =
383       Defs::_4x8::DcLeft;
384 #endif
385 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorDc
386   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDc] = Defs::_4x8::Dc;
387 #endif
388 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorVertical
389   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorVertical] =
390       Defs::_4x8::Vertical;
391 #endif
392 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorHorizontal
393   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorHorizontal] =
394       Defs::_4x8::Horizontal;
395 #endif
396 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x8_IntraPredictorPaeth
397   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorPaeth] =
398       Defs::_4x8::Paeth;
399 #endif
400 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorDcFill
401   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcFill] =
402       Defs8bpp::_4x16::DcFill;
403 #endif
404 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorDcTop
405   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcTop] =
406       Defs::_4x16::DcTop;
407 #endif
408 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorDcLeft
409   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcLeft] =
410       Defs::_4x16::DcLeft;
411 #endif
412 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorDc
413   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDc] =
414       Defs::_4x16::Dc;
415 #endif
416 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorVertical
417   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorVertical] =
418       Defs::_4x16::Vertical;
419 #endif
420 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorHorizontal
421   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorHorizontal] =
422       Defs::_4x16::Horizontal;
423 #endif
424 #ifndef LIBGAV1_Dsp8bpp_TransformSize4x16_IntraPredictorPaeth
425   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorPaeth] =
426       Defs::_4x16::Paeth;
427 #endif
428 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorDcFill
429   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcFill] =
430       Defs8bpp::_8x4::DcFill;
431 #endif
432 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorDcTop
433   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcTop] =
434       Defs::_8x4::DcTop;
435 #endif
436 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorDcLeft
437   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcLeft] =
438       Defs::_8x4::DcLeft;
439 #endif
440 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorDc
441   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDc] = Defs::_8x4::Dc;
442 #endif
443 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorVertical
444   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorVertical] =
445       Defs::_8x4::Vertical;
446 #endif
447 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorHorizontal
448   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorHorizontal] =
449       Defs::_8x4::Horizontal;
450 #endif
451 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x4_IntraPredictorPaeth
452   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorPaeth] =
453       Defs::_8x4::Paeth;
454 #endif
455 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorDcFill
456   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcFill] =
457       Defs8bpp::_8x8::DcFill;
458 #endif
459 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorDcTop
460   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcTop] =
461       Defs::_8x8::DcTop;
462 #endif
463 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorDcLeft
464   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcLeft] =
465       Defs::_8x8::DcLeft;
466 #endif
467 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorDc
468   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDc] = Defs::_8x8::Dc;
469 #endif
470 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorVertical
471   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorVertical] =
472       Defs::_8x8::Vertical;
473 #endif
474 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorHorizontal
475   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorHorizontal] =
476       Defs::_8x8::Horizontal;
477 #endif
478 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x8_IntraPredictorPaeth
479   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorPaeth] =
480       Defs::_8x8::Paeth;
481 #endif
482 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorDcFill
483   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcFill] =
484       Defs8bpp::_8x16::DcFill;
485 #endif
486 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorDcTop
487   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcTop] =
488       Defs::_8x16::DcTop;
489 #endif
490 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorDcLeft
491   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcLeft] =
492       Defs::_8x16::DcLeft;
493 #endif
494 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorDc
495   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDc] =
496       Defs::_8x16::Dc;
497 #endif
498 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorVertical
499   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorVertical] =
500       Defs::_8x16::Vertical;
501 #endif
502 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorHorizontal
503   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorHorizontal] =
504       Defs::_8x16::Horizontal;
505 #endif
506 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x16_IntraPredictorPaeth
507   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorPaeth] =
508       Defs::_8x16::Paeth;
509 #endif
510 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorDcFill
511   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcFill] =
512       Defs8bpp::_8x32::DcFill;
513 #endif
514 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorDcTop
515   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcTop] =
516       Defs::_8x32::DcTop;
517 #endif
518 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorDcLeft
519   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcLeft] =
520       Defs::_8x32::DcLeft;
521 #endif
522 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorDc
523   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDc] =
524       Defs::_8x32::Dc;
525 #endif
526 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorVertical
527   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorVertical] =
528       Defs::_8x32::Vertical;
529 #endif
530 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorHorizontal
531   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorHorizontal] =
532       Defs::_8x32::Horizontal;
533 #endif
534 #ifndef LIBGAV1_Dsp8bpp_TransformSize8x32_IntraPredictorPaeth
535   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorPaeth] =
536       Defs::_8x32::Paeth;
537 #endif
538 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorDcFill
539   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcFill] =
540       Defs8bpp::_16x4::DcFill;
541 #endif
542 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorDcTop
543   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcTop] =
544       Defs::_16x4::DcTop;
545 #endif
546 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorDcLeft
547   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcLeft] =
548       Defs::_16x4::DcLeft;
549 #endif
550 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorDc
551   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDc] =
552       Defs::_16x4::Dc;
553 #endif
554 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorVertical
555   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorVertical] =
556       Defs::_16x4::Vertical;
557 #endif
558 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorHorizontal
559   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorHorizontal] =
560       Defs::_16x4::Horizontal;
561 #endif
562 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x4_IntraPredictorPaeth
563   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorPaeth] =
564       Defs::_16x4::Paeth;
565 #endif
566 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorDcFill
567   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcFill] =
568       Defs8bpp::_16x8::DcFill;
569 #endif
570 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorDcTop
571   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcTop] =
572       Defs::_16x8::DcTop;
573 #endif
574 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorDcLeft
575   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcLeft] =
576       Defs::_16x8::DcLeft;
577 #endif
578 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorDc
579   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDc] =
580       Defs::_16x8::Dc;
581 #endif
582 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorVertical
583   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorVertical] =
584       Defs::_16x8::Vertical;
585 #endif
586 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorHorizontal
587   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorHorizontal] =
588       Defs::_16x8::Horizontal;
589 #endif
590 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x8_IntraPredictorPaeth
591   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorPaeth] =
592       Defs::_16x8::Paeth;
593 #endif
594 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorDcFill
595   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcFill] =
596       Defs8bpp::_16x16::DcFill;
597 #endif
598 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorDcTop
599   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcTop] =
600       Defs::_16x16::DcTop;
601 #endif
602 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorDcLeft
603   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcLeft] =
604       Defs::_16x16::DcLeft;
605 #endif
606 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorDc
607   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDc] =
608       Defs::_16x16::Dc;
609 #endif
610 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorVertical
611   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorVertical] =
612       Defs::_16x16::Vertical;
613 #endif
614 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorHorizontal
615   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorHorizontal] =
616       Defs::_16x16::Horizontal;
617 #endif
618 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x16_IntraPredictorPaeth
619   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorPaeth] =
620       Defs::_16x16::Paeth;
621 #endif
622 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorDcFill
623   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcFill] =
624       Defs8bpp::_16x32::DcFill;
625 #endif
626 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorDcTop
627   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcTop] =
628       Defs::_16x32::DcTop;
629 #endif
630 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorDcLeft
631   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcLeft] =
632       Defs::_16x32::DcLeft;
633 #endif
634 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorDc
635   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDc] =
636       Defs::_16x32::Dc;
637 #endif
638 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorVertical
639   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorVertical] =
640       Defs::_16x32::Vertical;
641 #endif
642 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorHorizontal
643   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorHorizontal] =
644       Defs::_16x32::Horizontal;
645 #endif
646 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x32_IntraPredictorPaeth
647   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorPaeth] =
648       Defs::_16x32::Paeth;
649 #endif
650 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorDcFill
651   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcFill] =
652       Defs8bpp::_16x64::DcFill;
653 #endif
654 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorDcTop
655   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcTop] =
656       Defs::_16x64::DcTop;
657 #endif
658 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorDcLeft
659   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcLeft] =
660       Defs::_16x64::DcLeft;
661 #endif
662 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorDc
663   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDc] =
664       Defs::_16x64::Dc;
665 #endif
666 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorVertical
667   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorVertical] =
668       Defs::_16x64::Vertical;
669 #endif
670 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorHorizontal
671   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorHorizontal] =
672       Defs::_16x64::Horizontal;
673 #endif
674 #ifndef LIBGAV1_Dsp8bpp_TransformSize16x64_IntraPredictorPaeth
675   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorPaeth] =
676       Defs::_16x64::Paeth;
677 #endif
678 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorDcFill
679   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcFill] =
680       Defs8bpp::_32x8::DcFill;
681 #endif
682 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorDcTop
683   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcTop] =
684       Defs::_32x8::DcTop;
685 #endif
686 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorDcLeft
687   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcLeft] =
688       Defs::_32x8::DcLeft;
689 #endif
690 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorDc
691   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDc] =
692       Defs::_32x8::Dc;
693 #endif
694 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorVertical
695   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorVertical] =
696       Defs::_32x8::Vertical;
697 #endif
698 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorHorizontal
699   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorHorizontal] =
700       Defs::_32x8::Horizontal;
701 #endif
702 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x8_IntraPredictorPaeth
703   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorPaeth] =
704       Defs::_32x8::Paeth;
705 #endif
706 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorDcFill
707   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcFill] =
708       Defs8bpp::_32x16::DcFill;
709 #endif
710 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorDcTop
711   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcTop] =
712       Defs::_32x16::DcTop;
713 #endif
714 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorDcLeft
715   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcLeft] =
716       Defs::_32x16::DcLeft;
717 #endif
718 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorDc
719   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDc] =
720       Defs::_32x16::Dc;
721 #endif
722 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorVertical
723   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorVertical] =
724       Defs::_32x16::Vertical;
725 #endif
726 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorHorizontal
727   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorHorizontal] =
728       Defs::_32x16::Horizontal;
729 #endif
730 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x16_IntraPredictorPaeth
731   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorPaeth] =
732       Defs::_32x16::Paeth;
733 #endif
734 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorDcFill
735   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcFill] =
736       Defs8bpp::_32x32::DcFill;
737 #endif
738 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorDcTop
739   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcTop] =
740       Defs::_32x32::DcTop;
741 #endif
742 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorDcLeft
743   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcLeft] =
744       Defs::_32x32::DcLeft;
745 #endif
746 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorDc
747   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDc] =
748       Defs::_32x32::Dc;
749 #endif
750 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorVertical
751   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorVertical] =
752       Defs::_32x32::Vertical;
753 #endif
754 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorHorizontal
755   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorHorizontal] =
756       Defs::_32x32::Horizontal;
757 #endif
758 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x32_IntraPredictorPaeth
759   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorPaeth] =
760       Defs::_32x32::Paeth;
761 #endif
762 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorDcFill
763   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcFill] =
764       Defs8bpp::_32x64::DcFill;
765 #endif
766 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorDcTop
767   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcTop] =
768       Defs::_32x64::DcTop;
769 #endif
770 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorDcLeft
771   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcLeft] =
772       Defs::_32x64::DcLeft;
773 #endif
774 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorDc
775   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDc] =
776       Defs::_32x64::Dc;
777 #endif
778 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorVertical
779   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorVertical] =
780       Defs::_32x64::Vertical;
781 #endif
782 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorHorizontal
783   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorHorizontal] =
784       Defs::_32x64::Horizontal;
785 #endif
786 #ifndef LIBGAV1_Dsp8bpp_TransformSize32x64_IntraPredictorPaeth
787   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorPaeth] =
788       Defs::_32x64::Paeth;
789 #endif
790 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorDcFill
791   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcFill] =
792       Defs8bpp::_64x16::DcFill;
793 #endif
794 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorDcTop
795   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcTop] =
796       Defs::_64x16::DcTop;
797 #endif
798 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorDcLeft
799   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcLeft] =
800       Defs::_64x16::DcLeft;
801 #endif
802 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorDc
803   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDc] =
804       Defs::_64x16::Dc;
805 #endif
806 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorVertical
807   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorVertical] =
808       Defs::_64x16::Vertical;
809 #endif
810 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorHorizontal
811   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorHorizontal] =
812       Defs::_64x16::Horizontal;
813 #endif
814 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x16_IntraPredictorPaeth
815   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorPaeth] =
816       Defs::_64x16::Paeth;
817 #endif
818 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorDcFill
819   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcFill] =
820       Defs8bpp::_64x32::DcFill;
821 #endif
822 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorDcTop
823   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcTop] =
824       Defs::_64x32::DcTop;
825 #endif
826 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorDcLeft
827   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcLeft] =
828       Defs::_64x32::DcLeft;
829 #endif
830 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorDc
831   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDc] =
832       Defs::_64x32::Dc;
833 #endif
834 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorVertical
835   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorVertical] =
836       Defs::_64x32::Vertical;
837 #endif
838 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorHorizontal
839   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorHorizontal] =
840       Defs::_64x32::Horizontal;
841 #endif
842 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x32_IntraPredictorPaeth
843   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorPaeth] =
844       Defs::_64x32::Paeth;
845 #endif
846 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorDcFill
847   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcFill] =
848       Defs8bpp::_64x64::DcFill;
849 #endif
850 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorDcTop
851   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcTop] =
852       Defs::_64x64::DcTop;
853 #endif
854 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorDcLeft
855   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcLeft] =
856       Defs::_64x64::DcLeft;
857 #endif
858 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorDc
859   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDc] =
860       Defs::_64x64::Dc;
861 #endif
862 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorVertical
863   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorVertical] =
864       Defs::_64x64::Vertical;
865 #endif
866 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorHorizontal
867   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorHorizontal] =
868       Defs::_64x64::Horizontal;
869 #endif
870 #ifndef LIBGAV1_Dsp8bpp_TransformSize64x64_IntraPredictorPaeth
871   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorPaeth] =
872       Defs::_64x64::Paeth;
873 #endif
874 #endif  // LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
875 }  // NOLINT(readability/fn_size)
876 
877 #if LIBGAV1_MAX_BITDEPTH >= 10
878 using DefsHbd = IntraPredDefs<uint16_t>;
879 using Defs10bpp = IntraPredBppDefs<10, uint16_t>;
880 
Init10bpp()881 void Init10bpp() {
882   Dsp* const dsp = dsp_internal::GetWritableDspTable(10);
883   assert(dsp != nullptr);
884 #if LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
885   INIT_INTRAPREDICTORS(DefsHbd, Defs10bpp);
886 #else  // !LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
887 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorDcFill
888   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcFill] =
889       Defs10bpp::_4x4::DcFill;
890 #endif
891 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorDcTop
892   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcTop] =
893       DefsHbd::_4x4::DcTop;
894 #endif
895 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorDcLeft
896   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDcLeft] =
897       DefsHbd::_4x4::DcLeft;
898 #endif
899 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorDc
900   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorDc] =
901       DefsHbd::_4x4::Dc;
902 #endif
903 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorVertical
904   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorVertical] =
905       DefsHbd::_4x4::Vertical;
906 #endif
907 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorHorizontal
908   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorHorizontal] =
909       DefsHbd::_4x4::Horizontal;
910 #endif
911 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x4_IntraPredictorPaeth
912   dsp->intra_predictors[kTransformSize4x4][kIntraPredictorPaeth] =
913       DefsHbd::_4x4::Paeth;
914 #endif
915 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorDcFill
916   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcFill] =
917       Defs10bpp::_4x8::DcFill;
918 #endif
919 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorDcTop
920   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcTop] =
921       DefsHbd::_4x8::DcTop;
922 #endif
923 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorDcLeft
924   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDcLeft] =
925       DefsHbd::_4x8::DcLeft;
926 #endif
927 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorDc
928   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorDc] =
929       DefsHbd::_4x8::Dc;
930 #endif
931 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorVertical
932   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorVertical] =
933       DefsHbd::_4x8::Vertical;
934 #endif
935 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorHorizontal
936   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorHorizontal] =
937       DefsHbd::_4x8::Horizontal;
938 #endif
939 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x8_IntraPredictorPaeth
940   dsp->intra_predictors[kTransformSize4x8][kIntraPredictorPaeth] =
941       DefsHbd::_4x8::Paeth;
942 #endif
943 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorDcFill
944   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcFill] =
945       Defs10bpp::_4x16::DcFill;
946 #endif
947 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorDcTop
948   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcTop] =
949       DefsHbd::_4x16::DcTop;
950 #endif
951 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorDcLeft
952   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDcLeft] =
953       DefsHbd::_4x16::DcLeft;
954 #endif
955 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorDc
956   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorDc] =
957       DefsHbd::_4x16::Dc;
958 #endif
959 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorVertical
960   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorVertical] =
961       DefsHbd::_4x16::Vertical;
962 #endif
963 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorHorizontal
964   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorHorizontal] =
965       DefsHbd::_4x16::Horizontal;
966 #endif
967 #ifndef LIBGAV1_Dsp10bpp_TransformSize4x16_IntraPredictorPaeth
968   dsp->intra_predictors[kTransformSize4x16][kIntraPredictorPaeth] =
969       DefsHbd::_4x16::Paeth;
970 #endif
971 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorDcFill
972   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcFill] =
973       Defs10bpp::_8x4::DcFill;
974 #endif
975 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorDcTop
976   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcTop] =
977       DefsHbd::_8x4::DcTop;
978 #endif
979 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorDcLeft
980   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDcLeft] =
981       DefsHbd::_8x4::DcLeft;
982 #endif
983 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorDc
984   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorDc] =
985       DefsHbd::_8x4::Dc;
986 #endif
987 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorVertical
988   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorVertical] =
989       DefsHbd::_8x4::Vertical;
990 #endif
991 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorHorizontal
992   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorHorizontal] =
993       DefsHbd::_8x4::Horizontal;
994 #endif
995 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x4_IntraPredictorPaeth
996   dsp->intra_predictors[kTransformSize8x4][kIntraPredictorPaeth] =
997       DefsHbd::_8x4::Paeth;
998 #endif
999 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorDcFill
1000   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcFill] =
1001       Defs10bpp::_8x8::DcFill;
1002 #endif
1003 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorDcTop
1004   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcTop] =
1005       DefsHbd::_8x8::DcTop;
1006 #endif
1007 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorDcLeft
1008   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDcLeft] =
1009       DefsHbd::_8x8::DcLeft;
1010 #endif
1011 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorDc
1012   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorDc] =
1013       DefsHbd::_8x8::Dc;
1014 #endif
1015 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorVertical
1016   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorVertical] =
1017       DefsHbd::_8x8::Vertical;
1018 #endif
1019 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorHorizontal
1020   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorHorizontal] =
1021       DefsHbd::_8x8::Horizontal;
1022 #endif
1023 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x8_IntraPredictorPaeth
1024   dsp->intra_predictors[kTransformSize8x8][kIntraPredictorPaeth] =
1025       DefsHbd::_8x8::Paeth;
1026 #endif
1027 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorDcFill
1028   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcFill] =
1029       Defs10bpp::_8x16::DcFill;
1030 #endif
1031 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorDcTop
1032   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcTop] =
1033       DefsHbd::_8x16::DcTop;
1034 #endif
1035 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorDcLeft
1036   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDcLeft] =
1037       DefsHbd::_8x16::DcLeft;
1038 #endif
1039 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorDc
1040   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorDc] =
1041       DefsHbd::_8x16::Dc;
1042 #endif
1043 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorVertical
1044   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorVertical] =
1045       DefsHbd::_8x16::Vertical;
1046 #endif
1047 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorHorizontal
1048   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorHorizontal] =
1049       DefsHbd::_8x16::Horizontal;
1050 #endif
1051 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x16_IntraPredictorPaeth
1052   dsp->intra_predictors[kTransformSize8x16][kIntraPredictorPaeth] =
1053       DefsHbd::_8x16::Paeth;
1054 #endif
1055 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorDcFill
1056   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcFill] =
1057       Defs10bpp::_8x32::DcFill;
1058 #endif
1059 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorDcTop
1060   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcTop] =
1061       DefsHbd::_8x32::DcTop;
1062 #endif
1063 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorDcLeft
1064   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDcLeft] =
1065       DefsHbd::_8x32::DcLeft;
1066 #endif
1067 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorDc
1068   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorDc] =
1069       DefsHbd::_8x32::Dc;
1070 #endif
1071 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorVertical
1072   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorVertical] =
1073       DefsHbd::_8x32::Vertical;
1074 #endif
1075 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorHorizontal
1076   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorHorizontal] =
1077       DefsHbd::_8x32::Horizontal;
1078 #endif
1079 #ifndef LIBGAV1_Dsp10bpp_TransformSize8x32_IntraPredictorPaeth
1080   dsp->intra_predictors[kTransformSize8x32][kIntraPredictorPaeth] =
1081       DefsHbd::_8x32::Paeth;
1082 #endif
1083 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorDcFill
1084   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcFill] =
1085       Defs10bpp::_16x4::DcFill;
1086 #endif
1087 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorDcTop
1088   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcTop] =
1089       DefsHbd::_16x4::DcTop;
1090 #endif
1091 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorDcLeft
1092   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDcLeft] =
1093       DefsHbd::_16x4::DcLeft;
1094 #endif
1095 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorDc
1096   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorDc] =
1097       DefsHbd::_16x4::Dc;
1098 #endif
1099 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorVertical
1100   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorVertical] =
1101       DefsHbd::_16x4::Vertical;
1102 #endif
1103 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorHorizontal
1104   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorHorizontal] =
1105       DefsHbd::_16x4::Horizontal;
1106 #endif
1107 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x4_IntraPredictorPaeth
1108   dsp->intra_predictors[kTransformSize16x4][kIntraPredictorPaeth] =
1109       DefsHbd::_16x4::Paeth;
1110 #endif
1111 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorDcFill
1112   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcFill] =
1113       Defs10bpp::_16x8::DcFill;
1114 #endif
1115 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorDcTop
1116   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcTop] =
1117       DefsHbd::_16x8::DcTop;
1118 #endif
1119 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorDcLeft
1120   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDcLeft] =
1121       DefsHbd::_16x8::DcLeft;
1122 #endif
1123 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorDc
1124   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorDc] =
1125       DefsHbd::_16x8::Dc;
1126 #endif
1127 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorVertical
1128   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorVertical] =
1129       DefsHbd::_16x8::Vertical;
1130 #endif
1131 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorHorizontal
1132   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorHorizontal] =
1133       DefsHbd::_16x8::Horizontal;
1134 #endif
1135 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x8_IntraPredictorPaeth
1136   dsp->intra_predictors[kTransformSize16x8][kIntraPredictorPaeth] =
1137       DefsHbd::_16x8::Paeth;
1138 #endif
1139 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorDcFill
1140   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcFill] =
1141       Defs10bpp::_16x16::DcFill;
1142 #endif
1143 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorDcTop
1144   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcTop] =
1145       DefsHbd::_16x16::DcTop;
1146 #endif
1147 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorDcLeft
1148   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDcLeft] =
1149       DefsHbd::_16x16::DcLeft;
1150 #endif
1151 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorDc
1152   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorDc] =
1153       DefsHbd::_16x16::Dc;
1154 #endif
1155 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorVertical
1156   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorVertical] =
1157       DefsHbd::_16x16::Vertical;
1158 #endif
1159 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorHorizontal
1160   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorHorizontal] =
1161       DefsHbd::_16x16::Horizontal;
1162 #endif
1163 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x16_IntraPredictorPaeth
1164   dsp->intra_predictors[kTransformSize16x16][kIntraPredictorPaeth] =
1165       DefsHbd::_16x16::Paeth;
1166 #endif
1167 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorDcFill
1168   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcFill] =
1169       Defs10bpp::_16x32::DcFill;
1170 #endif
1171 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorDcTop
1172   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcTop] =
1173       DefsHbd::_16x32::DcTop;
1174 #endif
1175 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorDcLeft
1176   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDcLeft] =
1177       DefsHbd::_16x32::DcLeft;
1178 #endif
1179 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorDc
1180   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorDc] =
1181       DefsHbd::_16x32::Dc;
1182 #endif
1183 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorVertical
1184   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorVertical] =
1185       DefsHbd::_16x32::Vertical;
1186 #endif
1187 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorHorizontal
1188   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorHorizontal] =
1189       DefsHbd::_16x32::Horizontal;
1190 #endif
1191 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x32_IntraPredictorPaeth
1192   dsp->intra_predictors[kTransformSize16x32][kIntraPredictorPaeth] =
1193       DefsHbd::_16x32::Paeth;
1194 #endif
1195 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorDcFill
1196   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcFill] =
1197       Defs10bpp::_16x64::DcFill;
1198 #endif
1199 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorDcTop
1200   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcTop] =
1201       DefsHbd::_16x64::DcTop;
1202 #endif
1203 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorDcLeft
1204   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDcLeft] =
1205       DefsHbd::_16x64::DcLeft;
1206 #endif
1207 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorDc
1208   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorDc] =
1209       DefsHbd::_16x64::Dc;
1210 #endif
1211 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorVertical
1212   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorVertical] =
1213       DefsHbd::_16x64::Vertical;
1214 #endif
1215 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorHorizontal
1216   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorHorizontal] =
1217       DefsHbd::_16x64::Horizontal;
1218 #endif
1219 #ifndef LIBGAV1_Dsp10bpp_TransformSize16x64_IntraPredictorPaeth
1220   dsp->intra_predictors[kTransformSize16x64][kIntraPredictorPaeth] =
1221       DefsHbd::_16x64::Paeth;
1222 #endif
1223 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorDcFill
1224   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcFill] =
1225       Defs10bpp::_32x8::DcFill;
1226 #endif
1227 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorDcTop
1228   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcTop] =
1229       DefsHbd::_32x8::DcTop;
1230 #endif
1231 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorDcLeft
1232   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDcLeft] =
1233       DefsHbd::_32x8::DcLeft;
1234 #endif
1235 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorDc
1236   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorDc] =
1237       DefsHbd::_32x8::Dc;
1238 #endif
1239 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorVertical
1240   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorVertical] =
1241       DefsHbd::_32x8::Vertical;
1242 #endif
1243 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorHorizontal
1244   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorHorizontal] =
1245       DefsHbd::_32x8::Horizontal;
1246 #endif
1247 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x8_IntraPredictorPaeth
1248   dsp->intra_predictors[kTransformSize32x8][kIntraPredictorPaeth] =
1249       DefsHbd::_32x8::Paeth;
1250 #endif
1251 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorDcFill
1252   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcFill] =
1253       Defs10bpp::_32x16::DcFill;
1254 #endif
1255 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorDcTop
1256   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcTop] =
1257       DefsHbd::_32x16::DcTop;
1258 #endif
1259 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorDcLeft
1260   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDcLeft] =
1261       DefsHbd::_32x16::DcLeft;
1262 #endif
1263 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorDc
1264   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorDc] =
1265       DefsHbd::_32x16::Dc;
1266 #endif
1267 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorVertical
1268   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorVertical] =
1269       DefsHbd::_32x16::Vertical;
1270 #endif
1271 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorHorizontal
1272   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorHorizontal] =
1273       DefsHbd::_32x16::Horizontal;
1274 #endif
1275 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x16_IntraPredictorPaeth
1276   dsp->intra_predictors[kTransformSize32x16][kIntraPredictorPaeth] =
1277       DefsHbd::_32x16::Paeth;
1278 #endif
1279 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorDcFill
1280   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcFill] =
1281       Defs10bpp::_32x32::DcFill;
1282 #endif
1283 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorDcTop
1284   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcTop] =
1285       DefsHbd::_32x32::DcTop;
1286 #endif
1287 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorDcLeft
1288   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDcLeft] =
1289       DefsHbd::_32x32::DcLeft;
1290 #endif
1291 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorDc
1292   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorDc] =
1293       DefsHbd::_32x32::Dc;
1294 #endif
1295 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorVertical
1296   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorVertical] =
1297       DefsHbd::_32x32::Vertical;
1298 #endif
1299 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorHorizontal
1300   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorHorizontal] =
1301       DefsHbd::_32x32::Horizontal;
1302 #endif
1303 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x32_IntraPredictorPaeth
1304   dsp->intra_predictors[kTransformSize32x32][kIntraPredictorPaeth] =
1305       DefsHbd::_32x32::Paeth;
1306 #endif
1307 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorDcFill
1308   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcFill] =
1309       Defs10bpp::_32x64::DcFill;
1310 #endif
1311 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorDcTop
1312   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcTop] =
1313       DefsHbd::_32x64::DcTop;
1314 #endif
1315 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorDcLeft
1316   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDcLeft] =
1317       DefsHbd::_32x64::DcLeft;
1318 #endif
1319 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorDc
1320   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorDc] =
1321       DefsHbd::_32x64::Dc;
1322 #endif
1323 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorVertical
1324   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorVertical] =
1325       DefsHbd::_32x64::Vertical;
1326 #endif
1327 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorHorizontal
1328   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorHorizontal] =
1329       DefsHbd::_32x64::Horizontal;
1330 #endif
1331 #ifndef LIBGAV1_Dsp10bpp_TransformSize32x64_IntraPredictorPaeth
1332   dsp->intra_predictors[kTransformSize32x64][kIntraPredictorPaeth] =
1333       DefsHbd::_32x64::Paeth;
1334 #endif
1335 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorDcFill
1336   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcFill] =
1337       Defs10bpp::_64x16::DcFill;
1338 #endif
1339 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorDcTop
1340   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcTop] =
1341       DefsHbd::_64x16::DcTop;
1342 #endif
1343 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorDcLeft
1344   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDcLeft] =
1345       DefsHbd::_64x16::DcLeft;
1346 #endif
1347 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorDc
1348   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorDc] =
1349       DefsHbd::_64x16::Dc;
1350 #endif
1351 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorVertical
1352   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorVertical] =
1353       DefsHbd::_64x16::Vertical;
1354 #endif
1355 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorHorizontal
1356   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorHorizontal] =
1357       DefsHbd::_64x16::Horizontal;
1358 #endif
1359 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x16_IntraPredictorPaeth
1360   dsp->intra_predictors[kTransformSize64x16][kIntraPredictorPaeth] =
1361       DefsHbd::_64x16::Paeth;
1362 #endif
1363 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorDcFill
1364   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcFill] =
1365       Defs10bpp::_64x32::DcFill;
1366 #endif
1367 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorDcTop
1368   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcTop] =
1369       DefsHbd::_64x32::DcTop;
1370 #endif
1371 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorDcLeft
1372   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDcLeft] =
1373       DefsHbd::_64x32::DcLeft;
1374 #endif
1375 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorDc
1376   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorDc] =
1377       DefsHbd::_64x32::Dc;
1378 #endif
1379 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorVertical
1380   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorVertical] =
1381       DefsHbd::_64x32::Vertical;
1382 #endif
1383 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorHorizontal
1384   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorHorizontal] =
1385       DefsHbd::_64x32::Horizontal;
1386 #endif
1387 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x32_IntraPredictorPaeth
1388   dsp->intra_predictors[kTransformSize64x32][kIntraPredictorPaeth] =
1389       DefsHbd::_64x32::Paeth;
1390 #endif
1391 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorDcFill
1392   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcFill] =
1393       Defs10bpp::_64x64::DcFill;
1394 #endif
1395 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorDcTop
1396   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcTop] =
1397       DefsHbd::_64x64::DcTop;
1398 #endif
1399 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorDcLeft
1400   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDcLeft] =
1401       DefsHbd::_64x64::DcLeft;
1402 #endif
1403 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorDc
1404   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorDc] =
1405       DefsHbd::_64x64::Dc;
1406 #endif
1407 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorVertical
1408   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorVertical] =
1409       DefsHbd::_64x64::Vertical;
1410 #endif
1411 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorHorizontal
1412   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorHorizontal] =
1413       DefsHbd::_64x64::Horizontal;
1414 #endif
1415 #ifndef LIBGAV1_Dsp10bpp_TransformSize64x64_IntraPredictorPaeth
1416   dsp->intra_predictors[kTransformSize64x64][kIntraPredictorPaeth] =
1417       DefsHbd::_64x64::Paeth;
1418 #endif
1419 #endif  // LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS
1420 }  // NOLINT(readability/fn_size)
1421 #endif  // LIBGAV1_MAX_BITDEPTH >= 10
1422 
1423 #undef INIT_INTRAPREDICTORS_WxH
1424 #undef INIT_INTRAPREDICTORS
1425 }  // namespace
1426 
IntraPredInit_C()1427 void IntraPredInit_C() {
1428   Init8bpp();
1429 #if LIBGAV1_MAX_BITDEPTH >= 10
1430   Init10bpp();
1431 #endif
1432 }
1433 
1434 }  // namespace dsp
1435 }  // namespace libgav1
1436