Merge remote-tracking branch 'mans/dnxhd'
* mans/dnxhd: dnxhddec: cache luma/chroma_weight*qscale tables for last qscale dnxhddec: merge ac_{index,run}_flags dnxhddec: store 2*level+1 in ac_level tables dnxhddec: rearrange decode_dct_block loop Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
e60779b18c
@ -284,63 +284,43 @@ static const uint8_t dnxhd_1237_ac_bits[257] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1237_ac_level[257] = {
|
static const uint8_t dnxhd_1237_ac_level[257] = {
|
||||||
1, 1, 2, 0, 3, 4, 2, 5, 6, 7, 3, 8, 9, 10, 11, 12,
|
3, 3, 5, 0, 7, 9, 5, 11, 13, 15, 7, 17, 19, 21, 23, 25,
|
||||||
4, 5, 13, 14, 15, 16, 6, 17, 18, 19, 20, 21, 7, 22, 23, 24,
|
9, 11, 27, 29, 31, 33, 13, 35, 37, 39, 41, 43, 15, 45, 47, 49,
|
||||||
25, 26, 27, 8, 9, 28, 29, 30, 31, 32, 33, 34, 10, 11, 12, 35,
|
51, 53, 55, 17, 19, 57, 59, 61, 63, 65, 67, 69, 21, 23, 25, 71,
|
||||||
36, 37, 38, 39, 40, 41, 13, 14, 15, 16, 42, 43, 44, 45, 46, 47,
|
73, 75, 77, 79, 81, 83, 27, 29, 31, 33, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 17, 18, 19, 20, 21, 53, 54, 55, 56, 57, 58,
|
97, 99,101,103,105, 35, 37, 39, 41, 43,107,109,111,113,115,117,
|
||||||
59, 60, 61, 64, 1, 22, 23, 24, 25, 26, 27, 62, 63, 2, 3, 4,
|
119,121,123,129, 3, 45, 47, 49, 51, 53, 55,125,127, 5, 7, 9,
|
||||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41,
|
||||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73,
|
||||||
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,
|
||||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31,
|
107,109,111,113,115,117,119,121,123,125,127,129, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64,
|
129,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1237_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1237_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 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1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t dnxhd_1237_run_codes[62] = {
|
static const uint16_t dnxhd_1237_run_codes[62] = {
|
||||||
@ -433,63 +413,46 @@ static const uint8_t dnxhd_1238_ac_bits[257] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1238_ac_level[257] = {
|
static const uint8_t dnxhd_1238_ac_level[257] = {
|
||||||
1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4,
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
|
||||||
12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 22, 6, 7, 23, 24,
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 45, 13, 15, 47, 49,
|
||||||
25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 10,
|
51, 53, 55, 57, 59, 17, 19, 61, 63, 65, 67, 69, 71, 73, 75, 21,
|
||||||
11, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 12, 13, 14, 49,
|
23, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 25, 27, 29, 99,
|
||||||
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 15, 16, 17, 18,
|
101,103,105,107,109,111,113,115,117,119,121,123, 31, 33, 35, 37,
|
||||||
62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
125,127,129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27,
|
||||||
14, 15, 16, 19, 20, 21, 22, 23, 24, 17, 18, 19, 20, 21, 22, 23,
|
29, 31, 33, 39, 41, 43, 45, 47, 49, 35, 37, 39, 41, 43, 45, 47,
|
||||||
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 25,
|
49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 81, 51,
|
||||||
26, 27, 28, 29, 30, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
53, 55, 57, 59, 61, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99,
|
||||||
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 31,
|
101,103,105,107,109,111,113,115,117,119,121,123,125,127,129, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64,
|
129,
|
||||||
}; /* 0 is EOB */
|
}; /* 0 is EOB */
|
||||||
|
|
||||||
static const uint8_t dnxhd_1238_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1238_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
|
0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
|
||||||
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,
|
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0,
|
||||||
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2,
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 1, 1,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|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||||
1,
|
3,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1238_ac_index_flag[257] = {
|
static const uint8_t dnxhd_1238_ac_index_flag[257] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
|
|
||||||
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t dnxhd_1235_1238_1241_run_codes[62] = {
|
static const uint16_t dnxhd_1235_1238_1241_run_codes[62] = {
|
||||||
@ -582,63 +545,43 @@ static const uint8_t dnxhd_1235_1241_ac_bits[257] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1235_1241_ac_level[257] = {
|
static const uint8_t dnxhd_1235_1241_ac_level[257] = {
|
||||||
1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4,
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
|
||||||
12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 7, 22, 23, 24,
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 13, 15, 45, 47, 49,
|
||||||
25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
51, 53, 55, 57, 59, 17, 19, 61, 63, 65, 67, 69, 71, 73, 75, 77,
|
||||||
10, 11, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 12, 13,
|
21, 23, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101, 25, 27,
|
||||||
14, 15, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1,
|
29, 31,103,105,107,109,111,113,115,117,119,121,123,125,127, 3,
|
||||||
16, 17, 18, 19, 64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
33, 35, 37, 39,129, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
|
||||||
13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 18, 19, 20, 21, 22, 23,
|
27, 29, 31, 33, 35, 41, 43, 45, 47, 49, 37, 39, 41, 43, 45, 47,
|
||||||
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
|
||||||
40, 41, 42, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 47,
|
81, 83, 85, 51, 53, 55, 57, 59, 61, 63, 65, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
129, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64,
|
129,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1235_1241_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1235_1241_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
|
0, 2, 0, 0, 0, 0, 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1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1235_1241_run[62] = {
|
static const uint8_t dnxhd_1235_1241_run[62] = {
|
||||||
@ -709,61 +652,42 @@ static const uint8_t dnxhd_1250_ac_bits[257] = {
|
|||||||
16
|
16
|
||||||
};
|
};
|
||||||
static const uint8_t dnxhd_1250_ac_level[257] = {
|
static const uint8_t dnxhd_1250_ac_level[257] = {
|
||||||
1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4,
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
|
||||||
12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 22, 6, 23, 24, 25,
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 45, 13, 47, 49, 51,
|
||||||
26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
53, 55, 57, 59, 15, 17, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
|
||||||
9, 10, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 11,
|
19, 21, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105, 23,
|
||||||
12, 13, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, 2,
|
25, 27,107,109,111,113,115,117,119,121,123,125,127,129, 3, 5,
|
||||||
3, 4, 5, 14, 15, 16, 17, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
7, 9, 11, 29, 31, 33, 35, 13, 15, 17, 19, 21, 23, 25, 27, 29,
|
||||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 18, 19, 20, 21,
|
31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 37, 39, 41, 43,
|
||||||
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
|
55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85,
|
||||||
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 22, 23, 24,
|
87, 89, 91, 93, 95, 97, 99,101,103,105,107,111,113, 45, 47, 49,
|
||||||
25, 26, 27, 54, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31,
|
51, 53, 55,109,115,117,119,121,123,125,127,129, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64
|
129
|
||||||
};
|
};
|
||||||
static const uint8_t dnxhd_1250_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1250_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
|
0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
|
||||||
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
|
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
|
||||||
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
|
||||||
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
|
||||||
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
0, 0, 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_index_flag[257] = {
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
3,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
|
|
||||||
1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
|
|
||||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1
|
|
||||||
};
|
};
|
||||||
static const uint16_t dnxhd_1250_run_codes[62] = {
|
static const uint16_t dnxhd_1250_run_codes[62] = {
|
||||||
0, 4, 5, 12, 26, 27, 28, 58,
|
0, 4, 5, 12, 26, 27, 28, 58,
|
||||||
@ -853,63 +777,43 @@ static const uint8_t dnxhd_1251_ac_bits[257] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1251_ac_level[257] = {
|
static const uint8_t dnxhd_1251_ac_level[257] = {
|
||||||
1, 1, 2, 3, 0, 4, 5, 2, 6, 7, 8, 3, 9, 10, 11, 4,
|
3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
|
||||||
12, 13, 14, 15, 16, 5, 17, 18, 19, 20, 21, 6, 22, 23, 24, 25,
|
25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 13, 45, 47, 49, 51,
|
||||||
26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
53, 55, 57, 59, 15, 17, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
|
||||||
40, 9, 10, 11, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
81, 19, 21, 23, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,
|
||||||
12, 13, 14, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1,
|
25, 27, 29,107,109,111,113,115,117,119,121,123,125,127,129, 3,
|
||||||
2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 9, 10, 11, 12, 13, 14,
|
5, 7, 9, 11, 13, 15, 17, 31, 33, 35, 19, 21, 23, 25, 27, 29,
|
||||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 18,
|
31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 37,
|
||||||
19, 20, 21, 22, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
|
39, 41, 43, 45, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
|
||||||
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
|
85, 87, 89, 91, 93, 95, 97, 99,101,103,105,107,109,111,113,115,
|
||||||
58, 23, 24, 25, 26, 27, 28, 59, 60, 61, 62, 63, 64, 29, 30, 31,
|
117, 47, 49, 51, 53, 55, 57,119,121,123,125,127,129, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64,
|
129,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1251_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1251_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
|
0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
|
||||||
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t dnxhd_1251_run_codes[62] = {
|
static const uint16_t dnxhd_1251_run_codes[62] = {
|
||||||
@ -1002,134 +906,114 @@ static const uint8_t dnxhd_1252_ac_bits[257] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1252_ac_level[257] = {
|
static const uint8_t dnxhd_1252_ac_level[257] = {
|
||||||
1, 1, 2, 3, 2, 0, 4, 5, 6, 7, 3, 8, 9, 10, 11, 12,
|
3, 3, 5, 7, 5, 0, 9, 11, 13, 15, 7, 17, 19, 21, 23, 25,
|
||||||
13, 14, 4, 5, 15, 16, 17, 18, 6, 19, 20, 21, 22, 23, 24, 7,
|
27, 29, 9, 11, 31, 33, 35, 37, 13, 39, 41, 43, 45, 47, 49, 15,
|
||||||
8, 25, 26, 27, 28, 29, 30, 31, 32, 9, 10, 33, 34, 35, 36, 37,
|
17, 51, 53, 55, 57, 59, 61, 63, 65, 19, 21, 67, 69, 71, 73, 75,
|
||||||
38, 39, 40, 41, 11, 12, 13, 42, 43, 44, 45, 46, 47, 48, 49, 50,
|
77, 79, 81, 83, 23, 25, 27, 85, 87, 89, 91, 93, 95, 97, 99,101,
|
||||||
51, 52, 53, 14, 15, 16, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
103,105,107, 29, 31, 33,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 17, 18, 19, 20, 4, 5, 6, 7, 8, 9, 10, 11,
|
129, 3, 5, 7, 35, 37, 39, 41, 9, 11, 13, 15, 17, 19, 21, 23,
|
||||||
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 22,
|
25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 43, 45, 47, 49, 51, 45,
|
||||||
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
|
||||||
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
|
79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,107,109,
|
||||||
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 26, 27, 28, 29, 30, 31,
|
111,113,115,117,119,121,123,125,127,129, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
|
||||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
|
||||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
||||||
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
|
||||||
64,
|
129,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t dnxhd_1252_ac_run_flag[257] = {
|
static const uint8_t dnxhd_1252_ac_flags[257] = {
|
||||||
0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||||
0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
|
0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2,
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
|
2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0,
|
1, 1, 1, 1, 1, 1, 1, 1,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
|
3,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const CIDEntry ff_dnxhd_cid_table[] = {
|
const CIDEntry ff_dnxhd_cid_table[] = {
|
||||||
{ 1235, 1920, 1080, 0, 917504, 917504, 6, 10,
|
{ 1235, 1920, 1080, 0, 917504, 917504, 6, 10, 4,
|
||||||
dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight,
|
dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight,
|
||||||
dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
|
dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
|
||||||
dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
|
dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
|
||||||
dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag,
|
dnxhd_1235_1241_ac_flags,
|
||||||
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
|
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
|
||||||
{ 175, 185, 365, 440 } },
|
{ 175, 185, 365, 440 } },
|
||||||
{ 1237, 1920, 1080, 0, 606208, 606208, 4, 8,
|
{ 1237, 1920, 1080, 0, 606208, 606208, 4, 8, 3,
|
||||||
dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
|
dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
|
||||||
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
||||||
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
||||||
dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag,
|
dnxhd_1237_ac_flags,
|
||||||
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
||||||
{ 115, 120, 145, 240, 290 } },
|
{ 115, 120, 145, 240, 290 } },
|
||||||
{ 1238, 1920, 1080, 0, 917504, 917504, 4, 8,
|
{ 1238, 1920, 1080, 0, 917504, 917504, 4, 8, 4,
|
||||||
dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight,
|
dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight,
|
||||||
dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
|
dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
|
||||||
dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
|
dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
|
||||||
dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag,
|
dnxhd_1238_ac_flags,
|
||||||
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
|
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
|
||||||
{ 175, 185, 220, 365, 440 } },
|
{ 175, 185, 220, 365, 440 } },
|
||||||
{ 1241, 1920, 1080, 1, 917504, 458752, 6, 10,
|
{ 1241, 1920, 1080, 1, 917504, 458752, 6, 10, 4,
|
||||||
dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight,
|
dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight,
|
||||||
dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
|
dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
|
||||||
dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
|
dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
|
||||||
dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag,
|
dnxhd_1235_1241_ac_flags,
|
||||||
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
|
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
|
||||||
{ 185, 220 } },
|
{ 185, 220 } },
|
||||||
{ 1242, 1920, 1080, 1, 606208, 303104, 4, 8,
|
{ 1242, 1920, 1080, 1, 606208, 303104, 4, 8, 3,
|
||||||
dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight,
|
dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight,
|
||||||
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
||||||
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
||||||
dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag,
|
dnxhd_1237_ac_flags,
|
||||||
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
||||||
{ 120, 145 } },
|
{ 120, 145 } },
|
||||||
{ 1243, 1920, 1080, 1, 917504, 458752, 4, 8,
|
{ 1243, 1920, 1080, 1, 917504, 458752, 4, 8, 4,
|
||||||
dnxhd_1243_luma_weight, dnxhd_1243_chroma_weight,
|
dnxhd_1243_luma_weight, dnxhd_1243_chroma_weight,
|
||||||
dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
|
dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
|
||||||
dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
|
dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
|
||||||
dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag,
|
dnxhd_1238_ac_flags,
|
||||||
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
|
dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
|
||||||
{ 185, 220 } },
|
{ 185, 220 } },
|
||||||
{ 1250, 1280, 720, 0, 458752, 458752, 6, 10,
|
{ 1250, 1280, 720, 0, 458752, 458752, 6, 10, 4,
|
||||||
dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight,
|
dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight,
|
||||||
dnxhd_1250_dc_codes, dnxhd_1250_dc_bits,
|
dnxhd_1250_dc_codes, dnxhd_1250_dc_bits,
|
||||||
dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_level,
|
dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_level,
|
||||||
dnxhd_1250_ac_run_flag, dnxhd_1250_ac_index_flag,
|
dnxhd_1250_ac_flags,
|
||||||
dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run,
|
dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run,
|
||||||
{ 90, 180, 220 } },
|
{ 90, 180, 220 } },
|
||||||
{ 1251, 1280, 720, 0, 458752, 458752, 4, 8,
|
{ 1251, 1280, 720, 0, 458752, 458752, 4, 8, 4,
|
||||||
dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight,
|
dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight,
|
||||||
dnxhd_1251_dc_codes, dnxhd_1251_dc_bits,
|
dnxhd_1251_dc_codes, dnxhd_1251_dc_bits,
|
||||||
dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_level,
|
dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_level,
|
||||||
dnxhd_1251_ac_run_flag, dnxhd_1251_ac_index_flag,
|
dnxhd_1251_ac_flags,
|
||||||
dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
|
dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
|
||||||
{ 90, 110, 175, 220 } },
|
{ 90, 110, 175, 220 } },
|
||||||
{ 1252, 1280, 720, 0, 303104, 303104, 4, 8,
|
{ 1252, 1280, 720, 0, 303104, 303104, 4, 8, 5,
|
||||||
dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight,
|
dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight,
|
||||||
dnxhd_1252_dc_codes, dnxhd_1252_dc_bits,
|
dnxhd_1252_dc_codes, dnxhd_1252_dc_bits,
|
||||||
dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level,
|
dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level,
|
||||||
dnxhd_1252_ac_run_flag, dnxhd_1252_ac_index_flag,
|
dnxhd_1252_ac_flags,
|
||||||
dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
|
dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
|
||||||
{ 60, 75, 115, 145 } },
|
{ 60, 75, 115, 145 } },
|
||||||
{ 1253, 1920, 1080, 0, 188416, 188416, 4, 8,
|
{ 1253, 1920, 1080, 0, 188416, 188416, 4, 8, 3,
|
||||||
dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
|
dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
|
||||||
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
|
||||||
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
|
||||||
dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag,
|
dnxhd_1237_ac_flags,
|
||||||
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
|
||||||
{ 36, 45, 75, 90 } },
|
{ 36, 45, 75, 90 } },
|
||||||
};
|
};
|
||||||
|
@ -33,11 +33,12 @@ typedef struct {
|
|||||||
unsigned int coding_unit_size;
|
unsigned int coding_unit_size;
|
||||||
int index_bits;
|
int index_bits;
|
||||||
int bit_depth;
|
int bit_depth;
|
||||||
|
int eob_index;
|
||||||
const uint8_t *luma_weight, *chroma_weight;
|
const uint8_t *luma_weight, *chroma_weight;
|
||||||
const uint8_t *dc_codes, *dc_bits;
|
const uint8_t *dc_codes, *dc_bits;
|
||||||
const uint16_t *ac_codes;
|
const uint16_t *ac_codes;
|
||||||
const uint8_t *ac_bits, *ac_level;
|
const uint8_t *ac_bits, *ac_level;
|
||||||
const uint8_t *ac_run_flag, *ac_index_flag;
|
const uint8_t *ac_flags;
|
||||||
const uint16_t *run_codes;
|
const uint16_t *run_codes;
|
||||||
const uint8_t *run_bits, *run;
|
const uint8_t *run_bits, *run;
|
||||||
int bit_rates[5]; ///< Helpher to choose variants, rounded to nearest 5Mb/s
|
int bit_rates[5]; ///< Helpher to choose variants, rounded to nearest 5Mb/s
|
||||||
|
@ -49,6 +49,9 @@ typedef struct DNXHDContext {
|
|||||||
int bit_depth; // 8, 10 or 0 if not initialized at all.
|
int bit_depth; // 8, 10 or 0 if not initialized at all.
|
||||||
void (*decode_dct_block)(struct DNXHDContext *ctx, DCTELEM *block,
|
void (*decode_dct_block)(struct DNXHDContext *ctx, DCTELEM *block,
|
||||||
int n, int qscale);
|
int n, int qscale);
|
||||||
|
int last_qscale;
|
||||||
|
int luma_scale[64];
|
||||||
|
int chroma_scale[64];
|
||||||
} DNXHDContext;
|
} DNXHDContext;
|
||||||
|
|
||||||
#define DNXHD_VLC_BITS 9
|
#define DNXHD_VLC_BITS 9
|
||||||
@ -186,16 +189,22 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
|
|||||||
int level_bias,
|
int level_bias,
|
||||||
int level_shift)
|
int level_shift)
|
||||||
{
|
{
|
||||||
int i, j, index1, index2, len;
|
int i, j, index1, index2, len, flags;
|
||||||
int level, component, sign;
|
int level, component, sign;
|
||||||
|
const int *scale;
|
||||||
const uint8_t *weight_matrix;
|
const uint8_t *weight_matrix;
|
||||||
|
const uint8_t *ac_level = ctx->cid_table->ac_level;
|
||||||
|
const uint8_t *ac_flags = ctx->cid_table->ac_flags;
|
||||||
|
const int eob_index = ctx->cid_table->eob_index;
|
||||||
OPEN_READER(bs, &ctx->gb);
|
OPEN_READER(bs, &ctx->gb);
|
||||||
|
|
||||||
if (n&2) {
|
if (n&2) {
|
||||||
component = 1 + (n&1);
|
component = 1 + (n&1);
|
||||||
|
scale = ctx->chroma_scale;
|
||||||
weight_matrix = ctx->cid_table->chroma_weight;
|
weight_matrix = ctx->cid_table->chroma_weight;
|
||||||
} else {
|
} else {
|
||||||
component = 0;
|
component = 0;
|
||||||
|
scale = ctx->luma_scale;
|
||||||
weight_matrix = ctx->cid_table->luma_weight;
|
weight_matrix = ctx->cid_table->luma_weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,33 +220,32 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
|
|||||||
block[0] = ctx->last_dc[component];
|
block[0] = ctx->last_dc[component];
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "dc %d\n", block[0]);
|
//av_log(ctx->avctx, AV_LOG_DEBUG, "dc %d\n", block[0]);
|
||||||
|
|
||||||
for (i = 1; ; i++) {
|
i = 0;
|
||||||
UPDATE_CACHE(bs, &ctx->gb);
|
|
||||||
GET_VLC(index1, bs, &ctx->gb, ctx->ac_vlc.table,
|
UPDATE_CACHE(bs, &ctx->gb);
|
||||||
DNXHD_VLC_BITS, 2);
|
GET_VLC(index1, bs, &ctx->gb, ctx->ac_vlc.table,
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "index %d\n", index1);
|
DNXHD_VLC_BITS, 2);
|
||||||
level = ctx->cid_table->ac_level[index1];
|
|
||||||
if (!level) { /* EOB */
|
while (index1 != eob_index) {
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "EOB\n");
|
level = ac_level[index1];
|
||||||
break;
|
flags = ac_flags[index1];
|
||||||
}
|
|
||||||
|
|
||||||
sign = SHOW_SBITS(bs, &ctx->gb, 1);
|
sign = SHOW_SBITS(bs, &ctx->gb, 1);
|
||||||
SKIP_BITS(bs, &ctx->gb, 1);
|
SKIP_BITS(bs, &ctx->gb, 1);
|
||||||
|
|
||||||
if (ctx->cid_table->ac_index_flag[index1]) {
|
if (flags & 1) {
|
||||||
level += SHOW_UBITS(bs, &ctx->gb, index_bits) << 6;
|
level += SHOW_UBITS(bs, &ctx->gb, index_bits) << 7;
|
||||||
SKIP_BITS(bs, &ctx->gb, index_bits);
|
SKIP_BITS(bs, &ctx->gb, index_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->cid_table->ac_run_flag[index1]) {
|
if (flags & 2) {
|
||||||
UPDATE_CACHE(bs, &ctx->gb);
|
UPDATE_CACHE(bs, &ctx->gb);
|
||||||
GET_VLC(index2, bs, &ctx->gb, ctx->run_vlc.table,
|
GET_VLC(index2, bs, &ctx->gb, ctx->run_vlc.table,
|
||||||
DNXHD_VLC_BITS, 2);
|
DNXHD_VLC_BITS, 2);
|
||||||
i += ctx->cid_table->run[index2];
|
i += ctx->cid_table->run[index2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > 63) {
|
if (++i > 63) {
|
||||||
av_log(ctx->avctx, AV_LOG_ERROR, "ac tex damaged %d, %d\n", n, i);
|
av_log(ctx->avctx, AV_LOG_ERROR, "ac tex damaged %d, %d\n", n, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -245,13 +253,17 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
|
|||||||
j = ctx->scantable.permutated[i];
|
j = ctx->scantable.permutated[i];
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j);
|
//av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j);
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]);
|
//av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]);
|
||||||
level = (2*level+1) * qscale * weight_matrix[i];
|
level *= scale[i];
|
||||||
if (level_bias < 32 || weight_matrix[i] != level_bias)
|
if (level_bias < 32 || weight_matrix[i] != level_bias)
|
||||||
level += level_bias;
|
level += level_bias;
|
||||||
level >>= level_shift;
|
level >>= level_shift;
|
||||||
|
|
||||||
//av_log(NULL, AV_LOG_DEBUG, "i %d, j %d, end level %d\n", i, j, level);
|
//av_log(NULL, AV_LOG_DEBUG, "i %d, j %d, end level %d\n", i, j, level);
|
||||||
block[j] = (level^sign) - sign;
|
block[j] = (level^sign) - sign;
|
||||||
|
|
||||||
|
UPDATE_CACHE(bs, &ctx->gb);
|
||||||
|
GET_VLC(index1, bs, &ctx->gb, ctx->ac_vlc.table,
|
||||||
|
DNXHD_VLC_BITS, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLOSE_READER(bs, &ctx->gb);
|
CLOSE_READER(bs, &ctx->gb);
|
||||||
@ -282,6 +294,14 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, int x, int y)
|
|||||||
skip_bits1(&ctx->gb);
|
skip_bits1(&ctx->gb);
|
||||||
//av_log(ctx->avctx, AV_LOG_DEBUG, "qscale %d\n", qscale);
|
//av_log(ctx->avctx, AV_LOG_DEBUG, "qscale %d\n", qscale);
|
||||||
|
|
||||||
|
if (qscale != ctx->last_qscale) {
|
||||||
|
for (i = 0; i < 64; i++) {
|
||||||
|
ctx->luma_scale[i] = qscale * ctx->cid_table->luma_weight[i];
|
||||||
|
ctx->chroma_scale[i] = qscale * ctx->cid_table->chroma_weight[i];
|
||||||
|
}
|
||||||
|
ctx->last_qscale = qscale;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
ctx->dsp.clear_block(ctx->blocks[i]);
|
ctx->dsp.clear_block(ctx->blocks[i]);
|
||||||
ctx->decode_dct_block(ctx, ctx->blocks[i], i, qscale);
|
ctx->decode_dct_block(ctx, ctx->blocks[i], i, qscale);
|
||||||
|
@ -122,9 +122,9 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
|
|||||||
alevel -= offset<<6;
|
alevel -= offset<<6;
|
||||||
}
|
}
|
||||||
for (j = 0; j < 257; j++) {
|
for (j = 0; j < 257; j++) {
|
||||||
if (ctx->cid_table->ac_level[j] == alevel &&
|
if (ctx->cid_table->ac_level[j] >> 1 == alevel &&
|
||||||
(!offset || (ctx->cid_table->ac_index_flag[j] && offset)) &&
|
(!offset || (ctx->cid_table->ac_flags[j] & 1) && offset) &&
|
||||||
(!run || (ctx->cid_table->ac_run_flag [j] && run))) {
|
(!run || (ctx->cid_table->ac_flags[j] & 2) && run)) {
|
||||||
assert(!ctx->vlc_codes[index]);
|
assert(!ctx->vlc_codes[index]);
|
||||||
if (alevel) {
|
if (alevel) {
|
||||||
ctx->vlc_codes[index] = (ctx->cid_table->ac_codes[j]<<1)|(sign&1);
|
ctx->vlc_codes[index] = (ctx->cid_table->ac_codes[j]<<1)|(sign&1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user