summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c25
-rw-r--r--vp9/encoder/vp9_encoder.c6
-rw-r--r--vp9/encoder/vp9_encoder.h3
-rw-r--r--vp9/encoder/vp9_quantize.c13
-rw-r--r--vp9/encoder/vp9_quantize.h2
5 files changed, 7 insertions, 42 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 86023a5e8..535cc30c7 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3619,7 +3619,6 @@ static void encode_frame_internal(VP9_COMP *cpi) {
if (xd->lossless) {
x->optimize = 0;
cm->lf.filter_level = 0;
- cpi->zbin_mode_boost_enabled = 0;
}
vp9_frame_init_quantizer(cpi);
@@ -3859,24 +3858,6 @@ static void sum_intra_stats(FRAME_COUNTS *counts, const MODE_INFO *mi) {
++counts->uv_mode[y_mode][uv_mode];
}
-static int get_zbin_mode_boost(const MB_MODE_INFO *mbmi, int enabled) {
- if (enabled) {
- if (is_inter_block(mbmi)) {
- if (mbmi->mode == ZEROMV) {
- return mbmi->ref_frame[0] != LAST_FRAME ? GF_ZEROMV_ZBIN_BOOST
- : LF_ZEROMV_ZBIN_BOOST;
- } else {
- return mbmi->sb_type < BLOCK_8X8 ? SPLIT_MV_ZBIN_BOOST
- : MV_ZBIN_BOOST;
- }
- } else {
- return INTRA_ZBIN_BOOST;
- }
- } else {
- return 0;
- }
-}
-
static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
TOKENEXTRA **t, int output_enabled,
int mi_row, int mi_col, BLOCK_SIZE bsize,
@@ -3912,11 +3893,7 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
- // Experimental code. Special case for gf and arf zeromv modes.
- // Increase zbin size to suppress noise
- cpi->zbin_mode_boost = get_zbin_mode_boost(mbmi,
- cpi->zbin_mode_boost_enabled);
- vp9_update_zbin_extra(cpi, x);
+ vp9_update_zbin_extra(x);
if (!is_inter_block(mbmi)) {
int plane;
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index a7f34a2e4..53d45c0d6 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3148,12 +3148,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
vp9_clear_system_state();
- // Enable or disable mode based tweaking of the zbin.
- // For 2 pass only used where GF/ARF prediction quality
- // is above a threshold.
- cpi->zbin_mode_boost = 0;
- cpi->zbin_mode_boost_enabled = 0;
-
// Set the arf sign bias for this frame.
set_arf_sign_bias(cpi);
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h
index a58a90e1e..56360a2b9 100644
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -315,9 +315,6 @@ typedef struct VP9_COMP {
int *nmvsadcosts[2];
int *nmvsadcosts_hp[2];
- int zbin_mode_boost;
- int zbin_mode_boost_enabled;
-
int64_t last_time_stamp_seen;
int64_t last_end_time_stamp_seen;
int64_t first_time_stamp_ever;
diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c
index e7a20c4d2..63242a922 100644
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -641,7 +641,8 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
const int segment_id = xd->mi[0].src_mi->mbmi.segment_id;
const int qindex = vp9_get_qindex(&cm->seg, segment_id, cm->base_qindex);
const int rdmult = vp9_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q);
- const int zbin = cpi->zbin_mode_boost;
+ // TODO(paulwilkins): 0 value for zbin for now pending follow on patch.
+ const int zbin = 0;
int i;
// Y
@@ -687,12 +688,9 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) {
vp9_initialize_me_consts(cpi, x->q_index);
}
-void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
- const int qindex = x->q_index;
- const int y_zbin_extra = (cpi->common.y_dequant[qindex][1] *
- cpi->zbin_mode_boost) >> 7;
- const int uv_zbin_extra = (cpi->common.uv_dequant[qindex][1] *
- cpi->zbin_mode_boost) >> 7;
+void vp9_update_zbin_extra(MACROBLOCK *x) {
+ const int y_zbin_extra = 0;
+ const int uv_zbin_extra = 0;
x->plane[0].zbin_extra = (int16_t)y_zbin_extra;
x->plane[1].zbin_extra = (int16_t)uv_zbin_extra;
@@ -700,7 +698,6 @@ void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
}
void vp9_frame_init_quantizer(VP9_COMP *cpi) {
- cpi->zbin_mode_boost = 0;
vp9_init_plane_quantizers(cpi, &cpi->td.mb);
}
diff --git a/vp9/encoder/vp9_quantize.h b/vp9/encoder/vp9_quantize.h
index cee46e7e0..9aeb5f05b 100644
--- a/vp9/encoder/vp9_quantize.h
+++ b/vp9/encoder/vp9_quantize.h
@@ -68,7 +68,7 @@ struct VP9Common;
void vp9_frame_init_quantizer(struct VP9_COMP *cpi);
-void vp9_update_zbin_extra(struct VP9_COMP *cpi, MACROBLOCK *x);
+void vp9_update_zbin_extra(MACROBLOCK *x);
void vp9_init_plane_quantizers(struct VP9_COMP *cpi, MACROBLOCK *x);