mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-11 17:57:32 +09:00
Update libaom to rev b25610052a1398032320008d69b51d2da94f5928
This commit is contained in:
parent
8493557d20
commit
3d109dd4fc
240 changed files with 16977 additions and 6139 deletions
40
third_party/aom/av1/encoder/aq_cyclicrefresh.c
vendored
40
third_party/aom/av1/encoder/aq_cyclicrefresh.c
vendored
|
|
@ -137,8 +137,9 @@ static int candidate_refresh_aq(const CYCLIC_REFRESH *cr,
|
|||
static int compute_deltaq(const AV1_COMP *cpi, int q, double rate_factor) {
|
||||
const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
|
||||
const RATE_CONTROL *const rc = &cpi->rc;
|
||||
int deltaq = av1_compute_qdelta_by_rate(rc, cpi->common.frame_type, q,
|
||||
rate_factor, cpi->common.bit_depth);
|
||||
int deltaq =
|
||||
av1_compute_qdelta_by_rate(rc, cpi->common.frame_type, q, rate_factor,
|
||||
cpi->common.seq_params.bit_depth);
|
||||
if ((-deltaq) > cr->max_qdelta_perc * q / 100) {
|
||||
deltaq = -cr->max_qdelta_perc * q / 100;
|
||||
}
|
||||
|
|
@ -164,15 +165,16 @@ int av1_cyclic_refresh_estimate_bits_at_q(const AV1_COMP *cpi,
|
|||
estimated_bits =
|
||||
(int)((1.0 - weight_segment1 - weight_segment2) *
|
||||
av1_estimate_bits_at_q(cm->frame_type, cm->base_qindex, mbs,
|
||||
correction_factor, cm->bit_depth) +
|
||||
weight_segment1 *
|
||||
av1_estimate_bits_at_q(cm->frame_type,
|
||||
cm->base_qindex + cr->qindex_delta[1],
|
||||
mbs, correction_factor, cm->bit_depth) +
|
||||
weight_segment2 *
|
||||
av1_estimate_bits_at_q(cm->frame_type,
|
||||
cm->base_qindex + cr->qindex_delta[2],
|
||||
mbs, correction_factor, cm->bit_depth));
|
||||
correction_factor,
|
||||
cm->seq_params.bit_depth) +
|
||||
weight_segment1 * av1_estimate_bits_at_q(
|
||||
cm->frame_type,
|
||||
cm->base_qindex + cr->qindex_delta[1], mbs,
|
||||
correction_factor, cm->seq_params.bit_depth) +
|
||||
weight_segment2 * av1_estimate_bits_at_q(
|
||||
cm->frame_type,
|
||||
cm->base_qindex + cr->qindex_delta[2], mbs,
|
||||
correction_factor, cm->seq_params.bit_depth));
|
||||
return estimated_bits;
|
||||
}
|
||||
|
||||
|
|
@ -197,12 +199,13 @@ int av1_cyclic_refresh_rc_bits_per_mb(const AV1_COMP *cpi, int i,
|
|||
// Compute delta-q corresponding to qindex i.
|
||||
int deltaq = compute_deltaq(cpi, i, cr->rate_ratio_qdelta);
|
||||
// Take segment weighted average for bits per mb.
|
||||
bits_per_mb = (int)((1.0 - weight_segment) *
|
||||
av1_rc_bits_per_mb(cm->frame_type, i,
|
||||
correction_factor, cm->bit_depth) +
|
||||
weight_segment *
|
||||
av1_rc_bits_per_mb(cm->frame_type, i + deltaq,
|
||||
correction_factor, cm->bit_depth));
|
||||
bits_per_mb =
|
||||
(int)((1.0 - weight_segment) *
|
||||
av1_rc_bits_per_mb(cm->frame_type, i, correction_factor,
|
||||
cm->seq_params.bit_depth) +
|
||||
weight_segment * av1_rc_bits_per_mb(cm->frame_type, i + deltaq,
|
||||
correction_factor,
|
||||
cm->seq_params.bit_depth));
|
||||
return bits_per_mb;
|
||||
}
|
||||
|
||||
|
|
@ -507,7 +510,8 @@ void av1_cyclic_refresh_setup(AV1_COMP *const cpi) {
|
|||
} else {
|
||||
int qindex_delta = 0;
|
||||
int qindex2;
|
||||
const double q = av1_convert_qindex_to_q(cm->base_qindex, cm->bit_depth);
|
||||
const double q =
|
||||
av1_convert_qindex_to_q(cm->base_qindex, cm->seq_params.bit_depth);
|
||||
aom_clear_system_state();
|
||||
// Set rate threshold to some multiple (set to 2 for now) of the target
|
||||
// rate (target is given by sb64_target_rate and scaled by 256).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue