TUT HEVC Encoder
|
#include "encoderstate.h"
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cabac.h"
#include "context.h"
#include "encode_coding_tree.h"
#include "encoder_state-bitstream.h"
#include "filter.h"
#include "image.h"
#include "rate_control.h"
#include "sao.h"
#include "search.h"
#include "tables.h"
#include "threadqueue.h"
#include "strategies/strategies-picture.h"
Macros | |
#define | _USE_MATH_DEFINES |
#define | SAO_BUF_WIDTH (1 + SAO_DELAY_PX + LCU_WIDTH) |
#define | SAO_BUF_WIDTH_C (1 + SAO_DELAY_PX/2 + LCU_WIDTH_C) |
Variables | |
static const double | ERP_AQP_STRENGTH = 3.0 |
Strength of QP adjustments when using adaptive QP for 360 video. | |
#define _USE_MATH_DEFINES |
#define SAO_BUF_WIDTH (1 + SAO_DELAY_PX + LCU_WIDTH) |
#define SAO_BUF_WIDTH_C (1 + SAO_DELAY_PX/2 + LCU_WIDTH_C) |
|
static |
|
static |
|
static |
sao_type_idx_luma: TR, cMax = 2, cRiceParam = 0, bins = {0, bypass} sao_type_idx_chroma: TR, cMax = 2, cRiceParam = 0, bins = {0, bypass}
sao_offset_abs[][][][]: TR, cMax = (1 << (Min(bitDepth, 10) - 5)) - 1, cRiceParam = 0, bins = {bypass x N}
sao_offset_sign[][][][]: FL, cMax = 1, bins = {bypass} sao_band_position[][][]: FL, cMax = 31, bins = {bypass x N} sao_eo_class_luma: FL, cMax = 3, bins = {bypass x 3} sao_eo_class_chroma: FL, cMax = 3, bins = {bypass x 3}
|
static |
|
static |
|
static |
Does SAO reconstruction for all pixels that are available after the given LCU has been deblocked. This means the following pixels:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Copies pixels at the edges of the area that will be filtered with SAO to the given buffers. If deblocking is enabled, the pixels must have been deblocked before this.
The saved pixels will be needed later when doing SAO for the neighboring areas.
|
static |
|
static |
|
static |
|
static |
Updates the ROI parameters in frame->roi.
encoder | encoder control |
frame | frame that will have the ROI map |
void kvz_encode_one_frame | ( | encoder_state_t *const | state, |
kvz_picture * | frame | ||
) |
void kvz_encoder_create_ref_lists | ( | const encoder_state_t *const | state | ) |
state | main encoder state |
void kvz_encoder_prepare | ( | encoder_state_t * | state | ) |
int kvz_encoder_state_match_children_of_previous_frame | ( | encoder_state_t *const | state | ) |
lcu_stats_t * kvz_get_lcu_stats | ( | encoder_state_t * | state, |
int | lcu_x, | ||
int | lcu_y | ||
) |
coeff_scan_order_t kvz_get_scan_order | ( | int8_t | cu_type, |
int | intra_mode, | ||
int | depth | ||
) |
|
static |
|
static |
|
static |
The QPs are used in deblocking and QP prediction.
The QP delta for a quantization group is coded when the first CU with coded block flag set is encountered. Hence, for the purposes of deblocking and QP prediction, all CUs in before the first one that has cbf set use the QP predictor and all CUs after that use (QP predictor
state | encoder state |
x | x-coordinate of the left edge of the root CU |
y | y-coordinate of the top edge of the root CU |
depth | depth in the CU quadtree |
last_qp | QP of the last CU in the last quantization group |
prev_qp | -1 if QP delta has not been coded in current QG, otherwise the QP of the current QG |
Returns the scaling factor of area from equirectangular projection to spherical surface.
y | y-coordinate of the pixel |
h | height of the picture |