mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 00:57:30 +09:00
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
This commit is contained in:
parent
77c9089b7d
commit
368651059a
526 changed files with 34535 additions and 15900 deletions
148
third_party/aom/av1/common/reconinter.h
vendored
148
third_party/aom/av1/common/reconinter.h
vendored
|
|
@ -9,8 +9,8 @@
|
|||
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
||||
*/
|
||||
|
||||
#ifndef AV1_COMMON_RECONINTER_H_
|
||||
#define AV1_COMMON_RECONINTER_H_
|
||||
#ifndef AOM_AV1_COMMON_RECONINTER_H_
|
||||
#define AOM_AV1_COMMON_RECONINTER_H_
|
||||
|
||||
#include "av1/common/filter.h"
|
||||
#include "av1/common/onyxc_int.h"
|
||||
|
|
@ -113,40 +113,48 @@ static INLINE void inter_predictor(const uint8_t *src, int src_stride,
|
|||
const SubpelParams *subpel_params,
|
||||
const struct scale_factors *sf, int w, int h,
|
||||
ConvolveParams *conv_params,
|
||||
InterpFilters interp_filters) {
|
||||
InterpFilters interp_filters,
|
||||
int is_intrabc) {
|
||||
assert(conv_params->do_average == 0 || conv_params->do_average == 1);
|
||||
assert(sf);
|
||||
if (has_scale(subpel_params->xs, subpel_params->ys)) {
|
||||
const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys);
|
||||
assert(IMPLIES(is_intrabc, !is_scaled));
|
||||
if (is_scaled) {
|
||||
av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
|
||||
interp_filters, subpel_params->subpel_x,
|
||||
subpel_params->xs, subpel_params->subpel_y,
|
||||
subpel_params->ys, 1, conv_params, sf);
|
||||
subpel_params->ys, 1, conv_params, sf, is_intrabc);
|
||||
} else {
|
||||
SubpelParams sp = *subpel_params;
|
||||
revert_scale_extra_bits(&sp);
|
||||
av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
|
||||
interp_filters, sp.subpel_x, sp.xs, sp.subpel_y,
|
||||
sp.ys, 0, conv_params, sf);
|
||||
sp.ys, 0, conv_params, sf, is_intrabc);
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE void highbd_inter_predictor(
|
||||
const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride,
|
||||
const SubpelParams *subpel_params, const struct scale_factors *sf, int w,
|
||||
int h, ConvolveParams *conv_params, InterpFilters interp_filters, int bd) {
|
||||
static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
|
||||
uint8_t *dst, int dst_stride,
|
||||
const SubpelParams *subpel_params,
|
||||
const struct scale_factors *sf, int w,
|
||||
int h, ConvolveParams *conv_params,
|
||||
InterpFilters interp_filters,
|
||||
int is_intrabc, int bd) {
|
||||
assert(conv_params->do_average == 0 || conv_params->do_average == 1);
|
||||
assert(sf);
|
||||
if (has_scale(subpel_params->xs, subpel_params->ys)) {
|
||||
av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
|
||||
interp_filters, subpel_params->subpel_x,
|
||||
subpel_params->xs, subpel_params->subpel_y,
|
||||
subpel_params->ys, 1, conv_params, sf, bd);
|
||||
const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys);
|
||||
assert(IMPLIES(is_intrabc, !is_scaled));
|
||||
if (is_scaled) {
|
||||
av1_highbd_convolve_2d_facade(
|
||||
src, src_stride, dst, dst_stride, w, h, interp_filters,
|
||||
subpel_params->subpel_x, subpel_params->xs, subpel_params->subpel_y,
|
||||
subpel_params->ys, 1, conv_params, sf, is_intrabc, bd);
|
||||
} else {
|
||||
SubpelParams sp = *subpel_params;
|
||||
revert_scale_extra_bits(&sp);
|
||||
av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
|
||||
interp_filters, sp.subpel_x, sp.xs,
|
||||
sp.subpel_y, sp.ys, 0, conv_params, sf, bd);
|
||||
av1_highbd_convolve_2d_facade(
|
||||
src, src_stride, dst, dst_stride, w, h, interp_filters, sp.subpel_x,
|
||||
sp.xs, sp.subpel_y, sp.ys, 0, conv_params, sf, is_intrabc, bd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -237,35 +245,6 @@ static INLINE MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd,
|
|||
return clamped_mv;
|
||||
}
|
||||
|
||||
void av1_build_inter_predictors_sby(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col, BUFFER_SET *ctx,
|
||||
BLOCK_SIZE bsize);
|
||||
|
||||
void av1_build_inter_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col, BUFFER_SET *ctx,
|
||||
BLOCK_SIZE bsize);
|
||||
|
||||
void av1_build_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col, BUFFER_SET *ctx,
|
||||
BLOCK_SIZE bsize);
|
||||
|
||||
void av1_build_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst,
|
||||
int dst_stride, const MV *src_mv,
|
||||
const struct scale_factors *sf, int w, int h,
|
||||
ConvolveParams *conv_params,
|
||||
InterpFilters interp_filters,
|
||||
const WarpTypesAllowed *warp_types, int p_col,
|
||||
int p_row, int plane, int ref,
|
||||
enum mv_precision precision, int x, int y,
|
||||
const MACROBLOCKD *xd, int can_use_previous);
|
||||
|
||||
void av1_highbd_build_inter_predictor(
|
||||
const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride,
|
||||
const MV *mv_q3, const struct scale_factors *sf, int w, int h, int do_avg,
|
||||
InterpFilters interp_filters, const WarpTypesAllowed *warp_types, int p_col,
|
||||
int p_row, int plane, enum mv_precision precision, int x, int y,
|
||||
const MACROBLOCKD *xd, int can_use_previous);
|
||||
|
||||
static INLINE int scaled_buffer_offset(int x_offset, int y_offset, int stride,
|
||||
const struct scale_factors *sf) {
|
||||
const int x =
|
||||
|
|
@ -303,32 +282,6 @@ void av1_setup_pre_planes(MACROBLOCKD *xd, int idx,
|
|||
const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
|
||||
const struct scale_factors *sf, const int num_planes);
|
||||
|
||||
// Detect if the block have sub-pixel level motion vectors
|
||||
// per component.
|
||||
#define CHECK_SUBPEL 0
|
||||
static INLINE int has_subpel_mv_component(const MB_MODE_INFO *const mbmi,
|
||||
const MACROBLOCKD *const xd,
|
||||
int dir) {
|
||||
#if CHECK_SUBPEL
|
||||
const BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
int plane;
|
||||
int ref = (dir >> 1);
|
||||
|
||||
if (dir & 0x01) {
|
||||
if (mbmi->mv[ref].as_mv.col & SUBPEL_MASK) return 1;
|
||||
} else {
|
||||
if (mbmi->mv[ref].as_mv.row & SUBPEL_MASK) return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
#else
|
||||
(void)mbmi;
|
||||
(void)xd;
|
||||
(void)dir;
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static INLINE void set_default_interp_filters(
|
||||
MB_MODE_INFO *const mbmi, InterpFilter frame_interp_filter) {
|
||||
mbmi->interp_filters =
|
||||
|
|
@ -343,21 +296,6 @@ static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static INLINE int av1_is_interp_search_needed(const MACROBLOCKD *const xd) {
|
||||
MB_MODE_INFO *const mi = xd->mi[0];
|
||||
const int is_compound = has_second_ref(mi);
|
||||
int ref;
|
||||
for (ref = 0; ref < 1 + is_compound; ++ref) {
|
||||
int row_col;
|
||||
for (row_col = 0; row_col < 2; ++row_col) {
|
||||
const int dir = (ref << 1) + row_col;
|
||||
if (has_subpel_mv_component(mi, xd, dir)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void av1_setup_build_prediction_by_above_pred(
|
||||
MACROBLOCKD *xd, int rel_mi_col, uint8_t above_mi_width,
|
||||
MB_MODE_INFO *above_mbmi, struct build_prediction_ctxt *ctxt,
|
||||
|
|
@ -367,18 +305,6 @@ void av1_setup_build_prediction_by_left_pred(MACROBLOCKD *xd, int rel_mi_row,
|
|||
MB_MODE_INFO *left_mbmi,
|
||||
struct build_prediction_ctxt *ctxt,
|
||||
const int num_planes);
|
||||
void av1_build_prediction_by_above_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col,
|
||||
uint8_t *tmp_buf[MAX_MB_PLANE],
|
||||
int tmp_width[MAX_MB_PLANE],
|
||||
int tmp_height[MAX_MB_PLANE],
|
||||
int tmp_stride[MAX_MB_PLANE]);
|
||||
void av1_build_prediction_by_left_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col,
|
||||
uint8_t *tmp_buf[MAX_MB_PLANE],
|
||||
int tmp_width[MAX_MB_PLANE],
|
||||
int tmp_height[MAX_MB_PLANE],
|
||||
int tmp_stride[MAX_MB_PLANE]);
|
||||
void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col,
|
||||
uint8_t *above[MAX_MB_PLANE],
|
||||
|
|
@ -389,8 +315,6 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
|||
const uint8_t *av1_get_obmc_mask(int length);
|
||||
void av1_count_overlappable_neighbors(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col);
|
||||
void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int mi_row, int mi_col);
|
||||
|
||||
#define MASK_MASTER_SIZE ((MAX_WEDGE_SIZE) << 1)
|
||||
#define MASK_MASTER_STRIDE (MASK_MASTER_SIZE)
|
||||
|
|
@ -406,12 +330,6 @@ static INLINE const uint8_t *av1_get_contiguous_soft_mask(int wedge_index,
|
|||
const uint8_t *av1_get_compound_type_mask(
|
||||
const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type);
|
||||
|
||||
void av1_build_interintra_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
uint8_t *ypred, uint8_t *upred,
|
||||
uint8_t *vpred, int ystride, int ustride,
|
||||
int vstride, BUFFER_SET *ctx,
|
||||
BLOCK_SIZE bsize);
|
||||
|
||||
// build interintra_predictors for one plane
|
||||
void av1_build_interintra_predictors_sbp(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
uint8_t *pred, int stride,
|
||||
|
|
@ -431,18 +349,6 @@ void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
|
|||
const uint8_t *inter_pred, int inter_stride,
|
||||
const uint8_t *intra_pred, int intra_stride);
|
||||
|
||||
// Encoder only
|
||||
void av1_build_inter_predictors_for_planes_single_buf(
|
||||
MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, int mi_row,
|
||||
int mi_col, int ref, uint8_t *ext_dst[3], int ext_dst_stride[3],
|
||||
int can_use_previous);
|
||||
void av1_build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, BLOCK_SIZE bsize,
|
||||
int plane_from, int plane_to,
|
||||
uint8_t *ext_dst0[3],
|
||||
int ext_dst_stride0[3],
|
||||
uint8_t *ext_dst1[3],
|
||||
int ext_dst_stride1[3]);
|
||||
|
||||
void av1_jnt_comp_weight_assign(const AV1_COMMON *cm, const MB_MODE_INFO *mbmi,
|
||||
int order_idx, int *fwd_offset, int *bck_offset,
|
||||
int *use_jnt_comp_avg, int is_compound);
|
||||
|
|
@ -456,4 +362,4 @@ int av1_allow_warp(const MB_MODE_INFO *const mbmi,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // AV1_COMMON_RECONINTER_H_
|
||||
#endif // AOM_AV1_COMMON_RECONINTER_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue