TUT HEVC Encoder
intra.h
Go to the documentation of this file.
1#ifndef INTRA_H_
2#define INTRA_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 "cu.h"
42#include "encoderstate.h"
43#include "global.h" // IWYU pragma: keep
44#include "kvazaar.h"
45
46
47typedef struct {
48 kvz_pixel left[2 * 32 + 1];
49 kvz_pixel top[2 * 32 + 1];
51typedef struct
52{
57
58
70 const uint32_t x,
71 const uint32_t y,
72 int8_t *preds,
73 const cu_info_t *const cur_pu,
74 const cu_info_t *const left_pu,
75 const cu_info_t *const above_pu);
76
77#if KVZ_SEL_ENCRYPTION
88int8_t kvz_intra_get_dir_luma_predictor_encry(
89const uint32_t x,
90const uint32_t y,
91int8_t *preds,
92const cu_info_t *const cur_pu,
93const cu_info_t *const left_pu,
94const cu_info_t *const above_pu);
95#endif
96
108 const int_fast8_t log2_width,
109 const color_t color,
110 const vector2d_t *const luma_px,
111 const vector2d_t *const pic_px,
112 const lcu_t *const lcu,
113 kvz_intra_references *const refs);
114
126 int_fast8_t log2_width,
127 int_fast8_t mode,
128 color_t color,
129 kvz_pixel *dst,
130 bool filter_boundary);
131
133 encoder_state_t *const state,
134 int x,
135 int y,
136 int depth,
137 int8_t mode_luma,
138 int8_t mode_chroma,
139 cu_info_t *cur_cu,
140 lcu_t *lcu);
141
142#endif
Coding Unit data structure and related functions.
Top level of the encoder implementation.
Header that is included in every other header.
color_t
Definition: global.h:309
void kvz_intra_recon_cu(encoder_state_t *const state, int x, int y, int depth, int8_t mode_luma, int8_t mode_chroma, cu_info_t *cur_cu, lcu_t *lcu)
Reconstruct an intra CU.
Definition: intra.c:623
void kvz_intra_predict(kvz_intra_references *refs, int_fast8_t log2_width, int_fast8_t mode, color_t color, kvz_pixel *dst, bool filter_boundary)
Generate intra predictions.
Definition: intra.c:252
int8_t kvz_intra_get_dir_luma_predictor(const uint32_t x, const uint32_t y, int8_t *preds, const cu_info_t *const cur_pu, const cu_info_t *const left_pu, const cu_info_t *const above_pu)
Function for deriving intra luma predictions.
Definition: intra.c:84
void kvz_intra_build_reference(const int_fast8_t log2_width, const color_t color, const vector2d_t *const luma_px, const vector2d_t *const pic_px, const lcu_t *const lcu, kvz_intra_references *const refs)
Generage angular predictions.
Definition: intra.c:545
This file defines the public API of Kvazaar when used as a library.
uint8_t kvz_pixel
Definition: kvazaar.h:95
Struct for CU info.
Definition: cu.h:130
Definition: encoderstate.h:274
Definition: intra.h:47
Definition: intra.h:52
bool filtered_initialized
Definition: intra.h:55
kvz_intra_ref ref
Definition: intra.h:53
kvz_intra_ref filtered_ref
Definition: intra.h:54
Definition: cu.h:299
Definition: cu.h:121