Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 319186 Details for
Bug 427598
[4.5/ICE] media-libs/opencv stereosgbm.cpp: internal compiler error: in build_polynomial_chrec, at tree-chrec.h:143 with -O2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
reduced testcase
bug427598.cpp (text/plain), 3.44 KB, created by
Kacper Kowalik (Xarthisius) (RETIRED)
on 2012-07-25 08:42:39 UTC
(
hide
)
Description:
reduced testcase
Filename:
MIME Type:
Creator:
Kacper Kowalik (Xarthisius) (RETIRED)
Created:
2012-07-25 08:42:39 UTC
Size:
3.44 KB
patch
obsolete
>typedef long unsigned int size_t; >typedef unsigned char uchar; >typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadu_si128 (__m128i const *__P) { > return (__m128i) __builtin_ia32_loaddqu ((char const *)__P); >} >namespace std __attribute__ ((__visibility__ ("default"))) { > template<typename _Tp> inline const _Tp& min(const _Tp& __a, const _Tp& __b) { > if (__b < __a) return __b; > return __a; > } > template<typename _Tp> inline const _Tp& max(const _Tp& __a, const _Tp& __b) { > if (__a < __b) return __b; > //return __a; > } >} >namespace std __attribute__ ((__visibility__ ("default"))) { > class Mat; > bool checkHardwareSupport(int feature); > template<typename _Tp> class Size_ { > public: > _Tp width, height; > }; > typedef Size_<int> Size2i; > typedef Size2i Size; > class _InputArray { > public: > virtual Mat getMat(int i=-1) const; > }; > class _OutputArray : public _InputArray {}; > typedef const _InputArray& InputArray; > typedef const _OutputArray& OutputArray; > class Mat { > public: > int rows, cols; > uchar* data; > }; > class StereoSGBM { > public: > virtual void operator()(InputArray left, InputArray right, OutputArray disp); > int minDisparity; > int numberOfDisparities; > int preFilterCap; > bool fullDP; > Mat buffer; > }; > typedef uchar PixType; > typedef short CostType; > typedef short DispType; > enum {NR = 16, NR2 = NR/2 }; > > static void calcPixelCostBT( const Mat& img1, int y, int minD, int maxD, CostType* cost, > PixType* buffer, const PixType* tab, int tabOfs, int ) { > int x, c, width = img1.cols, cn = 1; > int minX1 = max(maxD, 0), maxX1 = width; > int minX2 = max(minX1 - maxD, 0), maxX2 = min(maxX1 - minD, width); > int D = maxD - minD, width1 = maxX1 - minX1, width2 = maxX2 - minX2; > PixType *prow1 = buffer + width2*2, *prow2 = prow1 + width*cn*2; > volatile bool useSIMD = checkHardwareSupport(3); > for( c = 0; c < cn*2; c++, prow1 += width, prow2 += width ) > { > int diff_scale = c < cn ? 0 : 2; > for( x = minX2; x < maxX2; x++ ) > { > int u = prow1[x]; > int ul = x > 0 ? (u + prow1[x-1])/2 : u; > int ur = x < width-1 ? (u + prow1[x+1])/2 : u; > int u1 = max(ul, ur); > if( useSIMD ) > { > for( int d = minD; d < maxD; d += 16 ) > { > __m128i _v0 = _mm_loadu_si128((const __m128i*)(buffer + width-x-1 + d)); > } > } > else > { > for( int d = minD; d < maxD; d++ ) > { > int v = prow2[width-x-1 + d]; > int v1 = buffer[width-x-1 + d + width2]; > int c0 = max(0, u - v1); > int c1 = max(0, v - u1); > cost[x*D + d] = (CostType)(cost[x*D+d] + (min(c0, c1) >> diff_scale)); > } > } > } > } > } > > static void computeDisparitySGBM( const Mat& img1, const StereoSGBM& params, Mat& buffer ) { > int minD = params.minDisparity, maxD = minD + params.numberOfDisparities; > > PixType clipTab[256]; > CostType* Cbuf; > PixType* tempBuf; > > int y1; > int dy1 = y1 == 0 ? 0 : y1 + 2; > > calcPixelCostBT( img1, dy1, minD, maxD, Cbuf, tempBuf, clipTab, 256*4, 1 ); > } > > void StereoSGBM::operator ()( InputArray _left, InputArray _right, OutputArray _disp ) { > Mat left = _left.getMat(); > computeDisparitySGBM( left, *this, buffer ); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 427598
:
318880
|
318882
|
318884
| 319186 |
319688