Remove unused vp8_strict_quantize
Change-Id: I4c35ed2de8b54751b69f4801454a1ccc35b500b0
This commit is contained in:
parent
c2c03f2b58
commit
f1f7bcd289
@ -258,13 +258,6 @@ static void optimize_b(MACROBLOCK *mb, int ib, int type,
|
||||
b = &mb->block[ib];
|
||||
d = &mb->e_mbd.block[ib];
|
||||
|
||||
/* Enable this to test the effect of RDO as a replacement for the dynamic
|
||||
* zero bin instead of an augmentation of it.
|
||||
*/
|
||||
#if 0
|
||||
vp8_strict_quantize_b(b, d);
|
||||
#endif
|
||||
|
||||
dequant_ptr = d->dequant;
|
||||
coeff_ptr = b->coeff;
|
||||
qcoeff_ptr = d->qcoeff;
|
||||
|
@ -101,64 +101,6 @@ void vp8_regular_quantize_b_c(BLOCK *b, BLOCKD *d)
|
||||
*d->eob = (char)(eob + 1);
|
||||
}
|
||||
|
||||
/* Perform regular quantization, with unbiased rounding and no zero bin. */
|
||||
void vp8_strict_quantize_b_c(BLOCK *b, BLOCKD *d)
|
||||
{
|
||||
int i;
|
||||
int rc;
|
||||
int eob;
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
int sz;
|
||||
short *coeff_ptr;
|
||||
short *quant_ptr;
|
||||
short *quant_shift_ptr;
|
||||
short *qcoeff_ptr;
|
||||
short *dqcoeff_ptr;
|
||||
short *dequant_ptr;
|
||||
|
||||
coeff_ptr = b->coeff;
|
||||
quant_ptr = b->quant;
|
||||
quant_shift_ptr = b->quant_shift;
|
||||
qcoeff_ptr = d->qcoeff;
|
||||
dqcoeff_ptr = d->dqcoeff;
|
||||
dequant_ptr = d->dequant;
|
||||
eob = - 1;
|
||||
vpx_memset(qcoeff_ptr, 0, 32);
|
||||
vpx_memset(dqcoeff_ptr, 0, 32);
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
int dq;
|
||||
int rounding;
|
||||
|
||||
/*TODO: These arrays should be stored in zig-zag order.*/
|
||||
rc = vp8_default_zig_zag1d[i];
|
||||
z = coeff_ptr[rc];
|
||||
dq = dequant_ptr[rc];
|
||||
rounding = dq >> 1;
|
||||
/* Sign of z. */
|
||||
sz = -(z < 0);
|
||||
x = (z + sz) ^ sz;
|
||||
x += rounding;
|
||||
if (x >= dq)
|
||||
{
|
||||
/* Quantize x. */
|
||||
y = ((((x * quant_ptr[rc]) >> 16) + x) * quant_shift_ptr[rc]) >> 16;
|
||||
/* Put the sign back. */
|
||||
x = (y + sz) ^ sz;
|
||||
/* Save the coefficient and its dequantized value. */
|
||||
qcoeff_ptr[rc] = x;
|
||||
dqcoeff_ptr[rc] = x * dq;
|
||||
/* Remember the last non-zero coefficient. */
|
||||
if (y)
|
||||
eob = i;
|
||||
}
|
||||
}
|
||||
|
||||
*d->eob = (char)(eob + 1);
|
||||
}
|
||||
|
||||
void vp8_quantize_mby_c(MACROBLOCK *x)
|
||||
{
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user