@@ -1124,13 +1124,15 @@ static inline uint16_t opencvLittleToHost16(const uchar* p){
1124
1124
#endif
1125
1125
}
1126
1126
1127
+ /*
1127
1128
static inline uint16_t opencvLittleToHost16(uint16_t x){
1128
1129
#if OPENCV_LITTLEENDIAN
1129
1130
return x;
1130
1131
#else
1131
- return opencvLittleToHost16 ((uchar*)&x);
1132
+ return opencvLittleToHost16((const uchar*)&x);
1132
1133
#endif
1133
1134
}
1135
+ */
1134
1136
1135
1137
static inline uint32_t opencvLittleToHost32 (const uchar* p){
1136
1138
#if OPENCV_BYTEORDER==1234
@@ -1156,7 +1158,7 @@ static inline uint32_t opencvLittleToHost32(uint32_t x){
1156
1158
#if OPENCV_LITTLEENDIAN
1157
1159
return x;
1158
1160
#else
1159
- return opencvLittleToHost32 ((uchar*)&x);
1161
+ return opencvLittleToHost32 ((const uchar*)&x);
1160
1162
#endif
1161
1163
}
1162
1164
@@ -1386,7 +1388,7 @@ static inline void ICV_HLINE_2(uchar* ptr, int xl, int xr, const uchar* color)
1386
1388
{
1387
1389
if (is_aligned (((uchar*)(ptr) + (xl)*2 ), 0x2 ))
1388
1390
{
1389
- uint16_t c = opencvLittleToHost16 ((uchar*)( color) );
1391
+ uint16_t c = opencvLittleToHost16 (color);
1390
1392
uint16_t * hline_ptr = (uint16_t *)(ptr) + xl;
1391
1393
uint16_t * hline_max_ptr = (uint16_t *)(ptr) + xr;
1392
1394
for ( ; hline_ptr <= hline_max_ptr; )
@@ -1467,7 +1469,7 @@ static inline void ICV_HLINE_4(uchar* ptr, int xl, int xr, const uchar* color)
1467
1469
{
1468
1470
if (is_aligned (((uchar*)(ptr) + (xl)*4 ), 0x4 ))
1469
1471
{
1470
- uint32_t c = opencvLittleToHost32 ((uchar*)( color) );
1472
+ uint32_t c = opencvLittleToHost32 (color);
1471
1473
uint32_t * hline_ptr = (uint32_t *)(ptr) + xl;
1472
1474
uint32_t * hline_max_ptr = (uint32_t *)(ptr) + xr;
1473
1475
for ( ; hline_ptr <= hline_max_ptr; )
@@ -1560,8 +1562,8 @@ static inline void ICV_HLINE_8(uchar* ptr, int xl, int xr, const uchar* color)
1560
1562
}
1561
1563
else if (is_aligned (((uchar*)(ptr) + (xl)*8 ), 0x4 ))
1562
1564
{
1563
- uint32_t c[2 ] = {opencvLittleToHost32 ((uchar*)( color) +0x00 ),
1564
- opencvLittleToHost32 ((uchar*)( color) +0x04 )};
1565
+ uint32_t c[2 ] = {opencvLittleToHost32 (color+0x00 ),
1566
+ opencvLittleToHost32 (color+0x04 )};
1565
1567
uint32_t * hline_ptr = (uint32_t *)((uchar*)(ptr) + (xl)*(8 ));
1566
1568
uint32_t * hline_max_ptr = (uint32_t *)((uchar*)(ptr) + (xr)*(8 ));
1567
1569
for ( ; hline_ptr <= hline_max_ptr; )
@@ -1577,13 +1579,14 @@ static inline void ICV_HLINE_8(uchar* ptr, int xl, int xr, const uchar* color)
1577
1579
}
1578
1580
// end ICV_HLINE_8()
1579
1581
1582
+ /*
1580
1583
static inline void ICV_HLINE_12(uchar* ptr, int xl, int xr, const uchar* color)
1581
1584
{
1582
1585
if (is_aligned(((uchar*)(ptr) + (xl)*12), 0x4))
1583
1586
{
1584
- uint32_t c[3 ] = {opencvLittleToHost32 ((uchar*)( color) +0x00 ),
1585
- opencvLittleToHost32 ((uchar*)( color) +0x04 ),
1586
- opencvLittleToHost32 ((uchar*)( color) +0x08 )};
1587
+ uint32_t c[3] = {opencvLittleToHost32(color+0x00),
1588
+ opencvLittleToHost32(color+0x04),
1589
+ opencvLittleToHost32(color+0x08)};
1587
1590
uint32_t* hline_ptr = (uint32_t*)((uchar*)(ptr) + (xl)*(12));
1588
1591
uint32_t* hline_max_ptr = (uint32_t*)((uchar*)(ptr) + (xr)*(12));
1589
1592
for( ; hline_ptr <= hline_max_ptr; )
@@ -1616,10 +1619,10 @@ static inline void ICV_HLINE_16(uchar* ptr, int xl, int xr, const uchar* color)
1616
1619
}
1617
1620
else if (is_aligned(((uchar*)(ptr) + (xl)*16), 0x4))
1618
1621
{
1619
- uint32_t c[4 ] = {opencvLittleToHost32 ((uchar*)( color) +0x00 ),
1620
- opencvLittleToHost32 ((uchar*)( color) +0x04 ),
1621
- opencvLittleToHost32 ((uchar*)( color) +0x08 ),
1622
- opencvLittleToHost32 ((uchar*)( color) +0x0C )};
1622
+ uint32_t c[4] = {opencvLittleToHost32(color+0x00),
1623
+ opencvLittleToHost32(color+0x04),
1624
+ opencvLittleToHost32(color+0x08),
1625
+ opencvLittleToHost32(color+0x0C)};
1623
1626
uint32_t* hline_ptr = (uint32_t*)((uchar*)(ptr) + (xl)*(16));
1624
1627
uint32_t* hline_max_ptr = (uint32_t*)((uchar*)(ptr) + (xr)*(16));
1625
1628
for( ; hline_ptr <= hline_max_ptr; )
@@ -1655,12 +1658,12 @@ static inline void ICV_HLINE_24(uchar* ptr, int xl, int xr, const uchar* color)
1655
1658
}
1656
1659
else if (is_aligned(((uchar*)(ptr) + (xl)*24), 0x4))
1657
1660
{
1658
- uint32_t c[6 ] = {opencvLittleToHost32 ((uchar*)( color) +0x00 ),
1659
- opencvLittleToHost32 ((uchar*)( color) +0x04 ),
1660
- opencvLittleToHost32 ((uchar*)( color) +0x08 ),
1661
- opencvLittleToHost32 ((uchar*)( color) +0x0C ),
1662
- opencvLittleToHost32 ((uchar*)( color) +0x10 ),
1663
- opencvLittleToHost32 ((uchar*)( color) +0x14 )};
1661
+ uint32_t c[6] = {opencvLittleToHost32(color+0x00),
1662
+ opencvLittleToHost32(color+0x04),
1663
+ opencvLittleToHost32(color+0x08),
1664
+ opencvLittleToHost32(color+0x0C),
1665
+ opencvLittleToHost32(color+0x10),
1666
+ opencvLittleToHost32(color+0x14)};
1664
1667
uint32_t* hline_ptr = (uint32_t*)((uchar*)(ptr) + (xl)*(24));
1665
1668
uint32_t* hline_max_ptr = (uint32_t*)((uchar*)(ptr) + (xr)*(24));
1666
1669
for( ; hline_ptr <= hline_max_ptr; )
@@ -1700,14 +1703,14 @@ static inline void ICV_HLINE_32(uchar* ptr, int xl, int xr, const uchar* color)
1700
1703
}
1701
1704
else if (is_aligned(((uchar*)(ptr) + (xl)*2324), 0x4))
1702
1705
{
1703
- uint32_t c[8 ] = {opencvLittleToHost32 ((uchar*)( color) +0x00 ),
1704
- opencvLittleToHost32 ((uchar*)( color) +0x04 ),
1705
- opencvLittleToHost32 ((uchar*)( color) +0x08 ),
1706
- opencvLittleToHost32 ((uchar*)( color) +0x0C ),
1707
- opencvLittleToHost32 ((uchar*)( color) +0x10 ),
1708
- opencvLittleToHost32 ((uchar*)( color) +0x14 ),
1709
- opencvLittleToHost32 ((uchar*)( color) +0x18 ),
1710
- opencvLittleToHost32 ((uchar*)( color) +0x1C )};
1706
+ uint32_t c[8] = {opencvLittleToHost32(color+0x00),
1707
+ opencvLittleToHost32(color+0x04),
1708
+ opencvLittleToHost32(color+0x08),
1709
+ opencvLittleToHost32(color+0x0C),
1710
+ opencvLittleToHost32(color+0x10),
1711
+ opencvLittleToHost32(color+0x14),
1712
+ opencvLittleToHost32(color+0x18),
1713
+ opencvLittleToHost32(color+0x1C)};
1711
1714
uint32_t* hline_ptr = (uint32_t*)((uchar*)(ptr) + (xl)*(32));
1712
1715
uint32_t* hline_max_ptr = (uint32_t*)((uchar*)(ptr) + (xr)*(32));
1713
1716
for( ; hline_ptr <= hline_max_ptr; )
@@ -1728,6 +1731,7 @@ static inline void ICV_HLINE_32(uchar* ptr, int xl, int xr, const uchar* color)
1728
1731
}
1729
1732
}
1730
1733
//end ICV_HLINE_32()
1734
+ */
1731
1735
1732
1736
static const bool ICV_HLINE_OPTIMIZATION = true ;
1733
1737
static inline void ICV_HLINE (uchar* ptr, int xl, int xr, const void * color, int pix_size)
0 commit comments