12 #ifndef AOM_AV1_COMMON_AV1_LOOPFILTER_H_ 13 #define AOM_AV1_COMMON_AV1_LOOPFILTER_H_ 15 #include "config/aom_config.h" 17 #include "aom_ports/mem.h" 18 #include "av1/common/blockd.h" 19 #include "av1/common/seg_common.h" 25 #define MAX_LOOP_FILTER 63 26 #define MAX_SHARPNESS 7 37 enum { VERT_EDGE = 0, HORZ_EDGE = 1, NUM_EDGE_DIRS } UENUM1BYTE(EDGE_DIR);
49 uint8_t mode_ref_delta_enabled;
50 uint8_t mode_ref_delta_update;
54 int8_t ref_deltas[REF_FRAMES];
57 int8_t mode_deltas[MAX_MODE_LF_DELTAS];
63 DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, mblim[SIMD_WIDTH]);
64 DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, lim[SIMD_WIDTH]);
65 DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, hev_thr[SIMD_WIDTH]);
69 loop_filter_thresh lfthr[MAX_LOOP_FILTER + 1];
70 uint8_t lvl[MAX_MB_PLANE][MAX_SEGMENTS][2][REF_FRAMES][MAX_MODE_LF_DELTAS];
73 typedef struct AV1_DEBLOCKING_PARAMETERS {
75 uint8_t filter_length;
77 const loop_filter_thresh *lfthr;
78 } AV1_DEBLOCKING_PARAMETERS;
80 typedef struct LoopFilterWorkerData {
83 struct macroblockd_plane planes[MAX_MB_PLANE];
88 AV1_DEBLOCKING_PARAMETERS params_buf[MAX_MIB_SIZE];
89 TX_SIZE tx_buf[MAX_MIB_SIZE];
98 void av1_loop_filter_init(
struct AV1Common *cm);
100 void av1_loop_filter_frame_init(
struct AV1Common *cm,
int plane_start,
103 void av1_filter_block_plane_vert(
const struct AV1Common *
const cm,
105 const MACROBLOCKD_PLANE *
const plane_ptr,
106 const uint32_t mi_row,
const uint32_t mi_col);
108 void av1_filter_block_plane_horz(
const struct AV1Common *
const cm,
110 const MACROBLOCKD_PLANE *
const plane_ptr,
111 const uint32_t mi_row,
const uint32_t mi_col);
113 void av1_filter_block_plane_vert_opt(
115 const MACROBLOCKD_PLANE *
const plane_ptr,
const uint32_t mi_row,
116 const uint32_t mi_col, AV1_DEBLOCKING_PARAMETERS *params_buf,
117 TX_SIZE *tx_buf,
int num_mis_in_lpf_unit_height_log2);
119 void av1_filter_block_plane_vert_opt_chroma(
121 const MACROBLOCKD_PLANE *
const plane_ptr,
const uint32_t mi_row,
122 const uint32_t mi_col, AV1_DEBLOCKING_PARAMETERS *params_buf,
123 TX_SIZE *tx_buf,
int plane,
bool joint_filter_chroma,
124 int num_mis_in_lpf_unit_height_log2);
126 void av1_filter_block_plane_horz_opt(
128 const MACROBLOCKD_PLANE *
const plane_ptr,
const uint32_t mi_row,
129 const uint32_t mi_col, AV1_DEBLOCKING_PARAMETERS *params_buf,
130 TX_SIZE *tx_buf,
int num_mis_in_lpf_unit_height_log2);
132 void av1_filter_block_plane_horz_opt_chroma(
134 const MACROBLOCKD_PLANE *
const plane_ptr,
const uint32_t mi_row,
135 const uint32_t mi_col, AV1_DEBLOCKING_PARAMETERS *params_buf,
136 TX_SIZE *tx_buf,
int plane,
bool joint_filter_chroma,
137 int num_mis_in_lpf_unit_height_log2);
139 uint8_t av1_get_filter_level(
const struct AV1Common *cm,
140 const loop_filter_info_n *lfi_n,
const int dir_idx,
147 #endif // AOM_AV1_COMMON_AV1_LOOPFILTER_H_ YV12 frame buffer data structure.
Definition: yv12config.h:39
Variables related to current coding block.
Definition: blockd.h:574
Top level common structure used by both encoder and decoder.
Definition: av1_common_int.h:750
Stores the prediction/txfm mode of the current coding block.
Definition: blockd.h:222