- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shouldnt that funciton look like this
voidImageDataRange::SetAsRangeInt(Ipp64smin,Ipp64smax)
{
m_min.v64s=min;
m_max.v64s=max;
if(min<0)
{
m_isSigned=true;
m_bitDepth=::BitDepth64(::Max(-min+1,max)); // was ::Max(-(min+1),max)
}
else
{
m_isSigned=false;
m_bitDepth=::BitDepth64(::Max(min,max));
}
}checking with 8 bit signed range
-128, 127
with previous code it would do ::BitDepth64(127) = 7 (and it needs to be 8)
Max(127,127)
with modified code Max(129,127) -> BitDepth64(129) = 8
Edit:
there is similar "Bug" in SetAsRange32f and SetAsRange64f when caclulating absMax
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page