Skip to content

Commit

Permalink
feat: add custom variance boost curve for tune 4
Browse files Browse the repository at this point in the history
Improves CID22, gb82, and subset1 10pct SSIMU2 scores substantially
  • Loading branch information
juliobbv committed Oct 10, 2024
1 parent 5f6a689 commit 35e61a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Lib/Codec/rc_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,13 @@ static int av1_get_deltaq_sb_variance_boost(uint8_t base_q_idx, uint16_t *varian
} else {
// alternative "flat" q step ratio curve (in log-variance domain)
// prefers boosting mid-contrast content more over the regular curve (at a modest bitrate increase)
qstep_ratio = 0.25 * strength * (-log2((double)variance) + 8) + 1;
if (still_picture) {
// still picture curve, with variance crossover point at 1024
qstep_ratio = 0.15 * strength * (-log2((double)variance) + 10) + 1;
} else {
// regular curve for video, with variance crossover point at 256
qstep_ratio = 0.25 * strength * (-log2((double)variance) + 8) + 1;
}
}
qstep_ratio = CLIP3(1, VAR_BOOST_MAX_QSTEP_RATIO_BOOST, qstep_ratio);

Expand Down

0 comments on commit 35e61a1

Please sign in to comment.