TUT HEVC Encoder
Loading...
Searching...
No Matches
scalinglist.h
Go to the documentation of this file.
1#ifndef SCALINGLIST_H_
2#define SCALINGLIST_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
41#include <stdio.h>
42
43#include "global.h" // IWYU pragma: keep
44
45
46typedef struct {
50 const coeff_t *scaling_list_coeff[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM];
51 const coeff_t *quant_coeff[4][6][6];
53 const double *error_scale[4][6][6];
55
56extern const uint8_t kvz_g_scaling_list_num[4];
57extern const uint16_t kvz_g_scaling_list_size[4];
58
60
61void kvz_scalinglist_init(scaling_list_t * const scaling_list);
62void kvz_scalinglist_destroy(scaling_list_t * const scaling_list);
63
64int kvz_scalinglist_parse(scaling_list_t * const scaling_list, FILE *fp);
65void kvz_scalinglist_process(scaling_list_t *scaling_list, uint8_t bitdepth);
66
67
68
69
70
71
72#endif
Header that is included in every other header.
#define MAX_TILES_PER_DIM
Definition global.h:232
#define SCALING_LIST_NUM
Definition global.h:295
#define SCALING_LIST_SIZE_NUM
Definition global.h:294
#define SCALING_LIST_REM_NUM
Definition global.h:297
int16_t coeff_t
Definition global.h:115
const coeff_t * kvz_scalinglist_get_default(const uint32_t size_id, const uint32_t list_id)
Definition scalinglist.c:266
const uint8_t kvz_g_scaling_list_num[4]
Definition scalinglist.c:42
void kvz_scalinglist_destroy(scaling_list_t *const scaling_list)
Destroy scaling list allocated memory.
Definition scalinglist.c:124
const uint16_t kvz_g_scaling_list_size[4]
Definition scalinglist.c:43
int kvz_scalinglist_parse(scaling_list_t *const scaling_list, FILE *fp)
Definition scalinglist.c:142
void kvz_scalinglist_init(scaling_list_t *const scaling_list)
Initialize scaling lists.
Definition scalinglist.c:86
void kvz_scalinglist_process(scaling_list_t *scaling_list, uint8_t bitdepth)
Definition scalinglist.c:407
Definition scalinglist.h:46
int8_t enable
Definition scalinglist.h:47
int8_t use_default_list
Definition scalinglist.h:48