summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2012-08-06 14:48:11 -0700
committerJingning Han <jingning@google.com>2012-08-06 17:26:21 -0700
commit66f440f1ee6c993eff908da9c75cc2ae9de08775 (patch)
tree9acba48b175763d24a3597cd042e866d2f290909 /vp8/decoder
parent106815f830c9874ee9c663124b3ff41f095219ab (diff)
downloadlibvpx-66f440f1ee6c993eff908da9c75cc2ae9de08775.tar
libvpx-66f440f1ee6c993eff908da9c75cc2ae9de08775.tar.gz
libvpx-66f440f1ee6c993eff908da9c75cc2ae9de08775.tar.bz2
libvpx-66f440f1ee6c993eff908da9c75cc2ae9de08775.zip
Refactoring hybrid transform coding
The forward and inverse hybrid transforms are now performed using single function modules, where the dimension is sent as argument. Added an inline function clip8b to clip the reconstruction pixels into range of 0-255. Change-Id: Id7d870b3e1aefc092721c80c0af6f641eb5f3747
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/decodframe.c1
-rw-r--r--vp8/decoder/dequantize.c11
2 files changed, 6 insertions, 6 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 057104f49..59f453edf 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -392,7 +392,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
txfm_map(b, pred_mode_conv(i8x8mode));
vp8_ht_dequant_idct_add_8x8_c(b->bmi.as_mode.tx_type,
q, dq, pre, dst, 16, stride);
- // vp8_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
q += 64;
#else
for (j = 0; j < 4; j++) {
diff --git a/vp8/decoder/dequantize.c b/vp8/decoder/dequantize.c
index bf44fd61a..6164c44d5 100644
--- a/vp8/decoder/dequantize.c
+++ b/vp8/decoder/dequantize.c
@@ -55,7 +55,7 @@ void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
input[i] = dq[i] * input[i];
}
- vp8_iht4x4llm_c( input, output, 4 << 1, tx_type );
+ vp8_ihtllm_c(input, output, 4 << 1, tx_type, 4);
vpx_memset(input, 0, 32);
@@ -95,7 +95,7 @@ void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
input[i] = dq[1] * input[i];
}
- vp8_iht8x8llm_c(input, output, 16, tx_type);
+ vp8_ihtllm_c(input, output, 16, tx_type, 8);
vpx_memset(input, 0, 128);
@@ -117,9 +117,10 @@ void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
diff_ptr += 8;
pred += pitch;
}
- diff_ptr = output + (b + 1) / 2 * 4 * 8 + (b + 1) % 2 * 4;
- dest = origdest + (b + 1) / 2 * 4 * stride + (b + 1) % 2 * 4;
- pred = origpred + (b + 1) / 2 * 4 * pitch + (b + 1) % 2 * 4;
+ // shift buffer pointers to next 4x4 block in the submacroblock
+ diff_ptr = output + (b + 1) / 2 * 4 * 8 + ((b + 1) % 2) * 4;
+ dest = origdest + (b + 1) / 2 * 4 * stride + ((b + 1) % 2) * 4;
+ pred = origpred + (b + 1) / 2 * 4 * pitch + ((b + 1) % 2) * 4;
}
}
#endif