Commit be029580 authored by Urvang Joshi's avatar Urvang Joshi

Fix warnings reported by -Wshadow: Part3: test/ directory

Change-Id: I6fbe203d37010e47f198215f499c3fa1043fd042
parent 72d3ba8a
......@@ -139,7 +139,6 @@ class AV1PartialIDctTest
};
TEST_P(AV1PartialIDctTest, RunQuantCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int size;
switch (tx_size_) {
case TX_4X4: size = 4; break;
......@@ -160,7 +159,7 @@ TEST_P(AV1PartialIDctTest, RunQuantCheck) {
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
int max_error = 0;
for (int i = 0; i < count_test_block; ++i) {
for (int m = 0; m < count_test_block; ++m) {
// clear out destination buffer
memset(dst1, 0, sizeof(*dst1) * block_size);
memset(dst2, 0, sizeof(*dst2) * block_size);
......@@ -169,11 +168,11 @@ TEST_P(AV1PartialIDctTest, RunQuantCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
for (int i = 0; i < count_test_block; ++i) {
for (int n = 0; n < count_test_block; ++n) {
// Initialize a test block with input range [-255, 255].
if (i == 0) {
if (n == 0) {
for (int j = 0; j < block_size; ++j) input_extreme_block[j] = 255;
} else if (i == 1) {
} else if (n == 1) {
for (int j = 0; j < block_size; ++j) input_extreme_block[j] = -255;
} else {
for (int j = 0; j < block_size; ++j) {
......
......@@ -220,23 +220,24 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
// Vertical pass (transposed intermediate -> dst).
{
uint16_t *src_ptr = intermediate_buffer;
const uint16_t *interm_ptr = intermediate_buffer;
const int dst_next_row_stride = dst_stride - output_width;
unsigned int i, j;
for (i = 0; i < output_height; ++i) {
for (j = 0; j < output_width; ++j) {
// Apply filter...
const int temp = (src_ptr[0] * VFilter[0]) + (src_ptr[1] * VFilter[1]) +
(src_ptr[2] * VFilter[2]) + (src_ptr[3] * VFilter[3]) +
(src_ptr[4] * VFilter[4]) + (src_ptr[5] * VFilter[5]) +
(src_ptr[6] * VFilter[6]) + (src_ptr[7] * VFilter[7]) +
(AV1_FILTER_WEIGHT >> 1); // Rounding
const int temp =
(interm_ptr[0] * VFilter[0]) + (interm_ptr[1] * VFilter[1]) +
(interm_ptr[2] * VFilter[2]) + (interm_ptr[3] * VFilter[3]) +
(interm_ptr[4] * VFilter[4]) + (interm_ptr[5] * VFilter[5]) +
(interm_ptr[6] * VFilter[6]) + (interm_ptr[7] * VFilter[7]) +
(AV1_FILTER_WEIGHT >> 1); // Rounding
// Normalize back to 0-255...
*dst_ptr++ = clip_pixel_highbd(temp >> AV1_FILTER_SHIFT, bd);
src_ptr += intermediate_height;
interm_ptr += intermediate_height;
}
src_ptr += intermediate_next_stride;
interm_ptr += intermediate_next_stride;
dst_ptr += dst_next_row_stride;
}
}
......
......@@ -260,7 +260,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_));
#endif // CONFIG_AOM_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
for (j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
if (err_count && !err_count_total) {
......@@ -424,7 +424,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
ASM_REGISTER_STATE_CHECK(loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0,
thresh0, blimit1, limit1, thresh1));
#endif // CONFIG_AOM_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
for (j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
if (err_count && !err_count_total) {
......
......@@ -55,7 +55,6 @@ class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
};
TEST_P(PartialIDctTest, RunQuantCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int size;
switch (tx_size_) {
case TX_4X4: size = 4; break;
......@@ -76,7 +75,7 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
int max_error = 0;
for (int i = 0; i < count_test_block; ++i) {
for (int m = 0; m < count_test_block; ++m) {
// clear out destination buffer
memset(dst1, 0, sizeof(*dst1) * block_size);
memset(dst2, 0, sizeof(*dst2) * block_size);
......@@ -85,11 +84,11 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
for (int i = 0; i < count_test_block; ++i) {
for (int n = 0; n < count_test_block; ++n) {
// Initialize a test block with input range [-255, 255].
if (i == 0) {
if (n == 0) {
for (int j = 0; j < block_size; ++j) input_extreme_block[j] = 255;
} else if (i == 1) {
} else if (n == 1) {
for (int j = 0; j < block_size; ++j) input_extreme_block[j] = -255;
} else {
for (int j = 0; j < block_size; ++j) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment