summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_dct.c
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-10-17 13:02:28 -0700
committerDmitry Kovalev <dkovalev@google.com>2013-10-17 13:02:28 -0700
commite05412fc23830d1af6560e5906884fa12184ce82 (patch)
treeb2a3dcda271d2882568b425f9af1c1d8e686ff8b /vp9/encoder/vp9_dct.c
parent518fc282f4f36f89f10e15a23dfc2ded5db294fa (diff)
downloadlibvpx-e05412fc23830d1af6560e5906884fa12184ce82.tar
libvpx-e05412fc23830d1af6560e5906884fa12184ce82.tar.gz
libvpx-e05412fc23830d1af6560e5906884fa12184ce82.tar.bz2
libvpx-e05412fc23830d1af6560e5906884fa12184ce82.zip
Using stride (# of elements) instead of pitch (bytes) in fdct32x32.
Just making fdct consistent with iht/idct/fht functions which all use stride (# of elements) as input argument. Change-Id: Id623c5113262655fa50f7c9d6cec9a91fcb20bb4
Diffstat (limited to 'vp9/encoder/vp9_dct.c')
-rw-r--r--vp9/encoder/vp9_dct.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c
index b6555bc05..00a29037e 100644
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -1315,8 +1315,7 @@ static void dct32_1d(const int *input, int *output, int round) {
output[31] = dct_32_round(step[31] * cospi_31_64 + step[16] * -cospi_1_64);
}
-void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int pitch) {
- int shortpitch = pitch >> 1;
+void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int stride) {
int i, j;
int output[32 * 32];
@@ -1324,7 +1323,7 @@ void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int pitch) {
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
- temp_in[j] = input[j * shortpitch + i] * 4;
+ temp_in[j] = input[j * stride + i] * 4;
dct32_1d(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
output[j * 32 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2;
@@ -1344,8 +1343,7 @@ void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int pitch) {
// Note that although we use dct_32_round in dct32_1d computation flow,
// this 2d fdct32x32 for rate-distortion optimization loop is operating
// within 16 bits precision.
-void vp9_short_fdct32x32_rd_c(int16_t *input, int16_t *out, int pitch) {
- int shortpitch = pitch >> 1;
+void vp9_short_fdct32x32_rd_c(int16_t *input, int16_t *out, int stride) {
int i, j;
int output[32 * 32];
@@ -1353,7 +1351,7 @@ void vp9_short_fdct32x32_rd_c(int16_t *input, int16_t *out, int pitch) {
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
- temp_in[j] = input[j * shortpitch + i] * 4;
+ temp_in[j] = input[j * stride + i] * 4;
dct32_1d(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
// TODO(cd): see quality impact of only doing