SSE2 Saturated Arithmetic

I’m writing some audio processing software and I need to know how to do saturated arithmetic with SSE2 double-precision instructions. My values need to be normalized between -1 and 1. Is there a clever way to do this with SSE2 intrinsic or do I need a 2 sets of if/else statements (one for each value)?

Source: c#

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.