11 #ifndef AOM_AV1_ENCODER_PICKCDEF_H_ 12 #define AOM_AV1_ENCODER_PICKCDEF_H_ 14 #include "av1/common/cdef.h" 24 #define REDUCED_PRI_STRENGTHS_LVL1 8 25 #define REDUCED_PRI_STRENGTHS_LVL2 5 26 #define REDUCED_SEC_STRENGTHS_LVL3 2 27 #define REDUCED_PRI_STRENGTHS_LVL4 2 29 #define REDUCED_TOTAL_STRENGTHS_LVL1 \ 30 (REDUCED_PRI_STRENGTHS_LVL1 * CDEF_SEC_STRENGTHS) 31 #define REDUCED_TOTAL_STRENGTHS_LVL2 \ 32 (REDUCED_PRI_STRENGTHS_LVL2 * CDEF_SEC_STRENGTHS) 33 #define REDUCED_TOTAL_STRENGTHS_LVL3 \ 34 (REDUCED_PRI_STRENGTHS_LVL2 * REDUCED_SEC_STRENGTHS_LVL3) 35 #define REDUCED_TOTAL_STRENGTHS_LVL4 \ 36 (REDUCED_PRI_STRENGTHS_LVL4 * REDUCED_SEC_STRENGTHS_LVL3) 37 #define TOTAL_STRENGTHS (CDEF_PRI_STRENGTHS * CDEF_SEC_STRENGTHS) 39 static const int priconv_lvl1[REDUCED_PRI_STRENGTHS_LVL1] = { 0, 1, 2, 3,
41 static const int priconv_lvl2[REDUCED_PRI_STRENGTHS_LVL2] = { 0, 2, 4, 8, 14 };
42 static const int priconv_lvl4[REDUCED_PRI_STRENGTHS_LVL4] = { 0, 11 };
43 static const int secconv_lvl3[REDUCED_SEC_STRENGTHS_LVL3] = { 0, 2 };
44 static const int nb_cdef_strengths[CDEF_PICK_METHODS] = {
46 REDUCED_TOTAL_STRENGTHS_LVL1,
47 REDUCED_TOTAL_STRENGTHS_LVL2,
48 REDUCED_TOTAL_STRENGTHS_LVL3,
49 REDUCED_TOTAL_STRENGTHS_LVL4,
53 typedef void (*copy_fn_t)(uint16_t *dst,
int dstride,
const void *src,
54 int src_voffset,
int src_hoffset,
int sstride,
55 int vsize,
int hsize);
56 typedef uint64_t (*compute_cdef_dist_t)(
void *dst,
int dstride, uint16_t *src,
57 cdef_list *dlist,
int cdef_count,
58 BLOCK_SIZE bsize,
int coeff_shift,
62 typedef struct AV1CdefSyncData {
63 #if CONFIG_MULTITHREAD 65 pthread_mutex_t *mutex_;
66 #endif // CONFIG_MULTITHREAD 89 struct macroblockd_plane plane[MAX_MB_PLANE];
97 compute_cdef_dist_t compute_cdef_dist_fn;
122 int mi_wide_l2[MAX_MB_PLANE];
127 int mi_high_l2[MAX_MB_PLANE];
132 int xdec[MAX_MB_PLANE];
137 int ydec[MAX_MB_PLANE];
141 int bsize[MAX_MB_PLANE];
156 uint64_t (*mse[2])[TOTAL_STRENGTHS];
169 int mi_row,
int mi_col) {
170 const int maxr = AOMMIN(mi_params->
mi_rows - mi_row, MI_SIZE_64X64);
171 const int maxc = AOMMIN(mi_params->
mi_cols - mi_col, MI_SIZE_64X64);
174 for (
int r = 0; r < maxr; ++r, mbmi += stride) {
175 for (
int c = 0; c < maxc; ++c) {
176 if (!mbmi[c]->skip_txfm)
return 0;
195 MI_SIZE_64X64 * fbc];
197 if (sb_all_skip(mi_params, fbr * MI_SIZE_64X64, fbc * MI_SIZE_64X64))
203 (mbmi->
bsize == BLOCK_128X128 || mbmi->
bsize == BLOCK_128X64)) ||
205 (mbmi->
bsize == BLOCK_128X128 || mbmi->
bsize == BLOCK_64X128)))
210 void av1_cdef_mse_calc_block(CdefSearchCtx *cdef_search_ctx,
int fbr,
int fbc,
247 #endif // AOM_AV1_ENCODER_PICKCDEF_H_ MB_MODE_INFO ** mi_grid_base
Definition: av1_common_int.h:535
CDEF_PICK_METHOD
This enumeration defines a variety of CDEF pick methods.
Definition: speed_features.h:156
int mi_cols
Definition: av1_common_int.h:503
Params related to MB_MODE_INFO arrays and related info.
Definition: av1_common_int.h:477
int mi_rows
Definition: av1_common_int.h:498
YV12 frame buffer data structure.
Definition: yv12config.h:38
Variables related to current coding block.
Definition: blockd.h:568
int mi_stride
Definition: av1_common_int.h:543
Top level common structure used by both encoder and decoder.
Definition: av1_common_int.h:723
BLOCK_SIZE bsize
The block size of the current coding block.
Definition: blockd.h:222
Stores the prediction/txfm mode of the current coding block.
Definition: blockd.h:216
Encoder parameters related to multi-threading.
Definition: encoder.h:1375
void av1_cdef_search(struct MultiThreadInfo *mt_info, const YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, AV1_COMMON *cm, MACROBLOCKD *xd, CDEF_PICK_METHOD pick_method, int rdmult)
AV1 CDEF parameter search.