interpolate two angles

Blitz3D Forums/Blitz3D Programming/interpolate two angles

Yes, it's got to do with that. I am trying to write a miniDV 4:2:0 Chroma resampler, this video format stores lumin info for every pixel, but chroma info only for every fourth pixel, 3 of four pixels are interpolated (well, their hue and saturation) and my plan was to resample them and interpolate them in a more intelligent way, so chroma-keying with miniDV Movies wont be such a nightmare any longer.

So I had to find the middle value of 4 Hue "angles". (As a first step I need to find the 2*2 fields true color by simulating the orinigal interpolation and comparing my result to the original frame). BTW, I DO need to work with 360 degrees, contrairy to what I sad before, but basicly this doesn't matter.

Now I used to mix hue0 and hue2 parallely to hue1 and hue3, and then mix these 2 results.
Please can you add your version of RGB to HSL to my Archive entry? Probably something's wrong with my version since I used to convert it from a javascript example, and I had to swap several variables to make it work - so I am still kind of uncertain if everything is right:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1380