Thread: Avisynth+
View Single Post
Old 21st August 2019, 16:31   #4826  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
My natural inclination when using up shift would be to fill the 'nullified' least signifcant bits in destination number with the most significant bits from source number.
Code:
eg 8->10 bit,
     7654321076   src bit indexes
     9876543210   dst bit indexes

or eg 8->16
    7654321076543210
    fedcba9876543210    # hexified
But, that aint right, apparently.

EDIT: I think Knuth, TAOCP, Vol 1, Fundamental Algorithms, would suggest same for fast accurate upscale using shift only. [I left my copy on a train many years ago].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 21st August 2019 at 17:04.
StainlessS is offline