Jump to content
  • Advertisement
Sign in to follow this  
gabrielefarina

ARM Neon clamping

This topic is 2554 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,


I just started playing around with ARM NEON, and I'm trying to do some simple image processing with it. I was wondering if someone of you knows a way to perform value clamping using NEON instructions.
This is my situation: I have an int32x4_t variable which stores the ARGB components of a single pixel, and I'd like to clamp each component so that it fits to the 0-255 range.
Is it possible somehow to do this operation in parallel using NEON instructions ?

Gabriele

Share this post


Link to post
Share on other sites
Advertisement

Hi guys,


I just started playing around with ARM NEON, and I'm trying to do some simple image processing with it. I was wondering if someone of you knows a way to perform value clamping using NEON instructions.
This is my situation: I have an int32x4_t variable which stores the ARGB components of a single pixel, and I'd like to clamp each component so that it fits to the 0-255 range.
Is it possible somehow to do this operation in parallel using NEON instructions ?

Gabriele


Hi,

Saturation. A 'Q' instruction in the final stage of calculation,where the wider value is converted to 8-bit. Probably VQSHRUN.

See: Coding for Neon part 4 - Shifting left and right

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!