openppl-public / ppl.cv

ppl.cv is a high-performance image processing library of openPPL supporting various platforms.
Apache License 2.0
484 stars 108 forks source link

NEON warpaffine_u8 算子存在内存踩踏。 #87

Closed FanXuZeng closed 2 years ago

FanXuZeng commented 2 years ago

1145 行 for (int32_t i = 0; i < outHeight; i += BLOCK_SIZE) { size_t blockHeight = std::min(BLOCK_SIZE, inHeight - i); for (int32_t j = 0; j < outWidth; j += BLOCK_SIZE) { size_t blockWidth = std::min(BLOCK_SIZE, inWidth - j);

需要改为

    for (int32_t i = 0; i < outHeight; i += BLOCK_SIZE) {
        size_t blockHeight = std::min<size_t>(BLOCK_SIZE, **outHeight** - i);
        for (int32_t j = 0; j < outWidth; j += BLOCK_SIZE) {
            size_t blockWidth = std::min<size_t>(BLOCK_SIZE, **outWidth** - j);