typedefvoid (*copy_fn_t)(uint16_t *dst, int dstride, const uint8_t *src, int src_voffset, int src_hoffset, int sstride, int vsize, int hsize); typedef uint64_t (*compute_cdef_dist_t)(void *dst, int dstride, uint16_t *src,
cdef_list *dlist, int cdef_count,
BLOCK_SIZE bsize, int coeff_shift, int row, int col);
/*! \brief CDEF search context.
*/ typedefstruct { /*! *Pointertotheframebufferholdingthesourceframe
*/ const YV12_BUFFER_CONFIG *ref; /*! *PointertoparamsrelatedtoMB_MODE_INFOarraysandrelatedinfo
*/
CommonModeInfoParams *mi_params; /*! *Infospecifictoeachplane
*/ struct macroblockd_plane plane[MAX_MB_PLANE]; /*! *Functionpointerofcopy_fn
*/
copy_fn_t copy_fn; /*! *Functionpointerofcompute_cdef_dist_fn
*/
compute_cdef_dist_t compute_cdef_dist_fn; /*! *NumberofstrenghtsevaluatedinCDEFfiltersearch
*/ int total_strengths; /*! *Bit-depthdependentshift
*/ int coeff_shift; /*! *CDEFdampingfactor
*/ int damping; /*! *SearchmethodusedtoselectCDEFparameters
*/ int pick_method; /*! *Numberofplanes
*/ int num_planes; /*! *Log2ofwidthoftheMIunitinpixels.mi_wide_l2[i] *indicatesthewidthoftheMIunitinpixelsfortheithplane
*/ int mi_wide_l2[MAX_MB_PLANE]; /*! *Log2ofheightoftheMIunitinpixels.mi_high_l2[i] *indicatestheheightoftheMIunitinpixelsfortheithplane
*/ int mi_high_l2[MAX_MB_PLANE]; /*! *Subsamplinginxdirection.xdec[i]indicatesthesubsampling *fortheithplane
*/ int xdec[MAX_MB_PLANE]; /*! *Subsamplinginydirection.ydec[i]indicatesthesubsampling *fortheithplane
*/ int ydec[MAX_MB_PLANE]; /*! *bsize[i]indicatestheblocksizeofithplane
*/ int bsize[MAX_MB_PLANE]; /*! *Numberof64x64blocksinverticaldirectionofaframe
*/ int nvfb; /*! *Numberof64x64blocksinhorizontaldirectionofaframe
*/ int nhfb; /*! *PointertothemeansquarederrorbetweentheCDEFfilteredblockandthe *sourceblock.mse[i][j][k]storestheMSEoftheithplane(i=0corresponds *toY-plane,i=1correspondstoUandVplanes),jthblockandkthstrength *index
*/
uint64_t (*mse[2])[TOTAL_STRENGTHS]; /*! *Holdstheposition(inunitsofmi's)ofthecdeffiltered *blockinrasterscanorder
*/ int *sb_index; /*! *Holdsthecountofcdeffilteredblocks
*/ int sb_count; /*! *Indicatesif16bitframebuffersaretobeusedi.e.,thecontentbit-depth *is>8-bit
*/ bool use_highbitdepth;
} CdefSearchCtx;
staticinlineint sb_all_skip(const CommonModeInfoParams *const mi_params, int mi_row, int mi_col) { constint maxr = AOMMIN(mi_params->mi_rows - mi_row, MI_SIZE_64X64); constint maxc = AOMMIN(mi_params->mi_cols - mi_col, MI_SIZE_64X64); constint stride = mi_params->mi_stride;
MB_MODE_INFO **mbmi = mi_params->mi_grid_base + mi_row * stride + mi_col; for (int r = 0; r < maxr; ++r, mbmi += stride) { for (int c = 0; c < maxc; ++c) { if (!mbmi[c]->skip_txfm) return0;
}
} return1;
}
// Checks if cdef processing can be skipped for particular sb. // Inputs: // cdef_search_ctx: Pointer to the structure containing parameters related to // CDEF search context. // fbr: Row index in units of 64x64 block // fbc: Column index in units of 64x64 block // Returns: // 1/0 will be returned to indicate skip/don't skip cdef processing of sb // respectively. staticinlineint cdef_sb_skip(const CommonModeInfoParams *const mi_params, int fbr, int fbc) { const MB_MODE_INFO *const mbmi =
mi_params->mi_grid_base[MI_SIZE_64X64 * fbr * mi_params->mi_stride +
MI_SIZE_64X64 * fbc]; // No filtering if the entire filter block is skipped. if (sb_all_skip(mi_params, fbr * MI_SIZE_64X64, fbc * MI_SIZE_64X64)) return1; // Skip odd numbered 64x64 block rows(cols) when bsize is BLOCK_128X128, // BLOCK_64X128(BLOCK_128X128, BLOCK_128X64) as for such blocks CDEF filtering // is done at the corresponding block sizes. if (((fbc & 1) &&
(mbmi->bsize == BLOCK_128X128 || mbmi->bsize == BLOCK_128X64)) ||
((fbr & 1) &&
(mbmi->bsize == BLOCK_128X128 || mbmi->bsize == BLOCK_64X128))) return1; return0;
}
void av1_cdef_mse_calc_block(CdefSearchCtx *cdef_search_ctx, struct aom_internal_error_info *error_info, int fbr, int fbc, int sb_count, int adaptive_cdef_mode); /*!\endcond */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.