summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-02-25 18:19:55 -0800
committerDmitry Kovalev <dkovalev@google.com>2013-02-25 18:19:55 -0800
commit9bf3f7516884b9baf22d21431a461752bc06c379 (patch)
tree1b4315acbe1673cd4f52af4e316b4c297603569a /vp9/common
parent9770d564f4984e6a0d3cfdfb7e5b8bc83f52dccf (diff)
downloadlibvpx-9bf3f7516884b9baf22d21431a461752bc06c379.tar
libvpx-9bf3f7516884b9baf22d21431a461752bc06c379.tar.gz
libvpx-9bf3f7516884b9baf22d21431a461752bc06c379.tar.bz2
libvpx-9bf3f7516884b9baf22d21431a461752bc06c379.zip
Changing pitch value meaning for fht and iht transforms.
Pitch now means the number of elements, not the number of bytes. Change-Id: Idb9f2f012e39b09d596a3cc1802305a80b7c13af
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_idctllm.c25
-rw-r--r--vp9/common/vp9_invtrans.c10
2 files changed, 15 insertions, 20 deletions
diff --git a/vp9/common/vp9_idctllm.c b/vp9/common/vp9_idctllm.c
index 67cfc9d71..632dae8fd 100644
--- a/vp9/common/vp9_idctllm.c
+++ b/vp9/common/vp9_idctllm.c
@@ -122,7 +122,7 @@ void vp9_dc_only_inv_walsh_add_c(int input_dc, uint8_t *pred_ptr,
}
}
-void idct4_1d(int16_t *input, int16_t *output) {
+static void idct4_1d(int16_t *input, int16_t *output) {
int16_t step[4];
int temp1, temp2;
// stage 1
@@ -200,7 +200,7 @@ void vp9_dc_only_idct_add_c(int input_dc, uint8_t *pred_ptr,
}
}
-void idct8_1d(int16_t *input, int16_t *output) {
+static void idct8_1d(int16_t *input, int16_t *output) {
int16_t step1[8], step2[8];
int temp1, temp2;
// stage 1
@@ -320,10 +320,9 @@ static const transform_2d IHT_4[] = {
void vp9_short_iht4x4_c(int16_t *input, int16_t *output,
int pitch, TX_TYPE tx_type) {
+ int i, j;
int16_t out[4 * 4];
int16_t *outptr = out;
- const int half_pitch = pitch >> 1;
- int i, j;
int16_t temp_in[4], temp_out[4];
const transform_2d ht = IHT_4[tx_type];
@@ -340,7 +339,7 @@ void vp9_short_iht4x4_c(int16_t *input, int16_t *output,
temp_in[j] = out[j * 4 + i];
ht.cols(temp_in, temp_out);
for (j = 0; j < 4; ++j)
- output[j * half_pitch + i] = ROUND_POWER_OF_TWO(temp_out[j], 4);
+ output[j * pitch + i] = ROUND_POWER_OF_TWO(temp_out[j], 4);
}
}
@@ -430,10 +429,9 @@ static const transform_2d IHT_8[] = {
void vp9_short_iht8x8_c(int16_t *input, int16_t *output,
int pitch, TX_TYPE tx_type) {
+ int i, j;
int16_t out[8 * 8];
int16_t *outptr = out;
- const int half_pitch = pitch >> 1;
- int i, j;
int16_t temp_in[8], temp_out[8];
const transform_2d ht = IHT_8[tx_type];
@@ -450,7 +448,7 @@ void vp9_short_iht8x8_c(int16_t *input, int16_t *output,
temp_in[j] = out[j * 8 + i];
ht.cols(temp_in, temp_out);
for (j = 0; j < 8; ++j)
- output[j * half_pitch + i] = ROUND_POWER_OF_TWO(temp_out[j], 5);
+ output[j * pitch + i] = ROUND_POWER_OF_TWO(temp_out[j], 5);
}
}
@@ -486,7 +484,7 @@ void vp9_short_idct1_8x8_c(int16_t *input, int16_t *output) {
output[0] = ROUND_POWER_OF_TWO(out, 5);
}
-void idct16_1d(int16_t *input, int16_t *output) {
+static void idct16_1d(int16_t *input, int16_t *output) {
int16_t step1[16], step2[16];
int temp1, temp2;
@@ -853,18 +851,17 @@ static const transform_2d IHT_16[] = {
};
void vp9_short_iht16x16_c(int16_t *input, int16_t *output,
- int pitch, TX_TYPE tx_type) {
+ int input_pitch, TX_TYPE tx_type) {
+ int i, j;
int16_t out[16 * 16];
int16_t *outptr = out;
- const int half_pitch = pitch >> 1;
- int i, j;
int16_t temp_in[16], temp_out[16];
const transform_2d ht = IHT_16[tx_type];
// Rows
for (i = 0; i < 16; ++i) {
ht.rows(input, outptr);
- input += half_pitch;
+ input += input_pitch;
outptr += 16;
}
@@ -912,7 +909,7 @@ void vp9_short_idct1_16x16_c(int16_t *input, int16_t *output) {
output[0] = ROUND_POWER_OF_TWO(out, 6);
}
-void idct32_1d(int16_t *input, int16_t *output) {
+static void idct32_1d(int16_t *input, int16_t *output) {
int16_t step1[32], step2[32];
int temp1, temp2;
diff --git a/vp9/common/vp9_invtrans.c b/vp9/common/vp9_invtrans.c
index c6b961894..d431ea24b 100644
--- a/vp9/common/vp9_invtrans.c
+++ b/vp9/common/vp9_invtrans.c
@@ -25,8 +25,7 @@ void vp9_inverse_transform_mby_4x4(MACROBLOCKD *xd) {
for (i = 0; i < 16; i++) {
TX_TYPE tx_type = get_tx_type_4x4(xd, &xd->block[i]);
if (tx_type != DCT_DCT) {
- vp9_short_iht4x4(xd->block[i].dqcoeff, xd->block[i].diff,
- 32, tx_type);
+ vp9_short_iht4x4(xd->block[i].dqcoeff, xd->block[i].diff, 16, tx_type);
} else {
vp9_inverse_transform_b_4x4(xd, i, 32);
}
@@ -58,8 +57,7 @@ void vp9_inverse_transform_mby_8x8(MACROBLOCKD *xd) {
for (i = 0; i < 9; i += 8) {
TX_TYPE tx_type = get_tx_type_8x8(xd, &xd->block[i]);
if (tx_type != DCT_DCT) {
- vp9_short_iht8x8(xd->block[i].dqcoeff, xd->block[i].diff,
- 32, tx_type);
+ vp9_short_iht8x8(xd->block[i].dqcoeff, xd->block[i].diff, 16, tx_type);
} else {
vp9_inverse_transform_b_8x8(&blockd[i].dqcoeff[0],
&blockd[i].diff[0], 32);
@@ -69,7 +67,7 @@ void vp9_inverse_transform_mby_8x8(MACROBLOCKD *xd) {
TX_TYPE tx_type = get_tx_type_8x8(xd, &xd->block[i]);
if (tx_type != DCT_DCT) {
vp9_short_iht8x8(xd->block[i + 2].dqcoeff, xd->block[i].diff,
- 32, tx_type);
+ 16, tx_type);
} else {
vp9_inverse_transform_b_8x8(&blockd[i + 2].dqcoeff[0],
&blockd[i].diff[0], 32);
@@ -101,7 +99,7 @@ void vp9_inverse_transform_mby_16x16(MACROBLOCKD *xd) {
BLOCKD *bd = &xd->block[0];
TX_TYPE tx_type = get_tx_type_16x16(xd, bd);
if (tx_type != DCT_DCT) {
- vp9_short_iht16x16(bd->dqcoeff, bd->diff, 32, tx_type);
+ vp9_short_iht16x16(bd->dqcoeff, bd->diff, 16, tx_type);
} else {
vp9_inverse_transform_b_16x16(&xd->block[0].dqcoeff[0],
&xd->block[0].diff[0], 32);