FFmpeg
vp8data.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include <stdint.h>
20 
21 // cat 1 and 2 are defined in vp8data.h
22 static const uint8_t vp8_dct_cat3_prob[] = {
23  173, 148, 140, 0
24 };
25 static const uint8_t vp8_dct_cat4_prob[] = {
26  176, 155, 140, 135, 0
27 };
28 static const uint8_t vp8_dct_cat5_prob[] = {
29  180, 157, 141, 134, 130, 0
30 };
31 static const uint8_t vp8_dct_cat6_prob[] = {
32  254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0
33 };
34 
35 // only used for cat3 and above; cat 1 and 2 are referenced directly.
36 const uint8_t *const ff_vp8_dct_cat_prob[] = {
41 };
42 
43 const uint8_t ff_vp8_token_update_probs[4][8][3][11] = {
44  {
45  {
46  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
47  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
48  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
49  },
50  {
51  { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
52  { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
53  { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
54  },
55  {
56  { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
57  { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
58  { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
59  },
60  {
61  { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
62  { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
63  { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
64  },
65  {
66  { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
67  { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
68  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
69  },
70  {
71  { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
72  { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
73  { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
74  },
75  {
76  { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 },
77  { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 },
78  { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
79  },
80  {
81  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
82  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
83  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
84  },
85  },
86  {
87  {
88  { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
89  { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 },
90  { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 },
91  },
92  {
93  { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
94  { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
95  { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 },
96  },
97  {
98  { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
99  { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
100  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
101  },
102  {
103  { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
104  { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
105  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
106  },
107  {
108  { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
109  { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
110  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
111  },
112  {
113  { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
114  { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
115  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
116  },
117  {
118  { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
119  { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
120  { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
121  },
122  {
123  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
124  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
125  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
126  },
127  },
128  {
129  {
130  { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 },
131  { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 },
132  { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 },
133  },
134  {
135  { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
136  { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
137  { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 },
138  },
139  {
140  { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
141  { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
142  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
143  },
144  {
145  { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
146  { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
147  { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
148  },
149  {
150  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
151  { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
152  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
153  },
154  {
155  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
156  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
157  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
158  },
159  {
160  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
161  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
162  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
163  },
164  {
165  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
166  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
167  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
168  },
169  },
170  {
171  {
172  { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
173  { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 },
174  { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 },
175  },
176  {
177  { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
178  { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
179  { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 },
180  },
181  {
182  { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 },
183  { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
184  { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 },
185  },
186  {
187  { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
188  { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
189  { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
190  },
191  {
192  { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
193  { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
194  { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
195  },
196  {
197  { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
198  { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
199  { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 },
200  },
201  {
202  { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 },
203  { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
204  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
205  },
206  {
207  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
208  { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
209  { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
210  },
211  },
212 };
vp8_dct_cat4_prob
static const uint8_t vp8_dct_cat4_prob[]
Definition: vp8data.c:25
vp8_dct_cat6_prob
static const uint8_t vp8_dct_cat6_prob[]
Definition: vp8data.c:31
vp8_dct_cat3_prob
static const uint8_t vp8_dct_cat3_prob[]
Definition: vp8data.c:22
ff_vp8_dct_cat_prob
const uint8_t *const ff_vp8_dct_cat_prob[]
Definition: vp8data.c:36
vp8_dct_cat5_prob
static const uint8_t vp8_dct_cat5_prob[]
Definition: vp8data.c:28
ff_vp8_token_update_probs
const uint8_t ff_vp8_token_update_probs[4][8][3][11]
Definition: vp8data.c:43