diff options
author | John Koleszar <jkoleszar@google.com> | 2013-01-08 10:11:26 -0800 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-01-08 10:19:59 -0800 |
commit | 879cb7d96259a71eea0038452a00241650589084 (patch) | |
tree | 4d8c0a86fcdb6655d10647837e6c3adfb38639c4 /vp9/decoder | |
parent | c14439c3d3db8dfa44a30c4edc50f56250ce4cd3 (diff) | |
parent | bdca030cafc31446afc1685906f7c44e1850ed84 (diff) | |
download | libvpx-879cb7d96259a71eea0038452a00241650589084.tar libvpx-879cb7d96259a71eea0038452a00241650589084.tar.gz libvpx-879cb7d96259a71eea0038452a00241650589084.tar.bz2 libvpx-879cb7d96259a71eea0038452a00241650589084.zip |
Merge vp9-preview changes into experimental branch
Incorportate vp9-preview changes by merging master branch into experimental.
Conflicts:
test/test.mk
vp9/common/vp9_filter.c
vp9/common/vp9_idctllm.c
vp9/common/vp9_invtrans.h
vp9/common/vp9_mbpitch.c
vp9/common/vp9_rtcd_defs.sh
vp9/common/vp9_systemdependent.h
vp9/common/vp9_type_aliases.h
vp9/common/x86/vp9_asm_stubs.c
vp9/common/x86/vp9_subpixel_mmx.asm
vp9/decoder/vp9_decodframe.c
vp9/decoder/vp9_dequantize.c
vp9/decoder/vp9_dequantize.h
vp9/decoder/vp9_onyxd_int.h
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_rdopt.c
Change-Id: I17f51c3666d1b59cf1a699f87607cbc5d30a87c5
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/vp9_dboolhuff.h | 2 | ||||
-rw-r--r-- | vp9/decoder/vp9_decodframe.c | 19 | ||||
-rw-r--r-- | vp9/decoder/vp9_dequantize.c | 56 | ||||
-rw-r--r-- | vp9/decoder/vp9_dequantize.h | 105 | ||||
-rw-r--r-- | vp9/decoder/vp9_onyxd_int.h | 3 | ||||
-rw-r--r-- | vp9/decoder/x86/vp9_idct_blk_mmx.c | 2 | ||||
-rw-r--r-- | vp9/decoder/x86/vp9_idct_blk_sse2.c | 2 | ||||
-rw-r--r-- | vp9/decoder/x86/vp9_x86_dsystemdependent.c | 2 |
8 files changed, 93 insertions, 98 deletions
diff --git a/vp9/decoder/vp9_dboolhuff.h b/vp9/decoder/vp9_dboolhuff.h index c8c5c3b01..5afdd67c8 100644 --- a/vp9/decoder/vp9_dboolhuff.h +++ b/vp9/decoder/vp9_dboolhuff.h @@ -13,7 +13,7 @@ #include <stddef.h> #include <limits.h> -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/mem.h" #include "vpx/vpx_integer.h" diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index 36eadc482..812bf10fc 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -264,7 +264,8 @@ static void decode_16x16(VP9D_COMP *pbi, MACROBLOCKD *xd, if (tx_type != DCT_DCT) { vp9_ht_dequant_idct_add_16x16_c(tx_type, xd->qcoeff, xd->block[0].dequant, xd->predictor, - xd->dst.y_buffer, 16, xd->dst.y_stride); + xd->dst.y_buffer, 16, xd->dst.y_stride, + xd->eobs[0]); } else { vp9_dequant_idct_add_16x16(xd->qcoeff, xd->block[0].dequant, xd->predictor, xd->dst.y_buffer, @@ -310,7 +311,8 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd, } tx_type = get_tx_type_8x8(xd, &xd->block[ib]); if (tx_type != DCT_DCT) { - vp9_ht_dequant_idct_add_8x8_c(tx_type, q, dq, pre, dst, 16, stride); + vp9_ht_dequant_idct_add_8x8_c(tx_type, q, dq, pre, dst, 16, stride, + xd->eobs[idx]); } else { vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, 0, xd->eobs[idx]); @@ -409,7 +411,7 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, vp9_ht_dequant_idct_add_c(tx_type, b->qcoeff, b->dequant, b->predictor, *(b->base_dst) + b->dst, 16, - b->dst_stride); + b->dst_stride, b->eob); } else { vp9_dequant_idct_add(b->qcoeff, b->dequant, b->predictor, *(b->base_dst) + b->dst, 16, b->dst_stride); @@ -454,7 +456,8 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, if (tx_type != DCT_DCT) { vp9_ht_dequant_idct_add_c(tx_type, b->qcoeff, b->dequant, b->predictor, - *(b->base_dst) + b->dst, 16, b->dst_stride); + *(b->base_dst) + b->dst, 16, b->dst_stride, + b->eob); } else { vp9_dequant_idct_add(b->qcoeff, b->dequant, b->predictor, *(b->base_dst) + b->dst, 16, b->dst_stride); @@ -516,7 +519,7 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, vp9_ht_dequant_idct_add_c(tx_type, b->qcoeff, b->dequant, b->predictor, *(b->base_dst) + b->dst, 16, - b->dst_stride); + b->dst_stride, b->eob); } else { vp9_dequant_idct_add(b->qcoeff, b->dequant, b->predictor, *(b->base_dst) + b->dst, 16, b->dst_stride); @@ -570,7 +573,7 @@ static void decode_16x16_sb(VP9D_COMP *pbi, MACROBLOCKD *xd, tx_type, xd->qcoeff, xd->block[0].dequant, xd->dst.y_buffer + y_idx * 16 * xd->dst.y_stride + x_idx * 16, xd->dst.y_buffer + y_idx * 16 * xd->dst.y_stride + x_idx * 16, - xd->dst.y_stride, xd->dst.y_stride); + xd->dst.y_stride, xd->dst.y_stride, xd->block[0].eob); } else { vp9_dequant_idct_add_16x16( xd->qcoeff, xd->block[0].dequant, @@ -609,7 +612,7 @@ static void decode_8x8_sb(VP9D_COMP *pbi, MACROBLOCKD *xd, + x_idx * 16 + (i & 1) * 8, xd->dst.y_buffer + (y_idx * 16 + (i / 2) * 8) * xd->dst.y_stride + x_idx * 16 + (i & 1) * 8, - stride, stride); + stride, stride, b->eob); } else { vp9_dequant_idct_add_8x8_c( q, dq, @@ -666,7 +669,7 @@ static void decode_4x4_sb(VP9D_COMP *pbi, MACROBLOCKD *xd, + x_idx * 16 + (i & 3) * 4, xd->dst.y_buffer + (y_idx * 16 + (i / 4) * 4) * xd->dst.y_stride + x_idx * 16 + (i & 3) * 4, - xd->dst.y_stride, xd->dst.y_stride); + xd->dst.y_stride, xd->dst.y_stride, b->eob); } else { vp9_dequant_idct_add_c( b->qcoeff, b->dequant, diff --git a/vp9/decoder/vp9_dequantize.c b/vp9/decoder/vp9_dequantize.c index 4376dc3d3..72cd2771e 100644 --- a/vp9/decoder/vp9_dequantize.c +++ b/vp9/decoder/vp9_dequantize.c @@ -14,7 +14,6 @@ #include "vpx_mem/vpx_mem.h" #include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/common/vp9_common.h" - static void add_residual(const int16_t *diff, const uint8_t *pred, int pitch, uint8_t *dest, int stride, int width, int height) { int r, c; @@ -61,7 +60,7 @@ void vp9_dequantize_b_c(BLOCKD *d) { void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, - int pitch, int stride) { + int pitch, int stride, uint16_t eobs) { int16_t output[16]; int16_t *diff_ptr = output; int i; @@ -70,7 +69,7 @@ void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input, input[i] = dq[i] * input[i]; } - vp9_ihtllm(input, output, 4 << 1, tx_type, 4); + vp9_ihtllm(input, output, 4 << 1, tx_type, 4, eobs); vpx_memset(input, 0, 32); @@ -80,21 +79,25 @@ void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input, void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, - int pitch, int stride) { + int pitch, int stride, uint16_t eobs) { int16_t output[64]; int16_t *diff_ptr = output; int i; + if (eobs == 0) { + /* All 0 DCT coefficient */ + vp9_copy_mem8x8(pred, pitch, dest, stride); + } else if (eobs > 0) { + input[0] = dq[0] * input[0]; + for (i = 1; i < 64; i++) { + input[i] = dq[1] * input[i]; + } - input[0] = dq[0] * input[0]; - for (i = 1; i < 64; i++) { - input[i] = dq[1] * input[i]; - } - - vp9_ihtllm(input, output, 16, tx_type, 8); + vp9_ihtllm(input, output, 16, tx_type, 8, eobs); - vpx_memset(input, 0, 128); + vpx_memset(input, 0, 128); - add_residual(diff_ptr, pred, pitch, dest, stride, 8, 8); + add_residual(diff_ptr, pred, pitch, dest, stride, 8, 8); + } } void vp9_dequant_idct_add_c(int16_t *input, const int16_t *dq, uint8_t *pred, @@ -256,26 +259,31 @@ void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq, void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, int16_t *input, const int16_t *dq, uint8_t *pred, - uint8_t *dest, int pitch, int stride) { + uint8_t *dest, int pitch, int stride, + uint16_t eobs) { int16_t output[256]; int16_t *diff_ptr = output; int i; + if (eobs == 0) { + /* All 0 DCT coefficient */ + vp9_copy_mem16x16(pred, pitch, dest, stride); + } else if (eobs > 0) { + input[0]= input[0] * dq[0]; - input[0]= input[0] * dq[0]; - - // recover quantizer for 4 4x4 blocks - for (i = 1; i < 256; i++) - input[i] = input[i] * dq[1]; + // recover quantizer for 4 4x4 blocks + for (i = 1; i < 256; i++) + input[i] = input[i] * dq[1]; - // inverse hybrid transform - vp9_ihtllm(input, output, 32, tx_type, 16); + // inverse hybrid transform + vp9_ihtllm(input, output, 32, tx_type, 16, eobs); - // the idct halves ( >> 1) the pitch - // vp9_short_idct16x16_c(input, output, 32); + // the idct halves ( >> 1) the pitch + // vp9_short_idct16x16_c(input, output, 32); - vpx_memset(input, 0, 512); + vpx_memset(input, 0, 512); - add_residual(diff_ptr, pred, pitch, dest, stride, 16, 16); + add_residual(diff_ptr, pred, pitch, dest, stride, 16, 16); + } } void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq, diff --git a/vp9/decoder/vp9_dequantize.h b/vp9/decoder/vp9_dequantize.h index c578608ba..bbbc173a2 100644 --- a/vp9/decoder/vp9_dequantize.h +++ b/vp9/decoder/vp9_dequantize.h @@ -11,108 +11,93 @@ #ifndef VP9_DECODER_VP9_DEQUANTIZE_H_ #define VP9_DECODER_VP9_DEQUANTIZE_H_ - #include "vp9/common/vp9_blockd.h" #if CONFIG_LOSSLESS -extern void vp9_dequant_idct_add_lossless_c(int16_t *input, - const int16_t *dq, - uint8_t *pred, - uint8_t *output, +extern void vp9_dequant_idct_add_lossless_c(int16_t *input, const int16_t *dq, + unsigned char *pred, + unsigned char *output, int pitch, int stride); -extern void vp9_dequant_dc_idct_add_lossless_c(int16_t *input, - const int16_t *dq, - uint8_t *pred, - uint8_t *output, +extern void vp9_dequant_dc_idct_add_lossless_c(int16_t *input, const int16_t *dq, + unsigned char *pred, + unsigned char *output, int pitch, int stride, int dc); extern void vp9_dequant_dc_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq, - uint8_t *pre, - uint8_t *dst, + unsigned char *pre, + unsigned char *dst, int stride, uint16_t *eobs, const int16_t *dc); -extern void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, - const int16_t *dq, - uint8_t *pre, - uint8_t *dst, +extern void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq, + unsigned char *pre, + unsigned char *dst, int stride, uint16_t *eobs); -extern void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, - const int16_t *dq, - uint8_t *pre, - uint8_t *dst_u, - uint8_t *dst_v, +extern void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, const int16_t *dq, + unsigned char *pre, + unsigned char *dst_u, + unsigned char *dst_v, int stride, uint16_t *eobs); -#endif // CONFIG_LOSSLESS +#endif typedef void (*vp9_dequant_idct_add_fn_t)(int16_t *input, const int16_t *dq, - uint8_t *pred, uint8_t *output, - int pitch, int stride); + unsigned char *pred, unsigned char *output, int pitch, int stride); typedef void(*vp9_dequant_dc_idct_add_fn_t)(int16_t *input, const int16_t *dq, - uint8_t *pred, uint8_t *output, - int pitch, int stride, int dc); + unsigned char *pred, unsigned char *output, int pitch, int stride, int dc); -typedef void(*vp9_dequant_dc_idct_add_y_block_fn_t)(int16_t *q, - const int16_t *dq, - uint8_t *pre, uint8_t *dst, - int stride, uint16_t *eobs, - const int16_t *dc); +typedef void(*vp9_dequant_dc_idct_add_y_block_fn_t)(int16_t *q, const int16_t *dq, + unsigned char *pre, unsigned char *dst, int stride, uint16_t *eobs, + const int16_t *dc); typedef void(*vp9_dequant_idct_add_y_block_fn_t)(int16_t *q, const int16_t *dq, - uint8_t *pre, uint8_t *dst, - int stride, uint16_t *eobs); + unsigned char *pre, unsigned char *dst, int stride, uint16_t *eobs); typedef void(*vp9_dequant_idct_add_uv_block_fn_t)(int16_t *q, const int16_t *dq, - uint8_t *pre, uint8_t *dst_u, - uint8_t *dst_v, int stride, - uint16_t *eobs); + unsigned char *pre, unsigned char *dst_u, unsigned char *dst_v, int stride, + uint16_t *eobs); -void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input, - const int16_t *dq, - uint8_t *pred, uint8_t *dest, - int pitch, int stride); +void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input, const int16_t *dq, + unsigned char *pred, unsigned char *dest, + int pitch, int stride, uint16_t eobs); void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, int16_t *input, - const int16_t *dq, uint8_t *pred, - uint8_t *dest, int pitch, int stride); + const int16_t *dq, unsigned char *pred, + unsigned char *dest, int pitch, int stride, + uint16_t eobs); void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, int16_t *input, - const int16_t *dq, uint8_t *pred, - uint8_t *dest, - int pitch, int stride); + const int16_t *dq, unsigned char *pred, + unsigned char *dest, + int pitch, int stride, uint16_t eobs); #if CONFIG_SUPERBLOCKS -void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(int16_t *q, - const int16_t *dq, - uint8_t *dst, +void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(int16_t *q, const int16_t *dq, + unsigned char *dst, int stride, uint16_t *eobs, const int16_t *dc, MACROBLOCKD *xd); -void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(int16_t *q, - const int16_t *dq, - uint8_t *dst, +void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(int16_t *q, const int16_t *dq, + unsigned char *dst, int stride, uint16_t *eobs, const int16_t *dc, MACROBLOCKD *xd); -void vp9_dequant_idct_add_uv_block_8x8_inplace_c(int16_t *q, - const int16_t *dq, - uint8_t *dstu, - uint8_t *dstv, +void vp9_dequant_idct_add_uv_block_8x8_inplace_c(int16_t *q, const int16_t *dq, + unsigned char *dstu, + unsigned char *dstv, int stride, uint16_t *eobs, MACROBLOCKD *xd); -void vp9_dequant_idct_add_uv_block_4x4_inplace_c(int16_t *q, - const int16_t *dq, - uint8_t *dstu, - uint8_t *dstv, +void vp9_dequant_idct_add_uv_block_4x4_inplace_c(int16_t *q, const int16_t *dq, + unsigned char *dstu, + unsigned char *dstv, int stride, uint16_t *eobs, MACROBLOCKD *xd); -#endif // CONFIG_SUPERBLOCKS +#endif -#endif // VP9_DECODER_VP9_DEQUANTIZE_H_ +#endif diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h index 6b7184fbe..64975468d 100644 --- a/vp9/decoder/vp9_onyxd_int.h +++ b/vp9/decoder/vp9_onyxd_int.h @@ -10,8 +10,7 @@ #ifndef VP9_DECODER_VP9_ONYXD_INT_H_ #define VP9_DECODER_VP9_ONYXD_INT_H_ - -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/decoder/vp9_onyxd.h" #include "vp9/decoder/vp9_treereader.h" #include "vp9/common/vp9_onyxc_int.h" diff --git a/vp9/decoder/x86/vp9_idct_blk_mmx.c b/vp9/decoder/x86/vp9_idct_blk_mmx.c index df3485233..8279eaa4a 100644 --- a/vp9/decoder/x86/vp9_idct_blk_mmx.c +++ b/vp9/decoder/x86/vp9_idct_blk_mmx.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" #include "vp9/decoder/vp9_dequantize.h" #include "vp9/decoder/x86/vp9_idct_mmx.h" diff --git a/vp9/decoder/x86/vp9_idct_blk_sse2.c b/vp9/decoder/x86/vp9_idct_blk_sse2.c index 6c1fd1439..badd97f73 100644 --- a/vp9/decoder/x86/vp9_idct_blk_sse2.c +++ b/vp9/decoder/x86/vp9_idct_blk_sse2.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" #include "vp9/decoder/vp9_dequantize.h" diff --git a/vp9/decoder/x86/vp9_x86_dsystemdependent.c b/vp9/decoder/x86/vp9_x86_dsystemdependent.c index d1cc53fce..51ee8ec31 100644 --- a/vp9/decoder/x86/vp9_x86_dsystemdependent.c +++ b/vp9/decoder/x86/vp9_x86_dsystemdependent.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/x86.h" #include "vp9/decoder/vp9_onyxd_int.h" |