|
TUT HEVC Encoder
|
#include "filter.h"#include <stdlib.h>#include "cu.h"#include "encoder.h"#include "kvazaar.h"#include "transform.h"#include "videoframe.h"Variables | |
| const uint8_t | kvz_g_tc_table_8x8 [54] |
| const uint8_t | kvz_g_beta_table_8x8 [52] |
| const int8_t | kvz_g_luma_filter [4][8] |
| const int8_t | kvz_g_chroma_filter [8][4] |
|
static |
The caller should check that the edge is a TU boundary or a PU boundary.
.-- filter this edge if dir == EDGE_HOR
v
+--------+
|o <-- pixel at (x, y)
| |
|<-- filter this edge if dir == EDGE_VER
| |
+--------+| state | encoder state |
| x | x-coordinate in chroma pixels (see above) |
| y | y-coordinate in chroma pixels (see above) |
| length | length of the edge in chroma pixels |
| dir | direction of the edge to filter |
| tu_boundary | whether the edge is a TU boundary |
|
static |
The caller should check that the edge is a TU boundary or a PU boundary.
.-- filter this edge if dir == EDGE_HOR
v
+--------+
|o <-- pixel at (x, y)
| |
|<-- filter this edge if dir == EDGE_VER
| |
+--------+| state | encoder state |
| x | x-coordinate in pixels (see above) |
| y | y-coordinate in pixels (see above) |
| length | length of the edge in pixels |
| dir | direction of the edge to filter |
| tu_boundary | whether the edge is a TU boundary |
|
static |
| state | encoder state |
| x_px | block x-position in pixels |
| y_px | block y-position in pixels |
| dir | direction of the edges to filter |
Recursively traverse the CU/TU quadtree. At the lowest level, apply the deblocking filter to the left edge (when dir == EDGE_VER) or the top edge (when dir == EDGE_HOR) as needed. Both luma and chroma are filtered.
|
static |
| state | encoder state |
| x_px | x-coordinate of the right edge of the LCU in pixels |
| y_px | y-coordinate of the top edge of the LCU in pixels |
|
static |
| state | encoder state |
| x | block x-position in pixels |
| y | block y-position in pixels |
| width | block width in pixels |
| height | block height in pixels |
| dir | direction of the edges to filter |
| tu_boundary | whether the edge is a TU boundary |
|
inlinestatic |
| x | x-coordinate of the edge |
| y | y-coordinate of the edge |
| dir | direction of the edge |
|
static |
| state | encoder state |
| x | x-coordinate of the scu in pixels |
| y | y-coordinate of the scu in pixels |
| dir | direction of the edge to check |
|
static |
| state | encoder state |
| x | x-coordinate of the scu in pixels |
| y | y-coordinate of the scu in pixels |
| dir | direction of the edge to check |
|
inlinestatic |
| void kvz_filter_deblock_lcu | ( | encoder_state_t *const | state, |
| int | x_px, | ||
| int | y_px | ||
| ) |
Filter the following vertical edges (horizontal filtering):
Filter the following horizontal edges (vertical filtering):
What is not filtered:
| state | encoder state |
| x_px | x-coordinate of the left edge of the LCU in pixels |
| y_px | y-coordinate of the top edge of the LCU in pixels |
| line | line of 8 pixels, with center at index 4 |
| tc | tc treshold |
|
inlinestatic |
| encoder | Encoder |
| line | Line of 8 pixels, with center at index 4 |
| tc | The tc treshold |
| p_2nd | Whether to filter the 2nd line of P |
| q_2nd | Whether to filter the 2nd line of Q |
|
inlinestatic |