TUT HEVC Encoder
Loading...
Searching...
No Matches
quant-generic.h
Go to the documentation of this file.
1#ifndef STRATEGIES_QUANT_GENERIC_H_
2#define STRATEGIES_QUANT_GENERIC_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#include "tables.h"
46
47#define QUANT_SHIFT 14
48
50void kvz_quant_generic(const encoder_state_t * const state, coeff_t *coef, coeff_t *q_coef, int32_t width,
52
54 const cu_info_t *const cur_cu, const int width, const color_t color,
56 const int in_stride, const int out_stride,
57 const kvz_pixel *const ref_in, const kvz_pixel *const pred_in,
59 bool early_skip);
60
61#endif //STRATEGIES_QUANT_GENERIC_H_
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:302
#define MAX_TILES_PER_DIM
Definition global.h:232
int16_t coeff_t
Definition global.h:115
This file defines the public API of Kvazaar when used as a library.
uint8_t kvz_pixel
Definition kvazaar.h:95
int kvz_quantize_residual_generic(encoder_state_t *const state, const cu_info_t *const cur_cu, const int width, const color_t color, const coeff_scan_order_t scan_order, const int use_trskip, const int in_stride, const int out_stride, const kvz_pixel *const ref_in, const kvz_pixel *const pred_in, kvz_pixel *rec_out, coeff_t *coeff_out, bool early_skip)
Quantize residual and get both the reconstruction and coeffs.
Definition quant-generic.c:198
void kvz_quant_generic(const encoder_state_t *const state, coeff_t *coef, coeff_t *q_coef, int32_t width, int32_t height, int8_t type, int8_t scan_idx, int8_t block_type)
quantize transformed coefficents
Definition quant-generic.c:50
int kvz_strategy_register_quant_generic(void *opaque, uint8_t bitdepth)
Definition quant-generic.c:402
Struct for CU info.
Definition cu.h:130
Definition encoderstate.h:274
Various tables.
coeff_scan_order_t
Definition tables.h:93