FFmpeg
rv60data.h
Go to the documentation of this file.
1 /*
2  * RV60 decoder
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_RV60DATA_H
22 #define AVCODEC_RV60DATA_H
23 
24 #include <stdint.h>
25 
26 static const uint8_t rv60_candidate_intra_angles[6] = {
27  0, 1, 10, 26, 18, 2
28 };
29 
30 static const uint8_t rv60_ipred_angle[9] = {
31  0, 2, 5, 9, 13, 17, 21, 26, 32
32 };
33 
34 static const uint16_t rv60_ipred_inv_angle[9] = {
35  0, 4096, 1638, 910, 630, 482, 390, 315, 256
36 };
37 
38 static const uint8_t rv60_avail_mask[64] = {
39  0, 1, 0, 3, 0, 1, 0, 7, 0, 1, 0, 3, 0, 1, 0, 0xF,
40  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
43 };
44 
45 static const uint8_t rv60_edge1[4] = {
46  0, 2, 2, 2
47 };
48 
49 static const uint8_t rv60_edge2[4] = {
50  0, 3, 3, 3
51 };
52 
53 static const uint8_t rv60_qp_to_idx[64] = {
54  0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3,
55  3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 0,
56  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
57  2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0, 0
58 };
59 
60 static const uint16_t rv60_quants_b[32] = {
61  60, 67, 76, 85, 96, 108, 121, 136,
62  152, 171, 192, 216, 242, 272, 305, 341,
63  383, 432, 481, 544, 606, 683, 767, 854,
64  963, 1074, 1212, 1392, 1566, 1708, 1978, 2211
65 };
66 
67 static const uint8_t rv60_chroma_quant_dc[32] = {
68  0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
69  14, 15, 15, 16, 17, 18, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23
70 };
71 
72 static const uint8_t rv60_chroma_quant_ac[32] = {
73  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
74  16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, 23, 24, 24, 25, 25
75 };
76 
77 static const uint8_t rv60_dsc_to_lx[][4] = {
78  {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0},
79  {0, 0, 1, 1}, {0, 0, 1, 2}, {0, 0, 2, 0}, {0, 0, 2, 1},
80  {0, 0, 2, 2}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 0, 2},
81  {0, 1, 1, 0}, {0, 1, 1, 1}, {0, 1, 1, 2}, {0, 1, 2, 0},
82  {0, 1, 2, 1}, {0, 1, 2, 2}, {0, 2, 0, 0}, {0, 2, 0, 1},
83  {0, 2, 0, 2}, {0, 2, 1, 0}, {0, 2, 1, 1}, {0, 2, 1, 2},
84  {0, 2, 2, 0}, {0, 2, 2, 1}, {0, 2, 2, 2}, {1, 0, 0, 0},
85  {1, 0, 0, 1}, {1, 0, 0, 2}, {1, 0, 1, 0}, {1, 0, 1, 1},
86  {1, 0, 1, 2}, {1, 0, 2, 0}, {1, 0, 2, 1}, {1, 0, 2, 2},
87  {1, 1, 0, 0}, {1, 1, 0, 1}, {1, 1, 0, 2}, {1, 1, 1, 0},
88  {1, 1, 1, 1}, {1, 1, 1, 2}, {1, 1, 2, 0}, {1, 1, 2, 1},
89  {1, 1, 2, 2}, {1, 2, 0, 0}, {1, 2, 0, 1}, {1, 2, 0, 2},
90  {1, 2, 1, 0}, {1, 2, 1, 1}, {1, 2, 1, 2}, {1, 2, 2, 0},
91  {1, 2, 2, 1}, {1, 2, 2, 2}, {2, 0, 0, 0}, {2, 0, 0, 1},
92  {2, 0, 0, 2}, {2, 0, 1, 0}, {2, 0, 1, 1}, {2, 0, 1, 2},
93  {2, 0, 2, 0}, {2, 0, 2, 1}, {2, 0, 2, 2}, {2, 1, 0, 0},
94  {2, 1, 0, 1}, {2, 1, 0, 2}, {2, 1, 1, 0}, {2, 1, 1, 1},
95  {2, 1, 1, 2}, {2, 1, 2, 0}, {2, 1, 2, 1}, {2, 1, 2, 2},
96  {2, 2, 0, 0}, {2, 2, 0, 1}, {2, 2, 0, 2}, {2, 2, 1, 0},
97  {2, 2, 1, 1}, {2, 2, 1, 2}, {2, 2, 2, 0}, {2, 2, 2, 1},
98  {2, 2, 2, 2}, {3, 0, 0, 0}, {3, 0, 0, 1}, {3, 0, 0, 2},
99  {3, 0, 1, 0}, {3, 0, 1, 1}, {3, 0, 1, 2}, {3, 0, 2, 0},
100  {3, 0, 2, 1}, {3, 0, 2, 2}, {3, 1, 0, 0}, {3, 1, 0, 1},
101  {3, 1, 0, 2}, {3, 1, 1, 0}, {3, 1, 1, 1}, {3, 1, 1, 2},
102  {3, 1, 2, 0}, {3, 1, 2, 1}, {3, 1, 2, 2}, {3, 2, 0, 0},
103  {3, 2, 0, 1}, {3, 2, 0, 2}, {3, 2, 1, 0}, {3, 2, 1, 1},
104  {3, 2, 1, 2}, {3, 2, 2, 0}, {3, 2, 2, 1}, {3, 2, 2, 2},
105 };
106 
107 static const uint8_t rv60_deblock_limits[32][4] = {
108  {0, 0, 128, 0}, {0, 0, 128, 0}, {0, 0, 128, 0}, {0, 0, 128, 0},
109  {0, 0, 128, 0}, {0, 0, 128, 0}, {0, 0, 128, 0}, {0, 0, 128, 0},
110  {0, 0, 128, 3}, {0, 1, 128, 3}, {0, 1, 122, 3}, {1, 1, 96, 4},
111  {1, 1, 75, 4}, {1, 1, 59, 4}, {1, 1, 47, 6}, {1, 1, 37, 6},
112  {1, 1, 29, 6}, {1, 2, 23, 7}, {1, 2, 18, 8}, {1, 2, 15, 8},
113  {1, 2, 13, 9}, {2, 3, 11, 9}, {2, 3, 10, 10}, {2, 3, 9, 10},
114  {2, 4, 8, 11}, {3, 4, 7, 11}, {3, 5, 6, 12}, {3, 5, 5, 13},
115  {3, 5, 4, 14}, {4, 7, 3, 15}, {5, 8, 2, 16}, {5, 9, 1, 17}
116 };
117 
118 #endif /* AVCODEC_RV60DATA_H */
rv60_deblock_limits
static const uint8_t rv60_deblock_limits[32][4]
Definition: rv60data.h:107
rv60_edge2
static const uint8_t rv60_edge2[4]
Definition: rv60data.h:49
rv60_ipred_angle
static const uint8_t rv60_ipred_angle[9]
Definition: rv60data.h:30
rv60_chroma_quant_ac
static const uint8_t rv60_chroma_quant_ac[32]
Definition: rv60data.h:72
rv60_dsc_to_lx
static const uint8_t rv60_dsc_to_lx[][4]
Definition: rv60data.h:77
rv60_avail_mask
static const uint8_t rv60_avail_mask[64]
Definition: rv60data.h:38
rv60_ipred_inv_angle
static const uint16_t rv60_ipred_inv_angle[9]
Definition: rv60data.h:34
rv60_candidate_intra_angles
static const uint8_t rv60_candidate_intra_angles[6]
Definition: rv60data.h:26
rv60_chroma_quant_dc
static const uint8_t rv60_chroma_quant_dc[32]
Definition: rv60data.h:67
rv60_qp_to_idx
static const uint8_t rv60_qp_to_idx[64]
Definition: rv60data.h:53
rv60_edge1
static const uint8_t rv60_edge1[4]
Definition: rv60data.h:45
rv60_quants_b
static const uint16_t rv60_quants_b[32]
Definition: rv60data.h:60