Ask Your Question

Revision history [back]

Why isn't saturate_cast supported for 32S?

This note is mentioned in several places throughout the documentation and the code concerning saturation and image arithmetic:

Saturation is not applied when the result is 32-bit integer.

However, I can't find a complete justification for why this is the case. The closest I found was this Git issue. The person who responded mentioned that it's due to performance issues, but didn't provide any specifics. Can anyone here provide any details about why saturation isn't applied to 32S results?

Thanks in advance!