Didée
20th February 2025, 23:06
Hey guys, for so many years I've used tweak() every now-and-then to, well, tweak just a little. I've never questioned its operations, just adjusted numbers until "it fits".
Lately during a mixed workflow with Avisynth and another serious image processor, I noticed that something is fishy. Long story short: the "rotation" of the color wheel with tweak(hue=xx.x) seems to be broken. Red is fading away, green gets darker, blue is fading away, red is coming back, ...
Quick impressions of correct-vs-tweak: (in 60° steps)
Base image for color wheel (to use for test script below)
https://t5.pixhost.to/thumbs/3054/569559803_colorwheel2.png (https://pixhost.to/show/3054/569559803_colorwheel2.png) https://t5.pixhost.to/thumbs/3054/569559805_tweak_seems_broken_000.png (https://pixhost.to/show/3054/569559805_tweak_seems_broken_000.png)
https://t5.pixhost.to/thumbs/3054/569559807_tweak_seems_broken_060.png (https://pixhost.to/show/3054/569559807_tweak_seems_broken_060.png) https://t5.pixhost.to/thumbs/3054/569559808_tweak_seems_broken_120.png (https://pixhost.to/show/3054/569559808_tweak_seems_broken_120.png)
https://t5.pixhost.to/thumbs/3054/569559810_tweak_seems_broken_180.png (https://pixhost.to/show/3054/569559810_tweak_seems_broken_180.png) https://t5.pixhost.to/thumbs/3054/569559811_tweak_seems_broken_240.png (https://pixhost.to/show/3054/569559811_tweak_seems_broken_240.png)
https://t5.pixhost.to/thumbs/3054/569559812_tweak_seems_broken_300.png (https://pixhost.to/show/3054/569559812_tweak_seems_broken_300.png) https://t5.pixhost.to/thumbs/3054/569559814_tweak_seems_broken_360.png (https://pixhost.to/show/3054/569559814_tweak_seems_broken_360.png)
Test script used: (needs Fizick's "rotate" plugin)
ImageReader("colorwheel2.png").converttorgb32().trim(0,360) #return(info())
oo=last
converttoyv12(matrix="PC.709")
o=last
check = oo.rotate(angle=0.0,start=0,end=360,endangle=360.0)
\ .subtitle("expected behaviour, simulated by rotate() plugin")
tweek = o.animate(0,360,"Tweak", 0.0,1.0,0.0,1.0,false, 360.0,1.0,0.0,1.0,false)
\ .converttoRGB32(matrix="PC.709")
\ .subtitle("real result of tweak(hue=xx.x) color rotation")
stackhorizontal(check.addborders(0,0,4,0,color=$404040),tweek).showframenumber(x=448,y=500)
#stackvertical(check.addborders(0,0,0,4,color=$404040),tweek) .showframenumber(x=5,y=500)
return(last)
Am I doing something wrong? Am I expecting something wrong? Or is it just that Tweak(hue) is broken? (As of ye old Avisynth 2.6, some guys still might be using it.)
Lately during a mixed workflow with Avisynth and another serious image processor, I noticed that something is fishy. Long story short: the "rotation" of the color wheel with tweak(hue=xx.x) seems to be broken. Red is fading away, green gets darker, blue is fading away, red is coming back, ...
Quick impressions of correct-vs-tweak: (in 60° steps)
Base image for color wheel (to use for test script below)
https://t5.pixhost.to/thumbs/3054/569559803_colorwheel2.png (https://pixhost.to/show/3054/569559803_colorwheel2.png) https://t5.pixhost.to/thumbs/3054/569559805_tweak_seems_broken_000.png (https://pixhost.to/show/3054/569559805_tweak_seems_broken_000.png)
https://t5.pixhost.to/thumbs/3054/569559807_tweak_seems_broken_060.png (https://pixhost.to/show/3054/569559807_tweak_seems_broken_060.png) https://t5.pixhost.to/thumbs/3054/569559808_tweak_seems_broken_120.png (https://pixhost.to/show/3054/569559808_tweak_seems_broken_120.png)
https://t5.pixhost.to/thumbs/3054/569559810_tweak_seems_broken_180.png (https://pixhost.to/show/3054/569559810_tweak_seems_broken_180.png) https://t5.pixhost.to/thumbs/3054/569559811_tweak_seems_broken_240.png (https://pixhost.to/show/3054/569559811_tweak_seems_broken_240.png)
https://t5.pixhost.to/thumbs/3054/569559812_tweak_seems_broken_300.png (https://pixhost.to/show/3054/569559812_tweak_seems_broken_300.png) https://t5.pixhost.to/thumbs/3054/569559814_tweak_seems_broken_360.png (https://pixhost.to/show/3054/569559814_tweak_seems_broken_360.png)
Test script used: (needs Fizick's "rotate" plugin)
ImageReader("colorwheel2.png").converttorgb32().trim(0,360) #return(info())
oo=last
converttoyv12(matrix="PC.709")
o=last
check = oo.rotate(angle=0.0,start=0,end=360,endangle=360.0)
\ .subtitle("expected behaviour, simulated by rotate() plugin")
tweek = o.animate(0,360,"Tweak", 0.0,1.0,0.0,1.0,false, 360.0,1.0,0.0,1.0,false)
\ .converttoRGB32(matrix="PC.709")
\ .subtitle("real result of tweak(hue=xx.x) color rotation")
stackhorizontal(check.addborders(0,0,4,0,color=$404040),tweek).showframenumber(x=448,y=500)
#stackvertical(check.addborders(0,0,0,4,color=$404040),tweek) .showframenumber(x=5,y=500)
return(last)
Am I doing something wrong? Am I expecting something wrong? Or is it just that Tweak(hue) is broken? (As of ye old Avisynth 2.6, some guys still might be using it.)