Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more i16 and u16 operations #33

Open
lovasoa opened this issue Jun 15, 2020 · 3 comments
Open

more i16 and u16 operations #33

lovasoa opened this issue Jun 15, 2020 · 3 comments

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Jun 15, 2020

Hello,
I was hoping I could use this crate for image-rs/jpeg-decoder#146 , but it would require several functions that are not implemented:

  • cast from i16 to i32
  • cast from u16 to i32
  • load i16
  • load u16
@lovasoa lovasoa changed the title cast i16 -> i32 cast more i16 and u16 operations Jun 15, 2020
@jackmott
Copy link
Collaborator

On the unsigned 16s, do you need all the add/sub etc functions for those too? There isn't any u16 stuff at the moment.

@jackmott
Copy link
Collaborator

I've added the load i16, the cast I need to do some research on how to do it in sse2 efficiently. PRs welcome by the way if you want to add these yourself. I can help you get started if you don't know where to begin.

@lovasoa
Copy link
Contributor Author

lovasoa commented Jun 18, 2020

Thanks for implementing load_i16 !
The code I'm working on (JPEG IDCT) just loads i16 and u16, then casts them to i32, then performs arithmetic, so it doesn't need any operation on i16 and u16...

Yes, I realized there aren't any u16 function at the moment after I created the issue. It's too bad because the JPEG quantization table is made of u16s...

I may try to open a PR if I find the time (and the motivation 😬 ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants