started work on making RT not clip the image at intermediate stages
This commit is contained in:
@@ -137,4 +137,20 @@ constexpr std::uint8_t uint16ToUint8Rounded(std::uint16_t i)
|
||||
return ((i + 128) - ((i + 128) >> 8)) >> 8;
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
constexpr bool OOG(const T &val, const T &high=T(MAXVAL))
|
||||
{
|
||||
return (val > high);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void setUnlessOOG(T &out, const T &val)
|
||||
{
|
||||
if (!OOG(out)) {
|
||||
out = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user