Showing the changes to codec/decoder/core/src/decoder_data_tables.cpp (1 of 32 files). Show all
Unified · Split
| @@ -54,6 +54,56 @@ const uint8_t g_kuiScan4[16] = { //for mb cache in sMb (only current element, wi · 53 unmodified lines | ||
| 54 | 54 | // extern at wels_common_basis.h |
| 55 | 55 | |
| 56 | 56 | /*common use table*/ |
| 57 | +const uint8_t g_kMbNonZeroCountIdx[24] = { | |
| 58 | + // 0 1 | 4 5 luma 8*8 block pNonZeroCount[16+8] | |
| 59 | + 0, 1, 4, 5, // 2 3 | 6 7 0 | 1 0 1 2 3 | |
| 60 | + 2, 3, 6, 7, //--------------- --------- 4 5 6 7 | |
| 61 | + 8, 9, 12, 13, // 8 9 | 12 13 2 | 3 8 9 10 11 | |
| 62 | + 10, 11, 14, 15, // 10 11 | 14 15-----------------------------> 12 13 14 15 | |
| 63 | + 16, 17, 20, 21, //---------------- chroma 8*8 block 16 17 18 19 | |
| 64 | + 18, 19, 22, 23 // 16 17 | 20 21 0 1 20 21 22 23 | |
| 65 | +}; | |
| 66 | +//cache element equal to 26 | |
| 67 | + | |
| 68 | +const uint8_t g_kCacheNzcScanIdx[4 * 4 + 4 + 4 + 3] = { | |
| 69 | + /* Luma */ | |
| 70 | + 9, 10, 17, 18, // 1+1*8, 2+1*8, 1+2*8, 2+2*8, | |
| 71 | + 11, 12, 19, 20, // 3+1*8, 4+1*8, 3+2*8, 4+2*8, | |
| 72 | + 25, 26, 33, 34, // 1+3*8, 2+3*8, 1+4*8, 2+4*8, | |
| 73 | + 27, 28, 35, 36, // 3+3*8, 4+3*8, 3+4*8, 4+4*8, | |
| 74 | + /* Cb */ | |
| 75 | + 14, 15, // 6+1*8, 7+1*8, | |
| 76 | + 22, 23, // 6+2*8, 7+2*8, | |
| 77 | + | |
| 78 | + /* Cr */ | |
| 79 | + 38, 39, // 6+4*8, 7+4*8, | |
| 80 | + 46, 47, // 6+5*8, 7+5*8, | |
| 81 | + /* Luma DC */ | |
| 82 | + 41, // 1+5*8 | |
| 83 | + /* Chroma DC */ | |
| 84 | + 42, 43 // 2+5*8, 3+5*8, | |
| 85 | +}; | |
| 86 | + | |
| 87 | +const uint8_t g_kCache26ScanIdx[16] = { //intra4*4_pred_mode and pNonZeroCount cache scan index, 4*4 block as basic unit | |
| 88 | + 6, 7, 11, 12, | |
| 89 | + 8, 9, 13, 14, | |
| 90 | + 16, 17, 21, 22, | |
| 91 | + 18, 19, 23, 24 | |
| 92 | +}; | |
| 93 | + | |
| 94 | +//cache element equal to 30 | |
| 95 | +const uint8_t g_kCache30ScanIdx[16] = { //mv or pRefIndex cache scan index, 4*4 block as basic unit | |
| 96 | + 7, 8, 13, 14, | |
| 97 | + 9, 10, 15, 16, | |
| 98 | + 19, 20, 25, 26, | |
| 99 | + 21, 22, 27, 28 | |
| 100 | +}; | |
| 101 | + | |
| 102 | +const uint8_t g_kNonZeroScanIdxC[4] = { //pNonZeroCount cache for chroma, 4*4 block as basic unit | |
| 103 | + 4, 5, | |
| 104 | + 7, 8 | |
| 105 | +}; | |
| 106 | + | |
| 57 | 107 | const uint8_t g_kuiScan8[24] = { // [16 + 2*4] |
| 58 | 108 | 9, 10, 17, 18, // 1+1*8, 2+1*8, 1+2*8, 2+2*8, |
| 59 | 109 | 11, 12, 19, 20, // 3+1*8, 4+1*8, 3+2*8, 4+2*8, |