diff options
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/dct.c | 4 | ||||
-rw-r--r-- | vp8/encoder/encodemb.c | 12 | ||||
-rw-r--r-- | vp8/encoder/quantize.c | 17 |
3 files changed, 33 insertions, 0 deletions
diff --git a/vp8/encoder/dct.c b/vp8/encoder/dct.c index fd4c62cd4..5c386e224 100644 --- a/vp8/encoder/dct.c +++ b/vp8/encoder/dct.c @@ -36,7 +36,11 @@ void vp8_short_fdct8x8_c(short *block, short *coefs, int pitch) { 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++) diff --git a/vp8/encoder/encodemb.c b/vp8/encoder/encodemb.c index 0711a1468..ead1686b5 100644 --- a/vp8/encoder/encodemb.c +++ b/vp8/encoder/encodemb.c @@ -1075,6 +1075,9 @@ void optimize_mb_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) 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)); @@ -1164,6 +1167,11 @@ void vp8_optimize_mby_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) ENTROPY_CONTEXT *ta; ENTROPY_CONTEXT *tl; +#if CONFIG_EXTEND_QRANGE +return ; +#endif + + if (!x->e_mbd.above_context) return; @@ -1228,6 +1236,10 @@ void vp8_optimize_mbuv_8x8(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd) ENTROPY_CONTEXT *ta; ENTROPY_CONTEXT *tl; +#if CONFIG_EXTEND_QRANGE +return ; +#endif + if (!x->e_mbd.above_context) return; diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c index e95fa60e6..8bbc0d0a5 100644 --- a/vp8/encoder/quantize.c +++ b/vp8/encoder/quantize.c @@ -458,6 +458,9 @@ void vp8_fast_quantize_b_2x2_c(BLOCK *b, BLOCKD *d) 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) { @@ -506,6 +509,12 @@ void vp8_fast_quantize_b_8x8_c(BLOCK *b, BLOCKD *d) 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 @@ -562,6 +571,11 @@ void vp8_regular_quantize_b_2x2(BLOCK *b, BLOCKD *d) //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 @@ -620,6 +634,9 @@ void vp8_regular_quantize_b_8x8(BLOCK *b, BLOCKD *d) 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) { |