Remove mode dependent zbin boost.
Initial patch to remove get_zbin_mode_boost() and cpi->zbin_mode_boost. For now sets a dummy value of 0 for zbin extra pending a further clean up patch. Change-Id: I64a1e1eca2d39baa8ffb0871b515a0be05c9a6af
This commit is contained in:
parent
2e39817f5e
commit
60e9b731cf
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user