Remove CONFIG_EXT_INTRA_MOD2 flag
The tool is now fully adopted.
Change-Id: I26de0f4a7ffca2e889b822ade2058fe4cc8c368c
diff --git a/av1/common/blockd.c b/av1/common/blockd.c
index 98dcc70..95c099e 100644
--- a/av1/common/blockd.c
+++ b/av1/common/blockd.c
@@ -160,7 +160,6 @@
}
}
-#if CONFIG_EXT_INTRA_MOD2
const int16_t dr_intra_derivative[90] = {
// More evenly spread out angles and limited to 10-bit
// Values that are 0 will never be used
@@ -194,14 +193,3 @@
7, 0, 0, // 84, ...
3, 0, 0, // 87, ...
};
-#else
-const int16_t dr_intra_derivative[90] = {
- 1, 14666, 7330, 4884, 3660, 2926, 2435, 2084, 1821, 1616, 1451, 1317, 1204,
- 1108, 1026, 955, 892, 837, 787, 743, 703, 666, 633, 603, 574, 548,
- 524, 502, 481, 461, 443, 426, 409, 394, 379, 365, 352, 339, 327,
- 316, 305, 294, 284, 274, 265, 256, 247, 238, 230, 222, 214, 207,
- 200, 192, 185, 179, 172, 166, 159, 153, 147, 141, 136, 130, 124,
- 119, 113, 108, 103, 98, 93, 88, 83, 78, 73, 68, 63, 59,
- 54, 49, 45, 40, 35, 31, 26, 22, 17, 13, 8, 4,
-};
-#endif // CONFIG_EXT_INTRA_MOD2
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index c551888..9e03726 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -533,20 +533,12 @@
assert(dx > 0);
const int max_base_x = ((bw + bh) - 1) << upsample_above;
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits = 6 - upsample_above;
-#else
- const int frac_bits = 8 - upsample_above;
-#endif
const int base_inc = 1 << upsample_above;
x = dx;
for (r = 0; r < bh; ++r, dst += stride, x += dx) {
base = x >> frac_bits;
-#if CONFIG_EXT_INTRA_MOD2
shift = ((x << upsample_above) & 0x3F) >> 1;
-#else
- shift = (x << upsample_above) & 0xFF;
-#endif
if (base >= max_base_x) {
for (int i = r; i < bh; ++i) {
@@ -558,13 +550,8 @@
for (c = 0; c < bw; ++c, base += base_inc) {
if (base < max_base_x) {
-#if CONFIG_EXT_INTRA_MOD2
val = above[base] * (32 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- val = above[base] * (256 - shift) + above[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
dst[c] = clip_pixel(val);
} else {
dst[c] = above[max_base_x];
@@ -584,45 +571,24 @@
assert(dy > 0);
const int min_base_x = -(1 << upsample_above);
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits_x = 6 - upsample_above;
const int frac_bits_y = 6 - upsample_left;
-#else
- const int frac_bits_x = 8 - upsample_above;
- const int frac_bits_y = 8 - upsample_left;
-#endif
const int base_inc_x = 1 << upsample_above;
x = -dx;
for (r = 0; r < bh; ++r, x -= dx, dst += stride) {
base1 = x >> frac_bits_x;
-#if CONFIG_EXT_INTRA_MOD2
y = (r << 6) - dy;
-#else
- y = (r << 8) - dy;
-#endif
for (c = 0; c < bw; ++c, base1 += base_inc_x, y -= dy) {
if (base1 >= min_base_x) {
-#if CONFIG_EXT_INTRA_MOD2
shift1 = ((x * (1 << upsample_above)) & 0x3F) >> 1;
val = above[base1] * (32 - shift1) + above[base1 + 1] * shift1;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- shift1 = (x * (1 << upsample_above)) & 0xFF;
- val = above[base1] * (256 - shift1) + above[base1 + 1] * shift1;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
} else {
base2 = y >> frac_bits_y;
assert(base2 >= -(1 << upsample_left));
-#if CONFIG_EXT_INTRA_MOD2
shift2 = ((y * (1 << upsample_left)) & 0x3F) >> 1;
val = left[base2] * (32 - shift2) + left[base2 + 1] * shift2;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- shift2 = (y * (1 << upsample_left)) & 0xFF;
- val = left[base2] * (256 - shift2) + left[base2 + 1] * shift2;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
}
dst[c] = clip_pixel(val);
}
@@ -642,30 +608,17 @@
assert(dy > 0);
const int max_base_y = (bw + bh - 1) << upsample_left;
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits = 6 - upsample_left;
-#else
- const int frac_bits = 8 - upsample_left;
-#endif
const int base_inc = 1 << upsample_left;
y = dy;
for (c = 0; c < bw; ++c, y += dy) {
base = y >> frac_bits;
-#if CONFIG_EXT_INTRA_MOD2
shift = ((y << upsample_left) & 0x3F) >> 1;
-#else
- shift = (y << upsample_left) & 0xFF;
-#endif
for (r = 0; r < bh; ++r, base += base_inc) {
if (base < max_base_y) {
-#if CONFIG_EXT_INTRA_MOD2
val = left[base] * (32 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- val = left[base] * (256 - shift) + left[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
dst[r * stride + c] = clip_pixel(val);
} else {
for (; r < bh; ++r) dst[r * stride + c] = left[max_base_y];
@@ -743,20 +696,12 @@
assert(dx > 0);
const int max_base_x = ((bw + bh) - 1) << upsample_above;
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits = 6 - upsample_above;
-#else
- const int frac_bits = 8 - upsample_above;
-#endif
const int base_inc = 1 << upsample_above;
x = dx;
for (r = 0; r < bh; ++r, dst += stride, x += dx) {
base = x >> frac_bits;
-#if CONFIG_EXT_INTRA_MOD2
shift = ((x << upsample_above) & 0x3F) >> 1;
-#else
- shift = (x << upsample_above) & 0xFF;
-#endif
if (base >= max_base_x) {
for (int i = r; i < bh; ++i) {
@@ -768,13 +713,8 @@
for (c = 0; c < bw; ++c, base += base_inc) {
if (base < max_base_x) {
-#if CONFIG_EXT_INTRA_MOD2
val = above[base] * (32 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- val = above[base] * (256 - shift) + above[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
dst[c] = clip_pixel_highbd(val, bd);
} else {
dst[c] = above[max_base_x];
@@ -794,49 +734,24 @@
assert(dy > 0);
const int min_base_x = -(1 << upsample_above);
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits_x = 6 - upsample_above;
const int frac_bits_y = 6 - upsample_left;
-#else
- const int frac_bits_x = 8 - upsample_above;
- const int frac_bits_y = 8 - upsample_left;
-#endif
for (r = 0; r < bh; ++r) {
for (c = 0; c < bw; ++c) {
y = r + 1;
-#if CONFIG_EXT_INTRA_MOD2
x = (c << 6) - y * dx;
-#else
- x = (c << 8) - y * dx;
-#endif
base = x >> frac_bits_x;
if (base >= min_base_x) {
-#if CONFIG_EXT_INTRA_MOD2
shift = ((x * (1 << upsample_above)) & 0x3F) >> 1;
val = above[base] * (32 - shift) + above[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- shift = (x * (1 << upsample_above)) & 0xFF;
- val = above[base] * (256 - shift) + above[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
} else {
x = c + 1;
-#if CONFIG_EXT_INTRA_MOD2
y = (r << 6) - x * dy;
-#else
- y = (r << 8) - x * dy;
-#endif
base = y >> frac_bits_y;
-#if CONFIG_EXT_INTRA_MOD2
shift = ((y * (1 << upsample_left)) & 0x3F) >> 1;
val = left[base] * (32 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- shift = (y * (1 << upsample_left)) & 0xFF;
- val = left[base] * (256 - shift) + left[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
}
dst[c] = clip_pixel_highbd(val, bd);
}
@@ -857,30 +772,17 @@
assert(dy > 0);
const int max_base_y = (bw + bh - 1) << upsample_left;
-#if CONFIG_EXT_INTRA_MOD2
const int frac_bits = 6 - upsample_left;
-#else
- const int frac_bits = 8 - upsample_left;
-#endif
const int base_inc = 1 << upsample_left;
y = dy;
for (c = 0; c < bw; ++c, y += dy) {
base = y >> frac_bits;
-#if CONFIG_EXT_INTRA_MOD2
shift = ((y << upsample_left) & 0x3F) >> 1;
-#else
- shift = (y << upsample_left) & 0xFF;
-#endif
for (r = 0; r < bh; ++r, base += base_inc) {
if (base < max_base_y) {
-#if CONFIG_EXT_INTRA_MOD2
val = left[base] * (32 - shift) + left[base + 1] * shift;
val = ROUND_POWER_OF_TWO(val, 5);
-#else
- val = left[base] * (256 - shift) + left[base + 1] * shift;
- val = ROUND_POWER_OF_TWO(val, 8);
-#endif
dst[r * stride + c] = clip_pixel_highbd(val, bd);
} else {
for (; r < bh; ++r) dst[r * stride + c] = left[max_base_y];
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 8cceb67..2396a0f 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -97,7 +97,6 @@
set(CONFIG_ENTROPY_STATS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXPLICIT_ORDER_HINT 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_DELTA_Q 1 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_EXT_INTRA_MOD2 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_EXT_WARPED_MOTION 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FAST_SGR 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FILM_GRAIN 0 CACHE NUMBER "AV1 experiment flag.")