/* * dav1d_cdef_directions — verbatim transcription of the CDEF * directions table from dav1d/src/tables.c (1.4.3, lines 400-414). * Provided as a standalone .c so the vendored cdef.S has the * symbol to link against without pulling in dav1d's full tables.c * (which is 1013 lines and chain-references the entire decoder). * * Used by both the C reference (cdef_tmpl.c) and the NEON * implementation (cdef.S). * * The table has 12 entries (2 + 8 + 2) because direction indexing * wraps modulo 8 with ±2 lookahead for secondary taps; the leading * and trailing 2 entries are the wrap-around prefixes/suffixes. * * License: BSD-2-Clause (matches dav1d upstream). */ #include const int8_t dav1d_cdef_directions[2 + 8 + 2][2] = { { 1 * 12 + 0, 2 * 12 + 0 }, // 6 (wrap prefix) { 1 * 12 + 0, 2 * 12 - 1 }, // 7 (wrap prefix) { -1 * 12 + 1, -2 * 12 + 2 }, // 0 { 0 * 12 + 1, -1 * 12 + 2 }, // 1 { 0 * 12 + 1, 0 * 12 + 2 }, // 2 { 0 * 12 + 1, 1 * 12 + 2 }, // 3 { 1 * 12 + 1, 2 * 12 + 2 }, // 4 { 1 * 12 + 0, 2 * 12 + 1 }, // 5 { 1 * 12 + 0, 2 * 12 + 0 }, // 6 { 1 * 12 + 0, 2 * 12 - 1 }, // 7 { -1 * 12 + 1, -2 * 12 + 2 }, // 0 (wrap suffix) { 0 * 12 + 1, -1 * 12 + 2 }, // 1 (wrap suffix) };