this post was submitted on 02 Aug 2026
43 points (97.8% liked)

Programming

28071 readers
1088 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] panda_abyss@lemmy.ca 2 points 1 week ago

My idempotent claim was too broad and wrong, up to aliasing that is reversible.

I think I’ve been talking about this differently than you, when you get 8bit into, 255 in/out is correct.

When generating data I do it in the natural [0,1] space, then map to whatever domain I’m quantizing for.

In that case, for N bins you divide by N+1 (and round however you want via correction) so 256. I was probably wrong earlier around this, 256 is correct for quantizing that way.