Selur's Little Message Board

Full Version: AviSynth - RGBAdjust behavior needs corrected
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: OfVCgAo.png]


- R/G/B/A and Offset should allow both positive and negative values from -255.00 to +255.00.

- Gamma is missing. That should appear below Offset as Gamma R/G/B/A, with default values of 1.00 which means leave clip untouched.


http://avisynth.nl/index.php/RGBAdjust


The above link doesn't specify minimum / maximum values for Offset (Bias) or Gamma but all allowed values should be:

R/G/B/A: -255.00 to +255.00

Offset (Bias) R/G/B/A: -255.00 to +255.00

Gamma R/G/B/A: +0.01 to +255.00


(Gamma values of 0.00 or below (negative) will cause an error.)


Inserted script line at defaults should be:

RGBAdjust(1.00,1.00,1.00,1.00,0.00,0.00,0.00,0.00,1.00,1.00,1.00,1.00,analyze=false,dither=false)


I verified via custom script that the above works with expected results and no errors.


Current incorrect behavior is R/G/B/A allows -100.00 to +100.00 (should be -255.00 to +255.00), Offset R/G/B/A allows 0.00 to 255.00 (should be -255.00 to +255.00), and Gamma is missing entirely.
According how I read the documentation you linked to it should be:

r: 0.0 to 255.0
g: 0.0 to 255.0
b: 0.0 to 255.0
a: 0.0 to 1

rb: -255 - 255
gb: -255 - 255
bb: -255 - 255
ab: -255 - 255
(these need to be scaled by bit depth)

rg: 0.01 - ...
gg: 0.01 - ...
bg: 0.01 - ...
ag: 0.01 - ...
(since gamma exponential scaling I'll restrict it to 10)

Cu Selur
You're right... the filter allows negative values for R/G/B/A, but they are the same as setting 0 values.  Tongue (They also crash if values are entered for Offsets.)

As always, thanks for the fast follow up! Wink
Accidentally made a mistake when connecting B and A spin boxes, send you a new link to a dev version which should fix this.

Cu Selur