upvote
It's worth pointing out that the article explicitly calls out your first mixed technique:

> Finally, one should never mix the encode and decode steps of the two quantizers. That’s just broken code. It’s an easy mistake to make, though.

reply
This is what I do for the former:

    floor( nextafter( 256, 255 ) * value )
reply
Oh very nice idea to get rid of the min operator.
reply