ref: 1ad7c1f2504bf6d7487e36ca099e0ea38e72285e
parent: 07cde4fdc81dd8e601ae9e5025d5a110b69f316e
author: Dmitry Kovalev <dkovalev@google.com>
date: Tue Apr 16 11:05:52 EDT 2013
Renaming y1dc_delta_q, uvdc_delta_q, uvac_delta_q fields from VP9Common. New names are y_dc_delta_q, uv_dc_delta_q, uv_ac_delta_q. Change-Id: I4acae1fc23a4697ce2c5a5becb8dc28ef0a4b552
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -228,9 +228,9 @@
int base_qindex;
int last_kf_gf_q; /* Q used on the last GF or KF */
- int y1dc_delta_q;
- int uvdc_delta_q;
- int uvac_delta_q;
+ int y_dc_delta_q;
+ int uv_dc_delta_q;
+ int uv_ac_delta_q;
unsigned int frames_since_golden;
unsigned int frames_till_alt_ref_frame;
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -102,8 +102,8 @@
VP9_COMMON *const pc = &pbi->common;
for (q = 0; q < QINDEX_RANGE; q++) {
- pc->y_dequant[q][0] = (int16_t)vp9_dc_quant(q, pc->y1dc_delta_q);
- pc->uv_dequant[q][0] = (int16_t)vp9_dc_uv_quant(q, pc->uvdc_delta_q);
+ pc->y_dequant[q][0] = (int16_t)vp9_dc_quant(q, pc->y_dc_delta_q);
+ pc->uv_dequant[q][0] = (int16_t)vp9_dc_uv_quant(q, pc->uv_dc_delta_q);
/* all the ac values =; */
for (i = 1; i < 16; i++) {
@@ -110,7 +110,7 @@
const int rc = vp9_default_zig_zag1d_4x4[i];
pc->y_dequant[q][rc] = (int16_t)vp9_ac_yquant(q);
- pc->uv_dequant[q][rc] = (int16_t)vp9_ac_uv_quant(q, pc->uvac_delta_q);
+ pc->uv_dequant[q][rc] = (int16_t)vp9_ac_uv_quant(q, pc->uv_ac_delta_q);
}
}
}
@@ -1202,9 +1202,9 @@
VP9_COMMON *const pc = &pbi->common;
pc->base_qindex = vp9_read_literal(r, QINDEX_BITS);
- if (get_delta_q(r, &pc->y1dc_delta_q) |
- get_delta_q(r, &pc->uvdc_delta_q) |
- get_delta_q(r, &pc->uvac_delta_q))
+ if (get_delta_q(r, &pc->y_dc_delta_q) |
+ get_delta_q(r, &pc->uv_dc_delta_q) |
+ get_delta_q(r, &pc->uv_ac_delta_q))
vp9_init_de_quantizer(pbi);
mb_init_dequantizer(pbi, &pbi->mb); // MB level dequantizer setup
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -2602,9 +2602,9 @@
vp9_write_literal(&header_bc, pc->base_qindex, QINDEX_BITS);
// Transmit Dc, Second order and Uv quantizer delta information
- put_delta_q(&header_bc, pc->y1dc_delta_q);
- put_delta_q(&header_bc, pc->uvdc_delta_q);
- put_delta_q(&header_bc, pc->uvac_delta_q);
+ put_delta_q(&header_bc, pc->y_dc_delta_q);
+ put_delta_q(&header_bc, pc->uv_dc_delta_q);
+ put_delta_q(&header_bc, pc->uv_ac_delta_q);
// When there is a key frame all reference buffers are updated using the new key frame
if (pc->frame_type != KEY_FRAME) {
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1227,14 +1227,14 @@
#endif
cpi->mb.e_mbd.lossless = (cm->base_qindex == 0 &&
- cm->y1dc_delta_q == 0 &&
- cm->uvdc_delta_q == 0 &&
- cm->uvac_delta_q == 0);
+ cm->y_dc_delta_q == 0 &&
+ cm->uv_dc_delta_q == 0 &&
+ cm->uv_ac_delta_q == 0);
switch_lossless_mode(cpi, cpi->mb.e_mbd.lossless);
vp9_frame_init_quantizer(cpi);
- vp9_initialize_rd_consts(cpi, cm->base_qindex + cm->y1dc_delta_q);
+ vp9_initialize_rd_consts(cpi, cm->base_qindex + cm->y_dc_delta_q);
vp9_initialize_me_consts(cpi, cm->base_qindex);
if (cpi->oxcf.tuning == VP8_TUNE_SSIM) {
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -505,7 +505,7 @@
// if ( 0 )
{
vp9_init_mv_probs(cm);
- vp9_initialize_rd_consts(cpi, cm->base_qindex + cm->y1dc_delta_q);
+ vp9_initialize_rd_consts(cpi, cm->base_qindex + cm->y_dc_delta_q);
}
// for each macroblock row in image
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -542,7 +542,7 @@
qrounding_factor = 64;
}
// dc values
- quant_val = vp9_dc_quant(q, cpi->common.y1dc_delta_q);
+ quant_val = vp9_dc_quant(q, cpi->common.y_dc_delta_q);
invert_quant(cpi->Y1quant[q] + 0, cpi->Y1quant_shift[q] + 0, quant_val);
cpi->Y1zbin[q][0] = ROUND_POWER_OF_TWO(qzbin_factor * quant_val, 7);
cpi->Y1round[q][0] = (qrounding_factor * quant_val) >> 7;
@@ -549,7 +549,7 @@
cpi->common.y_dequant[q][0] = quant_val;
cpi->zrun_zbin_boost_y1[q][0] = (quant_val * zbin_boost[0]) >> 7;
- quant_val = vp9_dc_uv_quant(q, cpi->common.uvdc_delta_q);
+ quant_val = vp9_dc_uv_quant(q, cpi->common.uv_dc_delta_q);
invert_quant(cpi->UVquant[q] + 0, cpi->UVquant_shift[q] + 0, quant_val);
cpi->UVzbin[q][0] = ROUND_POWER_OF_TWO(qzbin_factor * quant_val, 7);
cpi->UVround[q][0] = (qrounding_factor * quant_val) >> 7;
@@ -568,7 +568,7 @@
cpi->zrun_zbin_boost_y1[q][i] =
ROUND_POWER_OF_TWO(quant_val * zbin_boost[i], 7);
- quant_val = vp9_ac_uv_quant(q, cpi->common.uvac_delta_q);
+ quant_val = vp9_ac_uv_quant(q, cpi->common.uv_ac_delta_q);
invert_quant(cpi->UVquant[q] + rc, cpi->UVquant_shift[q] + rc, quant_val);
cpi->UVzbin[q][rc] = ROUND_POWER_OF_TWO(qzbin_factor * quant_val, 7);
cpi->UVround[q][rc] = (qrounding_factor * quant_val) >> 7;
@@ -677,9 +677,9 @@
// if any of the delta_q values are changing update flag will
// have to be set.
- cm->y1dc_delta_q = 0;
- cm->uvdc_delta_q = 0;
- cm->uvac_delta_q = 0;
+ cm->y_dc_delta_q = 0;
+ cm->uv_dc_delta_q = 0;
+ cm->uv_ac_delta_q = 0;
// quantizer has to be reinitialized if any delta_q changes.
// As there are not any here for now this is inactive code.
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3383,7 +3383,7 @@
int_mv seg_mvs[NB_PARTITIONINGS][16 /* n_blocks */][MAX_REF_FRAMES - 1];
int intra_cost_penalty = 20 * vp9_dc_quant(cpi->common.base_qindex,
- cpi->common.y1dc_delta_q);
+ cpi->common.y_dc_delta_q);
struct scale_factors scale_factor[4];