1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | /* |
3 | * Hantro VP9 codec driver |
4 | * |
5 | * Copyright (C) 2021 Collabora Ltd. |
6 | */ |
7 | |
8 | struct hantro_g2_mv_probs { |
9 | u8 joint[3]; |
10 | u8 sign[2]; |
11 | u8 class0_bit[2][1]; |
12 | u8 fr[2][3]; |
13 | u8 class0_hp[2]; |
14 | u8 hp[2]; |
15 | u8 classes[2][10]; |
16 | u8 class0_fr[2][2][3]; |
17 | u8 bits[2][10]; |
18 | }; |
19 | |
20 | struct hantro_g2_probs { |
21 | u8 inter_mode[7][4]; |
22 | u8 is_inter[4]; |
23 | u8 uv_mode[10][8]; |
24 | u8 tx8[2][1]; |
25 | u8 tx16[2][2]; |
26 | u8 tx32[2][3]; |
27 | u8 y_mode_tail[4][1]; |
28 | u8 y_mode[4][8]; |
29 | u8 partition[2][16][4]; /* [keyframe][][], [inter][][] */ |
30 | u8 uv_mode_tail[10][1]; |
31 | u8 interp_filter[4][2]; |
32 | u8 comp_mode[5]; |
33 | u8 skip[3]; |
34 | |
35 | u8 pad1[1]; |
36 | |
37 | struct hantro_g2_mv_probs mv; |
38 | |
39 | u8 single_ref[5][2]; |
40 | u8 comp_ref[5]; |
41 | |
42 | u8 pad2[17]; |
43 | |
44 | u8 coef[4][2][2][6][6][4]; |
45 | }; |
46 | |
47 | struct hantro_g2_all_probs { |
48 | u8 kf_y_mode_prob[10][10][8]; |
49 | |
50 | u8 kf_y_mode_prob_tail[10][10][1]; |
51 | u8 ref_pred_probs[3]; |
52 | u8 mb_segment_tree_probs[7]; |
53 | u8 segment_pred_probs[3]; |
54 | u8 ref_scores[4]; |
55 | u8 prob_comppred[2]; |
56 | |
57 | u8 pad1[9]; |
58 | |
59 | u8 kf_uv_mode_prob[10][8]; |
60 | u8 kf_uv_mode_prob_tail[10][1]; |
61 | |
62 | u8 pad2[6]; |
63 | |
64 | struct hantro_g2_probs probs; |
65 | }; |
66 | |
67 | struct mv_counts { |
68 | u32 joints[4]; |
69 | u32 sign[2][2]; |
70 | u32 classes[2][11]; |
71 | u32 class0[2][2]; |
72 | u32 bits[2][10][2]; |
73 | u32 class0_fp[2][2][4]; |
74 | u32 fp[2][4]; |
75 | u32 class0_hp[2][2]; |
76 | u32 hp[2][2]; |
77 | }; |
78 | |
79 | struct symbol_counts { |
80 | u32 inter_mode_counts[7][3][2]; |
81 | u32 sb_ymode_counts[4][10]; |
82 | u32 uv_mode_counts[10][10]; |
83 | u32 partition_counts[16][4]; |
84 | u32 switchable_interp_counts[4][3]; |
85 | u32 intra_inter_count[4][2]; |
86 | u32 comp_inter_count[5][2]; |
87 | u32 single_ref_count[5][2][2]; |
88 | u32 comp_ref_count[5][2]; |
89 | u32 tx32x32_count[2][4]; |
90 | u32 tx16x16_count[2][3]; |
91 | u32 tx8x8_count[2][2]; |
92 | u32 mbskip_count[3][2]; |
93 | |
94 | struct mv_counts mv_counts; |
95 | |
96 | u32 count_coeffs[2][2][6][6][4]; |
97 | u32 count_coeffs8x8[2][2][6][6][4]; |
98 | u32 count_coeffs16x16[2][2][6][6][4]; |
99 | u32 count_coeffs32x32[2][2][6][6][4]; |
100 | |
101 | u32 count_eobs[4][2][2][6][6]; |
102 | }; |
103 | |