Commit 73db4ac1 authored by Jingning Han's avatar Jingning Han

Replace b_width_log2_lookup[] with direct block size access

Replace b_width_log2_lookup[] and b_height_log2_lookup[] computation
with direct block_size_wide/high[] access.

Change-Id: I3947085d2269309aada6f6e805e8d1c58c197316
parent db4c9ba3
......@@ -460,8 +460,8 @@ static void get_energy_distribution_fine(const AV1_COMP *cpi, BLOCK_SIZE bsize,
uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
double *hordist, double *verdist) {
int bw = 4 << (b_width_log2_lookup[bsize]);
int bh = 4 << (b_height_log2_lookup[bsize]);
int bw = block_size_wide[bsize];
int bh = block_size_high[bsize];
unsigned int esq[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
unsigned int var[16];
double total = 0;
......
......@@ -82,8 +82,8 @@ TEST_P(AV1DenoiserTest, BitexactCheck) {
motion_magnitude_random));
// Test bitexactness.
for (int h = 0; h < (4 << b_height_log2_lookup[bs_]); ++h) {
for (int w = 0; w < (4 << b_width_log2_lookup[bs_]); ++w) {
for (int h = 0; h < block_size_high[bs_]; ++h) {
for (int w = 0; w < block_size_wide[bs_]; ++w) {
EXPECT_EQ(avg_block_c[h * 64 + w], avg_block_sse2[h * 64 + w]);
}
}
......
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