for (i = 0; i < 16; i++)
{
+#if CONFIG_EXTEND_QRANGE
+ DQ[i] = (short)((Q[i] * DQC[i]+2)>>2);
+#else
DQ[i] = (short)(Q[i] * DQC[i]);
+#endif
}
#ifdef DEC_DEBUG
if (dec_debug) {
}
}
#endif
+
+#if CONFIG_EXTEND_QRANGE
+ input[0]= (input[0] * dq[0]+2)>>2;
+#else
+ input[0]= input[0] * dq[0];
+#endif
+
// recover quantizer for 4 4x4 blocks
- for (i = 0; i < 64; i++)
+ for (i = 1; i < 64; i++)
{
- input[i]=input[i] * dq[i!=0];
+#if CONFIG_EXTEND_QRANGE
+ input[i]=(input[i] * dq[1]+2)>>2;
+#else
+ input[i]=input[i] * dq[1];
+#endif
}
#ifdef DEC_DEBUG
if (dec_debug) {
#endif
for (i = 1; i < 64; i++)
{
- input[i] = input[i] * dq[i!=0];
+#if CONFIG_EXTEND_QRANGE
+ input[i]=(input[i] * dq[1]+2)>>2;
+#else
+ input[i]=input[i] * dq[1];
+#endif
}
#ifdef DEC_DEBUG
{
for (j = 0; j < 8; j++)
{
+#if !CONFIG_EXTEND_QRANGE
b[j] = (float)( block[k + j]<<1);
+#else
+ b[j] = (float)( block[k + j]<<3);
+#endif
}
/* Horizontal transform */
for (j = 0; j < 4; j++)
ENTROPY_CONTEXT *ta;
ENTROPY_CONTEXT *tl;
+#if CONFIG_EXTEND_QRANGE
+return ;
+#endif
vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
ENTROPY_CONTEXT *ta;
ENTROPY_CONTEXT *tl;
+#if CONFIG_EXTEND_QRANGE
+return ;
+#endif
+
+
if (!x->e_mbd.above_context)
return;
ENTROPY_CONTEXT *ta;
ENTROPY_CONTEXT *tl;
+#if CONFIG_EXTEND_QRANGE
+return ;
+#endif
+
if (!x->e_mbd.above_context)
return;
qcoeff_ptr[rc] = x; // write to destination
//dqcoeff_ptr[rc] = x * dequant_ptr[rc] / q2nd; // dequantized value
dqcoeff_ptr[rc] = x * dequant_ptr[rc]; // dequantized value
+#if CONFIG_EXTEND_QRANGE
+ dqcoeff_ptr[rc] = (dqcoeff_ptr[rc]+2)>>2;
+#endif
if (y)
{
qcoeff_ptr[rc] = x; // write to destination
//dqcoeff_ptr[rc] = x * dequant_ptr[rc!=0] / q1st; // dequantized value
dqcoeff_ptr[rc] = x * dequant_ptr[rc!=0]; // dequantized value
+
+#if CONFIG_EXTEND_QRANGE
+ dqcoeff_ptr[rc] = (dqcoeff_ptr[rc]+2)>>2;
+#endif
+
+
if (y)
{
eob = i; // last nonzero coeffs
//dqcoeff_ptr[rc] = x * dequant_ptr[rc]/q2nd; // dequantized value
dqcoeff_ptr[rc] = x * dequant_ptr[rc]; // dequantized value
+#if CONFIG_EXTEND_QRANGE
+ dqcoeff_ptr[rc] = (dqcoeff_ptr[rc]+2)>>2;
+#endif
+
+
if (y)
{
eob = i; // last nonzero coeffs
qcoeff_ptr[rc] = x; // write to destination
//dqcoeff_ptr[rc] = x * dequant_ptr[rc!=0] / q1st; // dequantized value
dqcoeff_ptr[rc] = x * dequant_ptr[rc!=0]; // dequantized value
+#if CONFIG_EXTEND_QRANGE
+ dqcoeff_ptr[rc] = (dqcoeff_ptr[rc]+2)>>2;
+#endif
if (y)
{