mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 23:37:31 +09:00
Update aom to slightly newer commit ID
This commit is contained in:
parent
1c8af26369
commit
76f1e6edca
311 changed files with 55292 additions and 33790 deletions
190
third_party/aom/av1/common/mvref_common.h
vendored
190
third_party/aom/av1/common/mvref_common.h
vendored
|
|
@ -18,11 +18,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CONFIG_REF_MV
|
||||
#define MVREF_NEIGHBOURS 9
|
||||
#else
|
||||
#define MVREF_NEIGHBOURS 8
|
||||
#endif
|
||||
|
||||
typedef struct position {
|
||||
int row;
|
||||
|
|
@ -45,7 +41,7 @@ typedef enum {
|
|||
// adding 9 for each intra block, 3 for each zero mv and 1 for each new
|
||||
// motion vector. This single number is then converted into a context
|
||||
// with a single lookup ( counter_to_context ).
|
||||
static const int mode_2_counter[MB_MODE_COUNT] = {
|
||||
static const int mode_2_counter[] = {
|
||||
9, // DC_PRED
|
||||
9, // V_PRED
|
||||
9, // H_PRED
|
||||
|
|
@ -56,7 +52,11 @@ static const int mode_2_counter[MB_MODE_COUNT] = {
|
|||
9, // D207_PRED
|
||||
9, // D63_PRED
|
||||
#if CONFIG_ALT_INTRA
|
||||
9, // SMOOTH_PRED
|
||||
9, // SMOOTH_PRED
|
||||
#if CONFIG_SMOOTH_HV
|
||||
9, // SMOOTH_V_PRED
|
||||
9, // SMOOTH_H_PRED
|
||||
#endif // CONFIG_SMOOTH_HV
|
||||
#endif // CONFIG_ALT_INTRA
|
||||
9, // TM_PRED
|
||||
0, // NEARESTMV
|
||||
|
|
@ -72,8 +72,6 @@ static const int mode_2_counter[MB_MODE_COUNT] = {
|
|||
1, // SR_NEW_NEWMV
|
||||
#endif // CONFIG_COMPOUND_SINGLEREF
|
||||
0, // NEAREST_NEARESTMV
|
||||
0, // NEAREST_NEARMV
|
||||
0, // NEAR_NEARESTMV
|
||||
0, // NEAR_NEARMV
|
||||
1, // NEAREST_NEWMV
|
||||
1, // NEW_NEARESTMV
|
||||
|
|
@ -109,158 +107,6 @@ static const int counter_to_context[19] = {
|
|||
BOTH_INTRA // 18
|
||||
};
|
||||
|
||||
#if !CONFIG_REF_MV
|
||||
static const POSITION mv_ref_blocks[BLOCK_SIZES][MVREF_NEIGHBOURS] = {
|
||||
// 4X4
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, -1 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, -1 },
|
||||
{ -1, -2 },
|
||||
{ -2, -2 } },
|
||||
// 4X8
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, -1 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, -1 },
|
||||
{ -1, -2 },
|
||||
{ -2, -2 } },
|
||||
// 8X4
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, -1 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, -1 },
|
||||
{ -1, -2 },
|
||||
{ -2, -2 } },
|
||||
// 8X8
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, -1 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, -1 },
|
||||
{ -1, -2 },
|
||||
{ -2, -2 } },
|
||||
// 8X16
|
||||
{ { 0, -1 },
|
||||
{ -1, 0 },
|
||||
{ 1, -1 },
|
||||
{ -1, -1 },
|
||||
{ 0, -2 },
|
||||
{ -2, 0 },
|
||||
{ -2, -1 },
|
||||
{ -1, -2 } },
|
||||
// 16X8
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 1 },
|
||||
{ -1, -1 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -1, -2 },
|
||||
{ -2, -1 } },
|
||||
// 16X16
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 1 },
|
||||
{ 1, -1 },
|
||||
{ -1, -1 },
|
||||
{ -3, 0 },
|
||||
{ 0, -3 },
|
||||
{ -3, -3 } },
|
||||
// 16X32
|
||||
{ { 0, -1 },
|
||||
{ -1, 0 },
|
||||
{ 2, -1 },
|
||||
{ -1, -1 },
|
||||
{ -1, 1 },
|
||||
{ 0, -3 },
|
||||
{ -3, 0 },
|
||||
{ -3, -3 } },
|
||||
// 32X16
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 2 },
|
||||
{ -1, -1 },
|
||||
{ 1, -1 },
|
||||
{ -3, 0 },
|
||||
{ 0, -3 },
|
||||
{ -3, -3 } },
|
||||
// 32X32
|
||||
{ { -1, 1 },
|
||||
{ 1, -1 },
|
||||
{ -1, 2 },
|
||||
{ 2, -1 },
|
||||
{ -1, -1 },
|
||||
{ -3, 0 },
|
||||
{ 0, -3 },
|
||||
{ -3, -3 } },
|
||||
// 32X64
|
||||
{ { 0, -1 },
|
||||
{ -1, 0 },
|
||||
{ 4, -1 },
|
||||
{ -1, 2 },
|
||||
{ -1, -1 },
|
||||
{ 0, -3 },
|
||||
{ -3, 0 },
|
||||
{ 2, -1 } },
|
||||
// 64X32
|
||||
{ { -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 4 },
|
||||
{ 2, -1 },
|
||||
{ -1, -1 },
|
||||
{ -3, 0 },
|
||||
{ 0, -3 },
|
||||
{ -1, 2 } },
|
||||
// 64X64
|
||||
{ { -1, 3 },
|
||||
{ 3, -1 },
|
||||
{ -1, 4 },
|
||||
{ 4, -1 },
|
||||
{ -1, -1 },
|
||||
{ -1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 6 } },
|
||||
#if CONFIG_EXT_PARTITION
|
||||
// TODO(debargha/jingning) Making them twice the 32x64, .. ones above
|
||||
// 64x128
|
||||
{ { 0, -2 },
|
||||
{ -2, 0 },
|
||||
{ 8, -2 },
|
||||
{ -2, 4 },
|
||||
{ -2, -2 },
|
||||
{ 0, -6 },
|
||||
{ -6, 0 },
|
||||
{ 4, -2 } },
|
||||
// 128x64
|
||||
{ { -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, 8 },
|
||||
{ 4, -2 },
|
||||
{ -2, -2 },
|
||||
{ -6, 0 },
|
||||
{ 0, -6 },
|
||||
{ -2, 4 } },
|
||||
// 128x128
|
||||
{ { -2, 6 },
|
||||
{ 6, -2 },
|
||||
{ -2, 8 },
|
||||
{ 8, -2 },
|
||||
{ -2, -2 },
|
||||
{ -2, 0 },
|
||||
{ 0, -2 },
|
||||
{ -2, 12 } },
|
||||
#endif // CONFIG_EXT_PARTITION
|
||||
};
|
||||
#endif
|
||||
|
||||
static const int idx_n_column_to_subblock[4][2] = {
|
||||
{ 1, 2 }, { 1, 3 }, { 3, 2 }, { 3, 3 }
|
||||
};
|
||||
|
|
@ -283,20 +129,11 @@ static INLINE void clamp_mv_ref(MV *mv, int bw, int bh, const MACROBLOCKD *xd) {
|
|||
// on whether the block_size < 8x8 and we have check_sub_blocks set.
|
||||
static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv,
|
||||
int search_col, int block_idx) {
|
||||
#if CONFIG_REF_MV
|
||||
(void)search_col;
|
||||
(void)block_idx;
|
||||
return candidate->mbmi.mv[which_mv];
|
||||
#else
|
||||
return block_idx >= 0 && candidate->mbmi.sb_type < BLOCK_8X8
|
||||
? candidate
|
||||
->bmi[idx_n_column_to_subblock[block_idx][search_col == 0]]
|
||||
.as_mv[which_mv]
|
||||
: candidate->mbmi.mv[which_mv];
|
||||
#endif
|
||||
}
|
||||
|
||||
#if CONFIG_REF_MV
|
||||
static INLINE int_mv get_sub_block_pred_mv(const MODE_INFO *candidate,
|
||||
int which_mv, int search_col,
|
||||
int block_idx) {
|
||||
|
|
@ -304,7 +141,6 @@ static INLINE int_mv get_sub_block_pred_mv(const MODE_INFO *candidate,
|
|||
(void)block_idx;
|
||||
return candidate->mbmi.mv[which_mv];
|
||||
}
|
||||
#endif
|
||||
|
||||
// Performs mv sign inversion if indicated by the reference frame combination.
|
||||
static INLINE int_mv scale_mv(const MB_MODE_INFO *mbmi, int ref,
|
||||
|
|
@ -384,7 +220,6 @@ static INLINE void lower_mv_precision(MV *mv, int allow_hp) {
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_REF_MV
|
||||
static INLINE uint8_t av1_get_pred_diff_ctx(const int_mv pred_mv,
|
||||
const int_mv this_mv) {
|
||||
if (abs(this_mv.as_mv.row - pred_mv.as_mv.row) <= 4 &&
|
||||
|
|
@ -434,8 +269,12 @@ static INLINE void av1_set_ref_frame(MV_REFERENCE_FRAME *rf,
|
|||
} else {
|
||||
rf[0] = ref_frame_type;
|
||||
rf[1] = NONE_FRAME;
|
||||
assert(ref_frame_type > INTRA_FRAME &&
|
||||
ref_frame_type < TOTAL_REFS_PER_FRAME);
|
||||
#if CONFIG_INTRABC
|
||||
assert(ref_frame_type > NONE_FRAME);
|
||||
#else
|
||||
assert(ref_frame_type > INTRA_FRAME);
|
||||
#endif
|
||||
assert(ref_frame_type < TOTAL_REFS_PER_FRAME);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -477,17 +316,14 @@ static INLINE uint8_t av1_drl_ctx(const CANDIDATE_MV *ref_mv_stack,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
|
||||
void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
|
||||
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||
#if CONFIG_REF_MV
|
||||
uint8_t *ref_mv_count, CANDIDATE_MV *ref_mv_stack,
|
||||
#if CONFIG_EXT_INTER
|
||||
int16_t *compound_mode_context,
|
||||
#endif // CONFIG_EXT_INTER
|
||||
#endif
|
||||
int_mv *mv_ref_list, int mi_row, int mi_col,
|
||||
find_mv_refs_sync sync, void *const data,
|
||||
int16_t *mode_context);
|
||||
|
|
@ -500,10 +336,8 @@ void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv,
|
|||
|
||||
void av1_append_sub8x8_mvs_for_idx(const AV1_COMMON *cm, MACROBLOCKD *xd,
|
||||
int block, int ref, int mi_row, int mi_col,
|
||||
#if CONFIG_REF_MV
|
||||
CANDIDATE_MV *ref_mv_stack,
|
||||
uint8_t *ref_mv_count,
|
||||
#endif
|
||||
#if CONFIG_EXT_INTER
|
||||
int_mv *mv_list,
|
||||
#endif // CONFIG_EXT_INTER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue