Skip to content

GAPI Fluid Resize: Fix for 32bit build issue.#21628

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
anna-khakimova:ak/resize_fix_32bit_builds
Feb 17, 2022
Merged

GAPI Fluid Resize: Fix for 32bit build issue.#21628
opencv-pushbot merged 1 commit intoopencv:4.xfrom
anna-khakimova:ak/resize_fix_32bit_builds

Conversation

@anna-khakimova
Copy link
Copy Markdown
Member

@anna-khakimova anna-khakimova commented Feb 16, 2022

Fix for 32bit build issue in the Resize.

Validate:

XCPU_BASELINE:Linux32=SSE4_2
XCPU_BASELINE:Win32=SSE4_2

force_builders=linux,docs,Linux AVX2,Linux32,Win32,Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
Xbuild_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

build_image:Custom=centos:7
buildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

Xbuild_image:Custom=ubuntu-openvino-2021.3.0:20.04
build_image:Custom Win=openvino-2021.4.1
build_image:Custom Mac=openvino-2021.2.0

buildworker:Custom Win=windows-3

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
Xtest_opencl:Custom=OFF
Xtest_bigdata:Custom=1
Xtest_filter:Custom=*

CPU_BASELINE:Custom Win=AVX512_SKX
CPU_BASELINE:Custom=SSE4_2

Copy link
Copy Markdown
Contributor

@sivanov-work sivanov-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for confusion: i had approved PR already, but looks like that CI still failed - it's the reason why i 've revoked my approval.

@anna-khakimova anna-khakimova force-pushed the ak/resize_fix_32bit_builds branch from ddd16d0 to b0ecd1b Compare February 17, 2022 09:21
@anna-khakimova anna-khakimova force-pushed the ak/resize_fix_32bit_builds branch from b0ecd1b to 6b6d89b Compare February 17, 2022 10:14
pix1 = _mm_lddqu_si128(reinterpret_cast<const __m128i*>(&tmp[4 * (chanNum * mapsx[x + 4])]));
#if defined(__i386__) || defined(_M_IX86)
pix2 = _mm_castpd_si128(_mm_load_sd(reinterpret_cast<const double*>(&tmp[4 * (chanNum * (mapsx[x + 4] + 1))])));
#else
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any opencv define in this case?

As example, i've found code in modules\videoio\src\cap_pvapi.cpp

 #if defined(_x64) || defined (__x86_64) || defined (_M_X64)
#define _x64 1
#elif defined(_x86) || defined(__i386) || defined (_M_IX86)
#define _x86 1
#endif

where _x86 as considered as valuable too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such definition.
Defining global variable without CV_ prefix and with _ is dangerous. It should be avoided, especially in public headers.

OpenCV SIMD wrappers uses this:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad example - my fault
i considered _x64 as yet another one MACRO to check in current sequence: didn't focus that it declared as custom new MACRO

Copy link
Copy Markdown
Contributor

@sivanov-work sivanov-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (if tests are passed)

@opencv-pushbot opencv-pushbot merged commit b9e5256 into opencv:4.x Feb 17, 2022
@dreamsoftech
Copy link
Copy Markdown

@anna-khakimova I have a trouble to download opencv install file for windows 32bit.
If you have built it, can you please help me to download it?

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 22, 2022

@dreamsoftech We don't redistribute OpenCV binaries for 32-bit Windows. You have to build OpenCV from sources to get this custom configuration.

@alalek alalek mentioned this pull request Feb 22, 2022
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jul 11, 2025
Due to upstream has fixed the issue [1], revert [3f26c46 opencv:
disable sse4.1 and sse4.2 on x86]

[1] opencv/opencv#21628

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencv 4.5.5 32 bits build fails

5 participants