summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2014-11-11 09:17:33 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-11-11 09:17:33 -0800
commit499950547294fd9d5b6fb3b44b35485b91686404 (patch)
treee7843caefba5c4cf41f77c813f081bc8146b7dc1 /vp9
parent130c6d745535df6cf73f244edeae96a730d540c3 (diff)
parent31b6d7c1eb6a1527c06bf7d4691460e195c799f2 (diff)
downloadlibvpx-499950547294fd9d5b6fb3b44b35485b91686404.tar
libvpx-499950547294fd9d5b6fb3b44b35485b91686404.tar.gz
libvpx-499950547294fd9d5b6fb3b44b35485b91686404.tar.bz2
libvpx-499950547294fd9d5b6fb3b44b35485b91686404.zip
Merge "AQ1 - remove first pass weights."
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_aq_variance.c8
-rw-r--r--vp9/encoder/vp9_aq_variance.h1
-rw-r--r--vp9/encoder/vp9_firstpass.c23
3 files changed, 0 insertions, 32 deletions
diff --git a/vp9/encoder/vp9_aq_variance.c b/vp9/encoder/vp9_aq_variance.c
index 7d75f09a4..7ee9662e9 100644
--- a/vp9/encoder/vp9_aq_variance.c
+++ b/vp9/encoder/vp9_aq_variance.c
@@ -52,14 +52,6 @@ double vp9_vaq_rdmult_ratio(int energy) {
return RDMULT_RATIO(energy);
}
-double vp9_vaq_inv_q_ratio(int energy) {
- ENERGY_IN_BOUNDS(energy);
-
- vp9_clear_system_state();
-
- return Q_RATIO(-energy);
-}
-
void vp9_vaq_init() {
int i;
double base_ratio;
diff --git a/vp9/encoder/vp9_aq_variance.h b/vp9/encoder/vp9_aq_variance.h
index d1a459fe9..73ce2eb13 100644
--- a/vp9/encoder/vp9_aq_variance.h
+++ b/vp9/encoder/vp9_aq_variance.h
@@ -20,7 +20,6 @@ extern "C" {
unsigned int vp9_vaq_segment_id(int energy);
double vp9_vaq_rdmult_ratio(int energy);
-double vp9_vaq_inv_q_ratio(int energy);
void vp9_vaq_init();
void vp9_vaq_frame_setup(VP9_COMP *cpi);
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 85b2db146..327082fcd 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -593,7 +593,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
for (mb_col = 0; mb_col < cm->mb_cols; ++mb_col) {
int this_error;
const int use_dc_pred = (mb_col || mb_row) && (!mb_col || !mb_row);
- double error_weight = 1.0;
const BLOCK_SIZE bsize = get_bsize(cm, mb_row, mb_col);
double log_intra;
int level_sample;
@@ -615,11 +614,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
mb_col << 1, num_8x8_blocks_wide_lookup[bsize],
cm->mi_rows, cm->mi_cols);
- if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
- const int energy = vp9_block_energy(cpi, x, bsize);
- error_weight = vp9_vaq_inv_q_ratio(energy);
- }
-
// Do intra 16x16 prediction.
x->skip_encode = 0;
xd->mi[0].src_mi->mbmi.mode = DC_PRED;
@@ -665,11 +659,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
else
brightness_factor += 1.0;
- if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
- vp9_clear_system_state();
- this_error = (int)(this_error * error_weight);
- }
-
// Intrapenalty below deals with situations where the intra and inter
// error scores are very low (e.g. a plain black frame).
// We do not have special cases in first pass for 0,0 and nearest etc so
@@ -741,20 +730,12 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
// Test last reference frame using the previous best mv as the
// starting point (best reference) for the search.
first_pass_motion_search(cpi, x, &best_ref_mv, &mv, &motion_error);
- if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
- vp9_clear_system_state();
- motion_error = (int)(motion_error * error_weight);
- }
// If the current best reference mv is not centered on 0,0 then do a
// 0,0 based search as well.
if (!is_zero_mv(&best_ref_mv)) {
tmp_err = INT_MAX;
first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv, &tmp_err);
- if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
- vp9_clear_system_state();
- tmp_err = (int)(tmp_err * error_weight);
- }
if (tmp_err < motion_error) {
motion_error = tmp_err;
@@ -785,10 +766,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv,
&gf_motion_error);
- if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
- vp9_clear_system_state();
- gf_motion_error = (int)(gf_motion_error * error_weight);
- }
if (gf_motion_error < motion_error && gf_motion_error < this_error)
++second_ref_count;