1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2021-11-20 04:42:58 +00:00
10 changed files with 2642 additions and 14 deletions
+4 -5
View File
@@ -955,12 +955,11 @@ struct HLS2RGB_f
float p1 = 2*l - p2;
h *= hscale;
if( h < 0 )
do h += 6; while( h < 0 );
else if( h >= 6 )
do h -= 6; while( h >= 6 );
// We need both loops to clamp (e.g. for h == -1e-40).
while( h < 0 ) h += 6;
while( h >= 6 ) h -= 6;
assert( 0 <= h && h < 6 );
CV_DbgAssert( 0 <= h && h < 6 );
sector = cvFloor(h);
h -= sector;