mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-09 08:47: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
610
third_party/aom/av1/decoder/decodeframe.c
vendored
610
third_party/aom/av1/decoder/decodeframe.c
vendored
File diff suppressed because it is too large
Load diff
650
third_party/aom/av1/decoder/decodemv.c
vendored
650
third_party/aom/av1/decoder/decodemv.c
vendored
File diff suppressed because it is too large
Load diff
2
third_party/aom/av1/decoder/decoder.c
vendored
2
third_party/aom/av1/decoder/decoder.c
vendored
|
|
@ -50,7 +50,6 @@ static void initialize_dec(void) {
|
|||
av1_init_wedge_masks();
|
||||
#endif // CONFIG_EXT_INTER
|
||||
init_done = 1;
|
||||
#if CONFIG_EC_MULTISYMBOL
|
||||
av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv,
|
||||
av1_intra_mode_tree);
|
||||
av1_indices_from_tree(av1_switchable_interp_ind, av1_switchable_interp_inv,
|
||||
|
|
@ -68,7 +67,6 @@ static void initialize_dec(void) {
|
|||
#endif
|
||||
av1_indices_from_tree(av1_inter_mode_ind, av1_inter_mode_inv,
|
||||
av1_inter_mode_tree);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
third_party/aom/av1/decoder/decoder.h
vendored
2
third_party/aom/av1/decoder/decoder.h
vendored
|
|
@ -203,7 +203,7 @@ static INLINE void decrease_ref_count(int idx, RefCntBuffer *const frame_bufs,
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_EXT_REFS
|
||||
#if CONFIG_EXT_REFS || CONFIG_TEMPMV_SIGNALING
|
||||
static INLINE int dec_is_ref_frame_buf(AV1Decoder *const pbi,
|
||||
RefCntBuffer *frame_buf) {
|
||||
AV1_COMMON *const cm = &pbi->common;
|
||||
|
|
|
|||
2
third_party/aom/av1/decoder/decodetxb.c
vendored
2
third_party/aom/av1/decoder/decodetxb.c
vendored
|
|
@ -169,7 +169,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
|
|||
sign = aom_read_bit(r, ACCT_STR);
|
||||
}
|
||||
|
||||
ctx = get_level_ctx(tcoeffs, scan[c], bwl);
|
||||
ctx = get_br_ctx(tcoeffs, scan[c], bwl);
|
||||
|
||||
if (cm->fc->coeff_lps[tx_size][plane_type][ctx] == 0) exit(0);
|
||||
|
||||
|
|
|
|||
122
third_party/aom/av1/decoder/detokenize.c
vendored
122
third_party/aom/av1/decoder/detokenize.c
vendored
|
|
@ -106,7 +106,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
dequant_val_type_nuq *dq_val,
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
#if CONFIG_AOM_QM
|
||||
const qm_val_t *iqm[2][TX_SIZES],
|
||||
const qm_val_t *iqm[2][TX_SIZES_ALL],
|
||||
#endif // CONFIG_AOM_QM
|
||||
int ctx, const int16_t *scan, const int16_t *nb,
|
||||
int16_t *max_scan_line, aom_reader *r) {
|
||||
|
|
@ -123,7 +123,6 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
#endif // CONFIG_AOM_QM
|
||||
int band, c = 0;
|
||||
const int tx_size_ctx = txsize_sqr_map[tx_size];
|
||||
#if CONFIG_NEW_TOKENSET
|
||||
aom_cdf_prob(*coef_head_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] =
|
||||
ec_ctx->coef_head_cdfs[tx_size_ctx][type][ref];
|
||||
aom_cdf_prob(*coef_tail_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] =
|
||||
|
|
@ -135,18 +134,6 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = NULL;
|
||||
unsigned int(*eob_branch_count)[COEFF_CONTEXTS] = NULL;
|
||||
#endif
|
||||
#else
|
||||
aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
|
||||
ec_ctx->coef_probs[tx_size_ctx][type][ref];
|
||||
const aom_prob *prob;
|
||||
#if CONFIG_EC_MULTISYMBOL
|
||||
aom_cdf_prob(*coef_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] =
|
||||
ec_ctx->coef_cdfs[tx_size_ctx][type][ref];
|
||||
aom_cdf_prob(*cdf)[CDF_SIZE(ENTROPY_TOKENS)];
|
||||
#endif // CONFIG_EC_MULTISYMBOL
|
||||
unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = NULL;
|
||||
unsigned int(*eob_branch_count)[COEFF_CONTEXTS] = NULL;
|
||||
#endif // CONFIG_NEW_TOKENSET
|
||||
uint8_t token_cache[MAX_TX_SQUARE];
|
||||
const uint8_t *band_translate = get_band_translate(tx_size);
|
||||
int dq_shift;
|
||||
|
|
@ -156,23 +143,17 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
const tran_low_t *dqv_val = &dq_val[0][0];
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
(void)tx_type;
|
||||
#if CONFIG_AOM_QM
|
||||
(void)iqmatrix;
|
||||
#endif // CONFIG_AOM_QM
|
||||
|
||||
if (counts) {
|
||||
#if !CONFIG_NEW_TOKENSET || !CONFIG_EC_ADAPT
|
||||
#if !CONFIG_EC_ADAPT
|
||||
coef_counts = counts->coef[tx_size_ctx][type][ref];
|
||||
eob_branch_count = counts->eob_branch[tx_size_ctx][type][ref];
|
||||
#endif
|
||||
#if CONFIG_NEW_TOKENSET && !CONFIG_EC_ADAPT
|
||||
blockz_count = counts->blockz_count[tx_size_ctx][type][ref][ctx];
|
||||
#endif
|
||||
}
|
||||
|
||||
dq_shift = av1_get_tx_scale(tx_size);
|
||||
|
||||
#if CONFIG_NEW_TOKENSET
|
||||
band = *band_translate++;
|
||||
|
||||
int more_data = 1;
|
||||
|
|
@ -238,12 +219,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
*max_scan_line = AOMMAX(*max_scan_line, scan[c]);
|
||||
token_cache[scan[c]] = av1_pt_energy_class[token];
|
||||
|
||||
val = token_to_value(r, token, tx_size,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
xd->bd);
|
||||
#else
|
||||
8);
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
val = token_to_value(r, token, tx_size, xd->bd);
|
||||
|
||||
#if CONFIG_NEW_QUANT
|
||||
v = av1_dequant_abscoeff_nuq(val, dqv, dqv_val);
|
||||
|
|
@ -258,11 +234,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
|
||||
v = aom_read_bit(r, ACCT_STR) ? -v : v;
|
||||
#if CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
check_range(v, xd->bd);
|
||||
#else
|
||||
check_range(v, 8);
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||
|
||||
dqcoeff[scan[c]] = v;
|
||||
|
|
@ -273,94 +245,6 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
|
|||
dqv = dq[1];
|
||||
ctx = get_coef_context(nb, token_cache, c);
|
||||
band = *band_translate++;
|
||||
|
||||
#else // CONFIG_NEW_TOKENSET
|
||||
while (c < max_eob) {
|
||||
int val = -1;
|
||||
band = *band_translate++;
|
||||
prob = coef_probs[band][ctx];
|
||||
if (counts) ++eob_branch_count[band][ctx];
|
||||
if (!aom_read(r, prob[EOB_CONTEXT_NODE], ACCT_STR)) {
|
||||
INCREMENT_COUNT(EOB_MODEL_TOKEN);
|
||||
break;
|
||||
}
|
||||
|
||||
#if CONFIG_NEW_QUANT
|
||||
dqv_val = &dq_val[band][0];
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
|
||||
while (!aom_read(r, prob[ZERO_CONTEXT_NODE], ACCT_STR)) {
|
||||
INCREMENT_COUNT(ZERO_TOKEN);
|
||||
dqv = dq[1];
|
||||
token_cache[scan[c]] = 0;
|
||||
++c;
|
||||
if (c >= max_eob) return c; // zero tokens at the end (no eob token)
|
||||
ctx = get_coef_context(nb, token_cache, c);
|
||||
band = *band_translate++;
|
||||
prob = coef_probs[band][ctx];
|
||||
#if CONFIG_NEW_QUANT
|
||||
dqv_val = &dq_val[band][0];
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
}
|
||||
|
||||
*max_scan_line = AOMMAX(*max_scan_line, scan[c]);
|
||||
|
||||
#if CONFIG_EC_MULTISYMBOL
|
||||
cdf = &coef_cdfs[band][ctx];
|
||||
token = ONE_TOKEN +
|
||||
aom_read_symbol(r, *cdf, CATEGORY6_TOKEN - ONE_TOKEN + 1, ACCT_STR);
|
||||
INCREMENT_COUNT(ONE_TOKEN + (token > ONE_TOKEN));
|
||||
assert(token != ZERO_TOKEN);
|
||||
val = token_to_value(r, token, tx_size,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
xd->bd);
|
||||
#else
|
||||
8);
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
#else // CONFIG_EC_MULTISYMBOL
|
||||
if (!aom_read(r, prob[ONE_CONTEXT_NODE], ACCT_STR)) {
|
||||
INCREMENT_COUNT(ONE_TOKEN);
|
||||
token = ONE_TOKEN;
|
||||
val = 1;
|
||||
} else {
|
||||
INCREMENT_COUNT(TWO_TOKEN);
|
||||
token = aom_read_tree(r, av1_coef_con_tree,
|
||||
av1_pareto8_full[prob[PIVOT_NODE] - 1], ACCT_STR);
|
||||
assert(token != ZERO_TOKEN && token != ONE_TOKEN);
|
||||
val = token_to_value(r, token, tx_size,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
xd->bd);
|
||||
#else
|
||||
8);
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
}
|
||||
#endif // CONFIG_EC_MULTISYMBOL
|
||||
#if CONFIG_NEW_QUANT
|
||||
v = av1_dequant_abscoeff_nuq(val, dqv, dqv_val);
|
||||
v = dq_shift ? ROUND_POWER_OF_TWO(v, dq_shift) : v;
|
||||
#else
|
||||
#if CONFIG_AOM_QM
|
||||
dqv = ((iqmatrix[scan[c]] * (int)dqv) + (1 << (AOM_QM_BITS - 1))) >>
|
||||
AOM_QM_BITS;
|
||||
#endif
|
||||
v = (val * dqv) >> dq_shift;
|
||||
#endif // CONFIG_NEW_QUANT
|
||||
|
||||
#if CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
dqcoeff[scan[c]] =
|
||||
highbd_check_range((aom_read_bit(r, ACCT_STR) ? -v : v), xd->bd);
|
||||
#else
|
||||
dqcoeff[scan[c]] = check_range(aom_read_bit(r, ACCT_STR) ? -v : v, 8);
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
#else
|
||||
dqcoeff[scan[c]] = aom_read_bit(r, ACCT_STR) ? -v : v;
|
||||
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||
token_cache[scan[c]] = av1_pt_energy_class[token];
|
||||
++c;
|
||||
ctx = get_coef_context(nb, token_cache, c);
|
||||
dqv = dq[1];
|
||||
#endif // CONFIG_NEW_TOKENSET
|
||||
}
|
||||
|
||||
return c;
|
||||
|
|
|
|||
13
third_party/aom/av1/decoder/inspection.c
vendored
13
third_party/aom/av1/decoder/inspection.c
vendored
|
|
@ -14,6 +14,9 @@
|
|||
#if CONFIG_CDEF
|
||||
#include "av1/common/cdef.h"
|
||||
#endif
|
||||
#if CONFIG_CFL
|
||||
#include "av1/common/cfl.h"
|
||||
#endif
|
||||
|
||||
void ifd_init(insp_frame_data *fd, int frame_width, int frame_height) {
|
||||
fd->mi_cols = ALIGN_POWER_OF_TWO(frame_width, 3) >> MI_SIZE_LOG2;
|
||||
|
|
@ -96,6 +99,16 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
|
|||
mi->cdef_strength =
|
||||
cm->cdef_strengths[mbmi->cdef_strength] % CLPF_STRENGTHS;
|
||||
mi->cdef_strength += mi->cdef_strength == 3;
|
||||
#endif
|
||||
#if CONFIG_CFL
|
||||
if (mbmi->uv_mode == DC_PRED) {
|
||||
mi->cfl_alpha_idx = mbmi->cfl_alpha_idx;
|
||||
mi->cfl_alpha_sign = (mbmi->cfl_alpha_signs[CFL_PRED_V] << CFL_PRED_V) +
|
||||
mbmi->cfl_alpha_signs[CFL_PRED_U];
|
||||
} else {
|
||||
mi->cfl_alpha_idx = 0;
|
||||
mi->cfl_alpha_sign = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
5
third_party/aom/av1/decoder/inspection.h
vendored
5
third_party/aom/av1/decoder/inspection.h
vendored
|
|
@ -15,6 +15,7 @@
|
|||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "av1/common/seg_common.h"
|
||||
#if CONFIG_ACCOUNTING
|
||||
#include "av1/decoder/accounting.h"
|
||||
#endif
|
||||
|
|
@ -49,6 +50,10 @@ struct insp_mi_data {
|
|||
int8_t cdef_level;
|
||||
int8_t cdef_strength;
|
||||
#endif
|
||||
#if CONFIG_CFL
|
||||
int8_t cfl_alpha_idx;
|
||||
int8_t cfl_alpha_sign;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct insp_frame_data insp_frame_data;
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ static int aom_decode_pvq_split_(aom_reader *r, od_pvq_codeword_ctx *adapt,
|
|||
count += msbs << shift;
|
||||
if (count > sum) {
|
||||
count = sum;
|
||||
#if CONFIG_DAALA_EC
|
||||
#if !CONFIG_ANS
|
||||
r->ec.error = 1;
|
||||
#else
|
||||
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
|
||||
# error "CONFIG_PVQ currently requires !CONFIG_ANS."
|
||||
#endif
|
||||
}
|
||||
return count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue