cdef: Remove extra kSecondaryTaps dimension
The values in both dimensions are the same. Helps to clarify a confusing part
of the spec where priStr is used when calculating values with secStr.
7.15.3. CDEF filter process
primary:
Cdef_Pri_Taps[(priStr >> coeffShift) & 1][k] *
constrain(p - x, priStr, damping)
secondary:
Cdef_Sec_Taps[(priStr >> coeffShift) & 1][k] *
constrain(s - x, secStr, damping)
Change-Id: Ie0a330dce7041915ba4c5021e2a66ec3fe08b08a
diff --git a/src/dsp/cdef.cc b/src/dsp/cdef.cc
index cd4f125..40e613d 100644
--- a/src/dsp/cdef.cc
+++ b/src/dsp/cdef.cc
@@ -34,7 +34,7 @@
constexpr uint8_t kPrimaryTaps[2][2] = {{4, 2}, {3, 3}};
-constexpr uint8_t kSecondaryTaps[2][2] = {{2, 1}, {2, 1}};
+constexpr uint8_t kSecondaryTaps[2] = {2, 1};
constexpr int8_t kCdefDirections[8][2][2] = {
{{-1, 1}, {-2, 2}}, {{0, 1}, {-1, 2}}, {{0, 1}, {0, 2}}, {{0, 1}, {1, 2}},
@@ -162,7 +162,7 @@
if (value != kCdefLargeValue) {
sum +=
Constrain(value - pixel_value, secondary_strength, damping) *
- kSecondaryTaps[(primary_strength >> coeff_shift) & 1][k];
+ kSecondaryTaps[k];
max_value = std::max(value, max_value);
min_value = std::min(value, min_value);
}