TUT HEVC Encoder
Loading...
Searching...
No Matches
gop.h
Go to the documentation of this file.
1#ifndef GOP_H_
2#define GOP_H_
3/*****************************************************************************
4 * This file is part of Kvazaar HEVC encoder.
5 *
6 * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 *
12 * * Redistributions of source code must retain the above copyright notice, this
13 * list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright notice, this
16 * list of conditions and the following disclaimer in the documentation and/or
17 * other materials provided with the distribution.
18 *
19 * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
30 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
33 ****************************************************************************/
34
35#include <kvazaar.h>
36
37
39 {
40 .poc_offset = 1,
41 .layer = 1,
42 .qp_offset = 5,
43 .qp_factor = 1.0,
44 .qp_model_offset = -6.5,
45 .qp_model_scale = 0.2590,
46 .is_ref = 1,
47 .ref_neg_count = 4,
48 .ref_neg = { 1, 5, 9, 13 },
49 .ref_pos_count = 0,
50 .ref_pos = { 0 },
51 },
52 {
53 .poc_offset = 2,
54 .layer = 1,
55 .qp_offset = 4,
56 .qp_factor = 1.0,
57 .qp_model_offset = -6.5,
58 .qp_model_scale = 0.2590,
59 .is_ref = 1,
60 .ref_neg_count = 3,
61 .ref_neg = { 1, 2, 6, 10 },
62 .ref_pos_count = 0,
63 .ref_pos = { 0 },
64 },
65 {
66 .poc_offset = 3,
67 .layer = 1,
68 .qp_offset = 5,
69 .qp_factor = 1.0,
70 .qp_model_offset = -6.5,
71 .qp_model_scale = 0.2590,
72 .is_ref = 1,
73 .ref_neg_count = 3,
74 .ref_neg = { 1, 3, 7, 11 },
75 .ref_pos_count = 0,
76 .ref_pos = { 0 },
77 },
78 {
79 .poc_offset = 4,
80 .layer = 1,
81 .qp_offset = 1,
82 .qp_factor = 1.0,
83 .qp_model_offset = 0.0,
84 .qp_model_scale = 0.0,
85 .is_ref = 1,
86 .ref_neg_count = 3,
87 .ref_neg = { 1, 4, 8, 12 },
88 .ref_pos_count = 0,
89 .ref_pos = { 0 },
90 },
91};
92
93
94static const kvz_gop_config kvz_gop_ra8[8] = {
95 {
96 .poc_offset = 8,
97 .layer = 1,
98 .qp_offset = 0,
99 .qp_factor = 1.0,
100 .qp_model_offset = 0.0,
101 .qp_model_scale = 0.0,
102 .is_ref = 1,
103 .ref_neg_count = 3,
104 .ref_neg = { 8, 12, 16 },
105 .ref_pos_count = 0,
106 .ref_pos = { 0 },
107 },
108 {
109 .poc_offset = 4,
110 .layer = 2,
111 .qp_offset = 3,
112 .qp_factor = 1.0,
113 .qp_model_offset = -6.25,
114 .qp_model_scale = 0.25,
115 .is_ref = 1,
116 .ref_neg_count = 2,
117 .ref_neg = { 4, 8 },
118 .ref_pos_count = 1,
119 .ref_pos = { 4 },
120 },
121 {
122 .poc_offset = 2,
123 .layer = 3,
124 .qp_offset = 4,
125 .qp_factor = 1.0,
126 .qp_model_offset = -6.25,
127 .qp_model_scale = 0.25,
128 .is_ref = 1,
129 .ref_neg_count = 2,
130 .ref_neg = { 2, 6 },
131 .ref_pos_count = 2,
132 .ref_pos = { 2, 6 },
133 },
134 {
135 .poc_offset = 1,
136 .layer = 4,
137 .qp_offset = 8,
138 .qp_factor = 1.0,
139 .qp_model_offset = -7.0,
140 .qp_model_scale = 0.245,
141 .is_ref = 0,
142 .ref_neg_count = 1,
143 .ref_neg = { 1 },
144 .ref_pos_count = 3,
145 .ref_pos = { 1, 3, 7 },
146 },
147 {
148 .poc_offset = 3,
149 .layer = 4,
150 .qp_offset = 8,
151 .qp_factor = 1.0,
152 .qp_model_offset = -7.0,
153 .qp_model_scale = 0.245,
154 .is_ref = 0,
155 .ref_neg_count = 2,
156 .ref_neg = { 1, 3 },
157 .ref_pos_count = 2,
158 .ref_pos = { 1, 5 },
159 },
160 {
161 .poc_offset = 6,
162 .layer = 3,
163 .qp_offset = 4,
164 .qp_factor = 1.0,
165 .qp_model_offset = -6.25,
166 .qp_model_scale = 0.25,
167 .is_ref = 1,
168 .ref_neg_count = 2,
169 .ref_neg = { 2, 6 },
170 .ref_pos_count = 1,
171 .ref_pos = { 2 },
172 },
173 {
174 .poc_offset = 5,
175 .layer = 4,
176 .qp_offset = 8,
177 .qp_factor = 1.0,
178 .qp_model_offset = -7.0,
179 .qp_model_scale = 0.245,
180 .is_ref = 0,
181 .ref_neg_count = 2,
182 .ref_neg = { 1, 5 },
183 .ref_pos_count = 2,
184 .ref_pos = { 1, 3 },
185 },
186 {
187 .poc_offset = 7,
188 .layer = 4,
189 .qp_offset = 8,
190 .qp_factor = 1.0,
191 .qp_model_offset = -7.0,
192 .qp_model_scale = 0.245,
193 .is_ref = 0,
194 .ref_neg_count = 3,
195 .ref_neg = { 1, 3, 7 },
196 .ref_pos_count = 1,
197 .ref_pos = { 1 },
198 },
199};
200
201static const kvz_gop_config kvz_gop_ra16[16] = {
202 {
203 .poc_offset = 16,
204 .layer = 1,
205 .qp_offset = 1,
206 .qp_factor = 1.0,
207 .qp_model_offset = 0.0,
208 .qp_model_scale = 0.0,
209 .is_ref = 1,
210 .ref_neg_count = 3,
211 .ref_neg = { 16, 24, 32 },
212 .ref_pos_count = 0,
213 .ref_pos = { 0 },
214 },
215 {
216 .poc_offset = 8,
217 .layer = 2,
218 .qp_offset = 1,
219 .qp_factor = 1.0,
220 .qp_model_offset = -4.8848,
221 .qp_model_scale = 0.2061,
222 .is_ref = 1,
223 .ref_neg_count = 2,
224 .ref_neg = { 8, 16 },
225 .ref_pos_count = 1,
226 .ref_pos = { 8 },
227 },
228 {
229 .poc_offset = 4,
230 .layer = 3,
231 .qp_offset = 4,
232 .qp_factor = 1.0,
233 .qp_model_offset = -5.7476,
234 .qp_model_scale = 0.2286,
235 .is_ref = 1,
236 .ref_neg_count = 2,
237 .ref_neg = { 4, 12 },
238 .ref_pos_count = 2,
239 .ref_pos = { 4, 12 },
240 },
241 {
242 .poc_offset = 2,
243 .layer = 4,
244 .qp_offset = 5,
245 .qp_factor = 1.0,
246 .qp_model_offset = -5.90,
247 .qp_model_scale = 0.2333,
248 .is_ref = 1,
249 .ref_neg_count = 2,
250 .ref_neg = { 2, 10 },
251 .ref_pos_count = 3,
252 .ref_pos = { 2, 6, 14 },
253 },
254 {
255 .poc_offset = 1,
256 .layer = 5,
257 .qp_offset = 6,
258 .qp_factor = 1.0,
259 .qp_model_offset = -7.1444,
260 .qp_model_scale = 0.3,
261 .is_ref = 0,
262 .ref_neg_count = 1,
263 .ref_neg = { 1 },
264 .ref_pos_count = 4,
265 .ref_pos = { 1, 3, 7, 15 },
266 },
267 {
268 .poc_offset = 3,
269 .layer = 5,
270 .qp_offset = 6,
271 .qp_factor = 1.0,
272 .qp_model_offset = -7.1444,
273 .qp_model_scale = 0.3,
274 .is_ref = 0,
275 .ref_neg_count = 2,
276 .ref_neg = { 1, 3 },
277 .ref_pos_count = 3,
278 .ref_pos = { 1, 5, 13 },
279 },
280 {
281 .poc_offset = 6,
282 .layer = 4,
283 .qp_offset = 5,
284 .qp_factor = 1.0,
285 .qp_model_offset = -5.90,
286 .qp_model_scale = 0.2333,
287 .is_ref = 1,
288 .ref_neg_count = 2,
289 .ref_neg = { 2, 6 },
290 .ref_pos_count = 2,
291 .ref_pos = { 2, 10 },
292 },
293 {
294 .poc_offset = 5,
295 .layer = 5,
296 .qp_offset = 6,
297 .qp_factor = 1.0,
298 .qp_model_offset = -7.1444,
299 .qp_model_scale = 0.3,
300 .is_ref = 0,
301 .ref_neg_count = 2,
302 .ref_neg = { 1, 5 },
303 .ref_pos_count = 3,
304 .ref_pos = { 1, 3, 11 },
305 },
306 {
307 .poc_offset = 7,
308 .layer = 5,
309 .qp_offset = 6,
310 .qp_factor = 1.0,
311 .qp_model_offset = -7.1444,
312 .qp_model_scale = 0.3,
313 .is_ref = 0,
314 .ref_neg_count = 3,
315 .ref_neg = { 1, 3, 7 },
316 .ref_pos_count = 2,
317 .ref_pos = { 1, 9 },
318 },
319 {
320 .poc_offset = 12,
321 .layer = 3,
322 .qp_offset = 4,
323 .qp_factor = 1.0,
324 .qp_model_offset = -5.7476,
325 .qp_model_scale = 0.2286,
326 .is_ref = 1,
327 .ref_neg_count = 2,
328 .ref_neg = { 4, 12 },
329 .ref_pos_count = 1,
330 .ref_pos = { 4 },
331 },
332 {
333 .poc_offset = 10,
334 .layer = 4,
335 .qp_offset = 5,
336 .qp_factor = 1.0,
337 .qp_model_offset = -5.90,
338 .qp_model_scale = 0.2333,
339 .is_ref = 1,
340 .ref_neg_count = 2,
341 .ref_neg = { 2, 10 },
342 .ref_pos_count = 2,
343 .ref_pos = { 2, 6 },
344 },
345 {
346 .poc_offset = 9,
347 .layer = 5,
348 .qp_offset = 6,
349 .qp_factor = 1.0,
350 .qp_model_offset = -7.1444,
351 .qp_model_scale = 0.3,
352 .is_ref = 0,
353 .ref_neg_count = 2,
354 .ref_neg = { 1, 9 },
355 .ref_pos_count = 3,
356 .ref_pos = { 1, 3, 7 },
357 },
358 {
359 .poc_offset = 11,
360 .layer = 5,
361 .qp_offset = 6,
362 .qp_factor = 1.0,
363 .qp_model_offset = -7.1444,
364 .qp_model_scale = 0.3,
365 .is_ref = 0,
366 .ref_neg_count = 3,
367 .ref_neg = { 1, 3, 11 },
368 .ref_pos_count = 2,
369 .ref_pos = { 1, 5 },
370 },
371 {
372 .poc_offset = 14,
373 .layer = 4,
374 .qp_offset = 5,
375 .qp_factor = 1.0,
376 .qp_model_offset = -5.90,
377 .qp_model_scale = 0.2333,
378 .is_ref = 1,
379 .ref_neg_count = 3,
380 .ref_neg = { 2, 6, 14 },
381 .ref_pos_count = 1,
382 .ref_pos = { 2 },
383 },
384 {
385 .poc_offset = 13,
386 .layer = 5,
387 .qp_offset = 6,
388 .qp_factor = 1.0,
389 .qp_model_offset = -7.1444,
390 .qp_model_scale = 0.3,
391 .is_ref = 0,
392 .ref_neg_count = 3,
393 .ref_neg = { 1, 5, 13 },
394 .ref_pos_count = 2,
395 .ref_pos = { 1, 3 },
396 },
397 {
398 .poc_offset = 15,
399 .layer = 5,
400 .qp_offset = 6,
401 .qp_factor = 1.0,
402 .qp_model_offset = -7.1444,
403 .qp_model_scale = 0.3,
404 .is_ref = 0,
405 .ref_neg_count = 4,
406 .ref_neg = { 1, 3, 7, 15 },
407 .ref_pos_count = 1,
408 .ref_pos = { 1 },
409 },
410};
411
412#endif // GOP_H_
static const kvz_gop_config kvz_gop_ra8[8]
Definition gop.h:94
static const kvz_gop_config kvz_gop_lowdelay4[4]
Definition gop.h:38
static const kvz_gop_config kvz_gop_ra16[16]
Definition gop.h:201
This file defines the public API of Kvazaar when used as a library.
GoP picture configuration.
Definition kvazaar.h:265