Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVX2 Resize assertion #257

Closed
sbudenkov opened this issue Jul 18, 2023 · 1 comment
Closed

AVX2 Resize assertion #257

sbudenkov opened this issue Jul 18, 2023 · 1 comment

Comments

@sbudenkov
Copy link

sbudenkov commented Jul 18, 2023

Hi,

We are observing the following issue.
If create a resizer using bilinear algorithm but for an image where height is 1 an assertion will be raised.
https://github.com/ermig1979/Simd/blob/master/src/Simd/SimdAvx2Resizer.cpp#L38

namespace Simd
{
#ifdef SIMD_AVX2_ENABLE 
    namespace Avx2
    {
        void * ResizerInit(size_t srcX, size_t srcY, size_t dstX, size_t dstY, size_t channels, SimdResizeChannelType type, SimdResizeMethodType **method**)
        {
            ResParam param(srcX, srcY, dstX, dstY, channels, type, method, sizeof(__m256i));
            **if (param.IsNearest() && dstX >= F)**
                return new ResizerNearest(param);

Nearest Neighbor algorithm will be selected but the method is bilinear was set by user and saved into param structure.

After that an assertion will be raised:

@ermig1979
Copy link
Owner

Thank for bug report! I fixed this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants