CMSIS-DSP: Corrected preconditions on arm_bilinear_interp functions.
rows and cols were switched and the bounds were not correct.
@@ -8555,7 +8555,7 @@ float32_t arm_yule_distance(const uint32_t *pA, const uint32_t *pB, uint32_t num
/* Care taken for table outside boundary */
/* Returns zero output when values are outside table boundary */
- if (xIndex < 0 || xIndex > (S->numRows - 2) || yIndex < 0 || yIndex > (S->numCols - 2))
+ if (xIndex < 0 || xIndex > (S->numCols - 2) || yIndex < 0 || yIndex > (S->numRows - 2))
{
return (0);
}
@@ -8628,7 +8628,7 @@ float32_t arm_yule_distance(const uint32_t *pA, const uint32_t *pB, uint32_t num
/* Care taken for table outside boundary */
/* Returns zero output when values are outside table boundary */
- if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
+ if (rI < 0 || rI > (S->numCols - 2) || cI < 0 || cI > (S->numRows - 2))
{
return (0);
}
@@ -8702,7 +8702,7 @@ float32_t arm_yule_distance(const uint32_t *pA, const uint32_t *pB, uint32_t num
/* Care taken for table outside boundary */
/* Returns zero output when values are outside table boundary */
- if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
+ if (rI < 0 || rI > (S->numCols - 2) || cI < 0 || cI > (S->numRows - 2))
{
return (0);
}
@@ -8780,7 +8780,7 @@ float32_t arm_yule_distance(const uint32_t *pA, const uint32_t *pB, uint32_t num
/* Care taken for table outside boundary */
/* Returns zero output when values are outside table boundary */
- if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
+ if (rI < 0 || rI > (S->numCols - 2) || cI < 0 || cI > (S->numRows - 2))
{
return (0);
}
