summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-04-11 10:31:54 -0700
committerDmitry Kovalev <dkovalev@google.com>2014-04-11 10:31:54 -0700
commit591e383df5c80845e4d561285c516de272e1b7a3 (patch)
treed5b898b8a291f0ac043fc384ed79f032df79c6c1 /vp9
parentdc89e9b0b6a668ca4082e20463eb767f655b6909 (diff)
downloadlibvpx-591e383df5c80845e4d561285c516de272e1b7a3.tar
libvpx-591e383df5c80845e4d561285c516de272e1b7a3.tar.gz
libvpx-591e383df5c80845e4d561285c516de272e1b7a3.tar.bz2
libvpx-591e383df5c80845e4d561285c516de272e1b7a3.zip
Adding temp variable q to vp9_cyclic_refresh_setup().
Change-Id: If0e9c811c8ae78c0914d615bad0067a5b57e4a71
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_aq_cyclicrefresh.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c
index 787909142..e55881ffc 100644
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -200,6 +200,7 @@ void vp9_cyclic_refresh_setup(VP9_COMP *const cpi) {
// Rate target ratio to set q delta.
const float rate_ratio_qdelta = 2.0;
+ const double q = vp9_convert_qindex_to_q(cm->base_qindex);
vp9_clear_system_state();
// Some of these parameters may be set via codec-control function later.
cr->max_sbs_perframe = 10;
@@ -209,14 +210,12 @@ void vp9_cyclic_refresh_setup(VP9_COMP *const cpi) {
// Set rate threshold to some fraction of target (and scaled by 256).
cr->thresh_rate_sb = (rc->sb64_target_rate * 256) >> 2;
// Distortion threshold, quadratic in Q, scale factor to be adjusted.
- cr->thresh_dist_sb = 8 * (int)(vp9_convert_qindex_to_q(cm->base_qindex) *
- vp9_convert_qindex_to_q(cm->base_qindex));
+ cr->thresh_dist_sb = 8 * (int)(q * q);
if (cpi->sf.use_nonrd_pick_mode) {
// May want to be more conservative with thresholds in non-rd mode for now
// as rate/distortion are derived from model based on prediction residual.
cr->thresh_rate_sb = (rc->sb64_target_rate * 256) >> 3;
- cr->thresh_dist_sb = 4 * (int)(vp9_convert_qindex_to_q(cm->base_qindex) *
- vp9_convert_qindex_to_q(cm->base_qindex));
+ cr->thresh_dist_sb = 4 * (int)(q * q);
}
cr->num_seg_blocks = 0;