|
|
|
@@ -25,6 +25,7 @@ |
|
|
|
|
|
|
|
/* The quantization tables below are in zigzag order! */ |
|
|
|
|
|
|
|
/* Used in CID 1235, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_luma_weight[] = { |
|
|
|
0, 32, 32, 32, 33, 32, 32, 32, |
|
|
|
32, 31, 32, 33, 33, 33, 33, 35, |
|
|
|
@@ -47,6 +48,7 @@ static const uint8_t dnxhd_1235_chroma_weight[] = { |
|
|
|
90, 90, 85, 79, 73, 73, 73, 73, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_luma_weight[] = { |
|
|
|
0, 32, 33, 34, 34, 36, 37, 36, |
|
|
|
36, 37, 38, 38, 38, 39, 41, 44, |
|
|
|
@@ -58,6 +60,7 @@ static const uint8_t dnxhd_1237_luma_weight[] = { |
|
|
|
97, 100, 104, 102, 98, 98, 99, 99, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_chroma_weight[] = { |
|
|
|
0, 32, 36, 39, 39, 38, 39, 41, |
|
|
|
45, 51, 57, 58, 53, 48, 47, 51, |
|
|
|
@@ -255,14 +258,17 @@ static const uint8_t dnxhd_1258_chroma_weight[] = { |
|
|
|
74, 74, 90, 100, 128, 125, 116, 116, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_dc_codes[12] = { |
|
|
|
0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_dc_bits[12] = { |
|
|
|
3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint16_t dnxhd_1237_ac_codes[257] = { |
|
|
|
0, 1, 4, 5, 12, 26, 27, 56, |
|
|
|
57, 58, 59, 120, 121, 244, 245, 246, |
|
|
|
@@ -299,6 +305,7 @@ static const uint16_t dnxhd_1237_ac_codes[257] = { |
|
|
|
65535, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_ac_bits[257] = { |
|
|
|
2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, |
|
|
|
8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, |
|
|
|
@@ -319,6 +326,7 @@ static const uint8_t dnxhd_1237_ac_bits[257] = { |
|
|
|
16, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_ac_level[257] = { |
|
|
|
3, 3, 5, 0, 7, 9, 5, 11, 13, 15, 7, 17, 19, 21, 23, 25, |
|
|
|
9, 11, 27, 29, 31, 33, 13, 35, 37, 39, 41, 43, 15, 45, 47, 49, |
|
|
|
@@ -359,6 +367,7 @@ static const uint8_t dnxhd_1237_ac_flags[257] = { |
|
|
|
3, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint16_t dnxhd_1237_run_codes[62] = { |
|
|
|
0, 4, 10, 11, 24, 25, 26, 54, |
|
|
|
55, 56, 57, 58, 118, 119, 240, 482, |
|
|
|
@@ -370,6 +379,7 @@ static const uint16_t dnxhd_1237_run_codes[62] = { |
|
|
|
1018, 1019, 1020, 1021, 1022, 1023, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_run_bits[62] = { |
|
|
|
1, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 9, |
|
|
|
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, |
|
|
|
@@ -377,6 +387,7 @@ static const uint8_t dnxhd_1237_run_bits[62] = { |
|
|
|
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1237, 1242, 1253 */ |
|
|
|
static const uint8_t dnxhd_1237_run[62] = { |
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
|
|
|
17, 18, 19, 20, 21, 53, 57, 58, 59, 60, 61, 62, 22, 23, 24, 25, |
|
|
|
@@ -384,14 +395,17 @@ static const uint8_t dnxhd_1237_run[62] = { |
|
|
|
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1238, 1243 */ |
|
|
|
static const uint8_t dnxhd_1238_dc_codes[12] = { |
|
|
|
0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1238, 1243 */ |
|
|
|
static const uint8_t dnxhd_1238_dc_bits[12] = { |
|
|
|
3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1238, 1243 */ |
|
|
|
static const uint16_t dnxhd_1238_ac_codes[257] = { |
|
|
|
0, 1, 4, 10, 11, 24, 25, 26, |
|
|
|
54, 55, 56, 57, 116, 117, 118, 119, |
|
|
|
@@ -428,6 +442,7 @@ static const uint16_t dnxhd_1238_ac_codes[257] = { |
|
|
|
65535, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1238, 1243 */ |
|
|
|
static const uint8_t dnxhd_1238_ac_bits[257] = { |
|
|
|
2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, |
|
|
|
8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, |
|
|
|
@@ -448,6 +463,7 @@ static const uint8_t dnxhd_1238_ac_bits[257] = { |
|
|
|
16, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1238, 1243 */ |
|
|
|
static const uint8_t dnxhd_1238_ac_level[257] = { |
|
|
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9, |
|
|
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 45, 13, 15, 47, 49, |
|
|
|
@@ -488,7 +504,7 @@ static const uint8_t dnxhd_1238_ac_flags[257] = { |
|
|
|
3, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1238, 1241 */ |
|
|
|
/* Used in CID 1235, 1238, 1241, 1256 */ |
|
|
|
static const uint16_t dnxhd_1235_run_codes[62] = { |
|
|
|
0, 4, 10, 11, 24, 25, 26, 27, |
|
|
|
56, 57, 58, 59, 120, 242, 486, 487, |
|
|
|
@@ -500,7 +516,7 @@ static const uint16_t dnxhd_1235_run_codes[62] = { |
|
|
|
1018, 1019, 1020, 1021, 1022, 1023, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1238, 1241 */ |
|
|
|
/* Used in CID 1235, 1238, 1241, 1243, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_run_bits[62] = { |
|
|
|
1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 8, 9, 9, |
|
|
|
9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
|
|
|
@@ -515,17 +531,17 @@ static const uint8_t dnxhd_1238_run[62] = { |
|
|
|
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_dc_codes[14] = { |
|
|
|
10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_dc_bits[14] = { |
|
|
|
4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint16_t dnxhd_1235_ac_codes[257] = { |
|
|
|
0, 1, 4, 10, 11, 24, 25, 26, |
|
|
|
54, 55, 56, 57, 116, 117, 118, 119, |
|
|
|
@@ -562,7 +578,7 @@ static const uint16_t dnxhd_1235_ac_codes[257] = { |
|
|
|
65535, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_ac_bits[257] = { |
|
|
|
2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, |
|
|
|
8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, |
|
|
|
@@ -583,7 +599,7 @@ static const uint8_t dnxhd_1235_ac_bits[257] = { |
|
|
|
16, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_ac_level[257] = { |
|
|
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9, |
|
|
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 13, 15, 45, 47, 49, |
|
|
|
@@ -604,7 +620,7 @@ static const uint8_t dnxhd_1235_ac_level[257] = { |
|
|
|
129, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_ac_flags[257] = { |
|
|
|
0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, |
|
|
|
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, |
|
|
|
@@ -625,7 +641,7 @@ static const uint8_t dnxhd_1235_ac_flags[257] = { |
|
|
|
3, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1235, 1241 */ |
|
|
|
/* Used in CID 1235, 1241, 1256 */ |
|
|
|
static const uint8_t dnxhd_1235_run[62] = { |
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
|
|
|
18, 20, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, |
|
|
|
@@ -858,6 +874,7 @@ static const uint8_t dnxhd_1251_ac_flags[257] = { |
|
|
|
3, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1251, 1252, 1258 */ |
|
|
|
static const uint16_t dnxhd_1251_run_codes[62] = { |
|
|
|
0, 4, 5, 12, 26, 27, 28, 58, |
|
|
|
118, 119, 120, 242, 486, 487, 976, 977, |
|
|
|
@@ -869,6 +886,7 @@ static const uint16_t dnxhd_1251_run_codes[62] = { |
|
|
|
1018, 1019, 1020, 1021, 1022, 1023, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1251, 1252, 1258 */ |
|
|
|
static const uint8_t dnxhd_1251_run_bits[62] = { |
|
|
|
1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10, |
|
|
|
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
|
|
|
@@ -876,6 +894,7 @@ static const uint8_t dnxhd_1251_run_bits[62] = { |
|
|
|
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1251, 1252, 1258 */ |
|
|
|
static const uint8_t dnxhd_1251_run[62] = { |
|
|
|
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, |
|
|
|
@@ -891,6 +910,7 @@ static const uint8_t dnxhd_1252_dc_bits[12] = { |
|
|
|
3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1252, 1258 */ |
|
|
|
static const uint16_t dnxhd_1252_ac_codes[257] = { |
|
|
|
0, 1, 4, 10, 11, 12, 26, 27, |
|
|
|
56, 57, 58, 118, 119, 120, 242, 243, |
|
|
|
@@ -927,6 +947,7 @@ static const uint16_t dnxhd_1252_ac_codes[257] = { |
|
|
|
65535, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1252, 1258 */ |
|
|
|
static const uint8_t dnxhd_1252_ac_bits[257] = { |
|
|
|
2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, |
|
|
|
8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, |
|
|
|
@@ -947,6 +968,7 @@ static const uint8_t dnxhd_1252_ac_bits[257] = { |
|
|
|
16, |
|
|
|
}; |
|
|
|
|
|
|
|
/* Used in CID 1252, 1258 */ |
|
|
|
static const uint8_t dnxhd_1252_ac_level[257] = { |
|
|
|
3, 3, 5, 7, 5, 0, 9, 11, 13, 15, 7, 17, 19, 21, 23, 25, |
|
|
|
27, 29, 9, 11, 31, 33, 35, 37, 13, 39, 41, 43, 45, 47, 49, 15, |
|
|
|
|