Skip to content

Commit d25293b

Browse files
Fix the build of imgproc using MinGW (variables with the same name as symbols defined in MinGW headers)
1 parent a7cc115 commit d25293b

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

modules/imgproc/src/color_yuv.simd.hpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,16 @@ struct RGB2YCrCb_i<ushort>
347347
sr0 = sr0 - sy0; sr1 = sr1 - sy1;
348348
sb0 = sb0 - sy0; sb1 = sb1 - sy1;
349349

350-
v_int32 scr0, scr1, scb0, scb1;
350+
v_int32 v_scr0, v_scr1, v_scb0, v_scb1;
351351

352-
scr0 = (sr0*vc3 + vdd) >> shift;
353-
scr1 = (sr1*vc3 + vdd) >> shift;
354-
scb0 = (sb0*vc4 + vdd) >> shift;
355-
scb1 = (sb1*vc4 + vdd) >> shift;
352+
v_scr0 = (sr0*vc3 + vdd) >> shift;
353+
v_scr1 = (sr1*vc3 + vdd) >> shift;
354+
v_scb0 = (sb0*vc4 + vdd) >> shift;
355+
v_scb1 = (sb1*vc4 + vdd) >> shift;
356356

357357
// saturate and pack
358-
cr = v_pack_u(scr0, scr1);
359-
cb = v_pack_u(scb0, scb1);
358+
cr = v_pack_u(v_scr0, v_scr1);
359+
cb = v_pack_u(v_scb0, v_scb1);
360360

361361
if(yuvOrder)
362362
{
@@ -781,36 +781,36 @@ struct YCrCb2RGB_i<uchar>
781781
v_int8 scr = v_reinterpret_as_s8(cr);
782782
v_int8 scb = v_reinterpret_as_s8(cb);
783783

784-
v_int16 scr0, scr1, scb0, scb1;
785-
v_expand(scr, scr0, scr1);
786-
v_expand(scb, scb0, scb1);
784+
v_int16 v_scr0, v_scr1, v_scb0, v_scb1;
785+
v_expand(scr, v_scr0, v_scr1);
786+
v_expand(scb, v_scb0, v_scb1);
787787

788788
v_int32 b00, b01, b10, b11;
789789
v_int32 g00, g01, g10, g11;
790790
v_int32 r00, r01, r10, r11;
791791

792-
v_mul_expand(scb0, vc3, b00, b01);
793-
v_mul_expand(scb1, vc3, b10, b11);
792+
v_mul_expand(v_scb0, vc3, b00, b01);
793+
v_mul_expand(v_scb1, vc3, b10, b11);
794794
if(yuvOrder)
795795
{
796796
// if YUV then C3 > 2^15
797797
// so we fix the multiplication
798798
v_int32 cb00, cb01, cb10, cb11;
799-
v_expand(scb0, cb00, cb01);
800-
v_expand(scb1, cb10, cb11);
799+
v_expand(v_scb0, cb00, cb01);
800+
v_expand(v_scb1, cb10, cb11);
801801
b00 += cb00 << 15; b01 += cb01 << 15;
802802
b10 += cb10 << 15; b11 += cb11 << 15;
803803
}
804804

805805
v_int32 t00, t01, t10, t11;
806-
v_mul_expand(scb0, vc2, t00, t01);
807-
v_mul_expand(scb1, vc2, t10, t11);
808-
v_mul_expand(scr0, vc1, g00, g01);
809-
v_mul_expand(scr1, vc1, g10, g11);
806+
v_mul_expand(v_scb0, vc2, t00, t01);
807+
v_mul_expand(v_scb1, vc2, t10, t11);
808+
v_mul_expand(v_scr0, vc1, g00, g01);
809+
v_mul_expand(v_scr1, vc1, g10, g11);
810810
g00 += t00; g01 += t01;
811811
g10 += t10; g11 += t11;
812-
v_mul_expand(scr0, vc0, r00, r01);
813-
v_mul_expand(scr1, vc0, r10, r11);
812+
v_mul_expand(v_scr0, vc0, r00, r01);
813+
v_mul_expand(v_scr1, vc0, r10, r11);
814814

815815
b00 = (b00 + vdescale) >> shift; b01 = (b01 + vdescale) >> shift;
816816
b10 = (b10 + vdescale) >> shift; b11 = (b11 + vdescale) >> shift;

0 commit comments

Comments
 (0)