| 347 | // Thread-local padded pixel buffer for zero-padding approach. |
| 348 | template <typename RGB_T> |
| 349 | static fl::span<RGB_T> get_padbuf(int minSize) { |
| 350 | fl::vector<RGB_T> &buf = SingletonThreadLocal<fl::vector<RGB_T>>::instance(); |
| 351 | if (static_cast<int>(buf.size()) < minSize) { |
| 352 | buf.resize(minSize); |
| 353 | } |
| 354 | return buf; |
| 355 | } |
| 356 | |
| 357 | // Interior row pixel — fully-unrolled, no bounds checks. |
| 358 | // Also reused for vertical pass via linearized column data. |