quirc: always inline perspective_map function
What changed, and why it matters
This commit is a minor compiler-level optimization. It tells the compiler to always inline a small helper function used when mapping QR code corners to image coordinates. There is no visible security relevance: no input validation, memory access, or logic changes are made.
No security action needed. Treat as a routine performance/compiler-hint change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds __attribute__((always_inline)) and changes the function definition from static void to static inline void for perspective_map() in components/esp32-quirc/lib/identify.c. The function body is unchanged. This is a pure compiler hint intended to reduce call overhead in QR code detection.
Changed components
components/esp32-quirc/lib/identify.cInspect captured patch +3 / −2
diff --git a/components/esp32-quirc/lib/identify.c b/components/esp32-quirc/lib/identify.c
index 8f2b027..f9e18d9 100644
--- a/components/esp32-quirc/lib/identify.c
+++ b/components/esp32-quirc/lib/identify.c
@@ -97,8 +97,9 @@ static void perspective_setup(float *c,
hden;
}
-static void perspective_map(const float *c,
- float u, float v, struct quirc_point *ret)
+__attribute__ ((always_inline))
+static inline void perspective_map(const float *c,
+ float u, float v, struct quirc_point *ret)
{
float den = (float)1 / (c[6] * u + c[7] * v + (float)1.0);
float x = (c[0] * u + c[1] * v + c[2]) * den;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.