From 026beb31543a7747b143856c33ce72f45bc26c9d Mon Sep 17 00:00:00 2001 From: siivonek Date: Mon, 7 Mar 2022 13:55:15 +0200 Subject: [PATCH] [lfnst] Add lfnst coef scan table. --- src/lfnst_tables.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lfnst_tables.h b/src/lfnst_tables.h index 44dadcb8..5b201e3c 100644 --- a/src/lfnst_tables.h +++ b/src/lfnst_tables.h @@ -46,6 +46,7 @@ #define NUM_LMC_MODE (1 + 2) // LMC + MDLM_T + MDLM_L #define NUM_INTRA_MODE (NUM_LUMA_MODE + NUM_LMC_MODE) #define NUM_EXT_LUMA_MODE 28 +#define DIA_IDX 34 const uint8_t lfnst_lut[NUM_INTRA_MODE + NUM_EXT_LUMA_MODE - 1] = {//0 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 @@ -360,4 +361,15 @@ const int8_t lfnst_4x4[4][2][16][16] = { { -1, 1, -14, 36, -1, 2, -20, 69, 0, 0, -15, 72, 3, 4, 5, 65 }, } } -}; \ No newline at end of file +}; + +const uint32_t coef_top_left_diag_scan_8x8[8][64] = { + {0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14}, + {0, 2, 1, 4, 3, 2, 6, 5, 4, 3, 7, 6, 5, 8, 7, 9, 8, 10, 9, 12, 11, 10, 14, 13, 12, 11, 15, 14, 13, 16, 15, 17, 4, 6, 5, 8, 7, 6, 10, 9, 8, 7, 11, 10, 9, 12, 11, 13, 12, 14, 13, 16, 15, 14, 18, 17, 16, 15, 19, 18, 17, 20, 19, 21}, + {0, 4, 1, 8, 5, 2, 12, 9, 6, 3, 13, 10, 7, 14, 11, 15, 16, 20, 17, 24, 21, 18, 28, 25, 22, 19, 29, 26, 23, 30, 27, 31, 4, 8, 5, 12, 9, 6, 16, 13, 10, 7, 17, 14, 11, 18, 15, 19, 20, 24, 21, 28, 25, 22, 32, 29, 26, 23, 33, 30, 27, 34, 31, 35}, + {0, 8, 1, 16, 9, 2, 24, 17, 10, 3, 25, 18, 11, 26, 19, 27, 32, 40, 33, 48, 41, 34, 56, 49, 42, 35, 57, 50, 43, 58, 51, 59, 4, 12, 5, 20, 13, 6, 28, 21, 14, 7, 29, 22, 15, 30, 23, 31, 36, 44, 37, 52, 45, 38, 60, 53, 46, 39, 61, 54, 47, 62, 55, 63}, + {0, 16, 1, 32, 17, 2, 48, 33, 18, 3, 49, 34, 19, 50, 35, 51, 64, 80, 65, 96, 81, 66, 112, 97, 82, 67, 113, 98, 83, 114, 99, 115, 4, 20, 5, 36, 21, 6, 52, 37, 22, 7, 53, 38, 23, 54, 39, 55, 68, 84, 69, 100, 85, 70, 116, 101, 86, 71, 117, 102, 87, 118, 103, 119}, + {0, 32, 1, 64, 33, 2, 96, 65, 34, 3, 97, 66, 35, 98, 67, 99, 128, 160, 129, 192, 161, 130, 224, 193, 162, 131, 225, 194, 163, 226, 195, 227, 4, 36, 5, 68, 37, 6, 100, 69, 38, 7, 101, 70, 39, 102, 71, 103, 132, 164, 133, 196, 165, 134, 228, 197, 166, 135, 229, 198, 167, 230, 199, 231}, + {0, 64, 1, 128, 65, 2, 192, 129, 66, 3, 193, 130, 67, 194, 131, 195, 256, 320, 257, 384, 321, 258, 448, 385, 322, 259, 449, 386, 323, 450, 387, 451, 4, 68, 5, 132, 69, 6, 196, 133, 70, 7, 197, 134, 71, 198, 135, 199, 260, 324, 261, 388, 325, 262, 452, 389, 326, 263, 453, 390, 327, 454, 391, 455}, + {0, 128, 1, 256, 129, 2, 384, 257, 130, 3, 385, 258, 131, 386, 259, 387, 512, 640, 513, 768, 641, 514, 896, 769, 642, 515, 897, 770, 643, 898, 771, 899, 4, 132, 5, 260, 133, 6, 388, 261, 134, 7, 389, 262, 135, 390, 263, 391, 516, 644, 517, 772, 645, 518, 900, 773, 646, 519, 901, 774, 647, 902, 775, 903} +}