Using the parameters gamma_u or gamma_v has completely no effect to the clip. This behavior can be reproduced with the submitted script. I use AviSynth 2.5.8 on Windows XP SP3.
Yes there is no code behind these options. It has been discussed previously, see http://forum.doom9.org/showthread.php?t=110439&highlight=gamma_u+gamma_v
So far no one has offered a sensible gamma algorithm to implement. I'll fix the documentation.
Because I’m not happy with the result “wont fix” and after reading the mentioned thread, I’d like to point out some basics to the problem “gamma” here. (largely taken from here: http://farbe.wisotop.de/ueberGamma.shtml\). Sorry for doing this here, but at the forum I’m at first allowed to post in 5 days…
Sorry for my bad English, I’ll try to find the right words.
At first, “gamma” is no mystic thing and no holy cow, it is simply the exponent of a power function, which is used to compensate the nonlinearity between an input and an output signal.
There can be many gammas in a transmission path, which all will be multiplied to get the whole gamma.
Well known is its use to compensate the nonlinearity between the measured brightness of a light source and the watched intensity – compensating the sensitivity of your eyes.
Less known is its use to compensate the nonlinearity of a technical device, such as a monitor or a printer.
The famous gamma=2.2 for a CRT is in fact the product of the Eye’s gamma and the gamma which describes the relationship of the voltage at a color signal pin at the VGA-connector and the measured brightness of the corresponding phosphor at the screen.
Compensating the eye’s sensitivity is impossible in a YUV color space because the eye “thinks” nearly like RGB. For this job, you have the overall gamma in Levels() or the RGB-Gammas.
The only thing gamma_u and gamma_v can be useful for, is to compensate a nonlinearity in a (analogue) transmission system, which transports the channels U and V directly and therefore influences them directly. Directly means, channel U can be influenced without any changes in Y or V. A VHS Recorder is such a system. I need the gamma_u and gamma_v to correct captures from VHS cassette like alemala did.
It would be all the same to me, if I’d know another way to do that, but I don’t know. The trick with VtoY() and so on does not work because Y ranges from 0 to 255, while U and V do from -128 to 127, so that the gamma correction goes wrong.
Dear Ian, please implement the formula mentioned in post #17! It is correct and, yes, it can be named gamma. The only thing that must be kept in mind is, that gamma_u is the gamma for the independent U-channel in the YUV model like gamma_r is for the red one in the RGB model. The fact, that gamma_r represents by value the red component of the overall gamma is only coincidence that depends on the characteristics of the color model RGB.
So, aside from the eye’s sensitivity correction: gamma_r, gamma_g, gamma_b have to be used in a system which transmits RGB channels (e.g. VGA) while gamma_y, gamma_u and gamma_v must be used in an system with YUV channels like analogue TV, VHS and so on. This two sets are completely different in their effect to the clip and there is no way nor any need to transform the one to the other!
Sorry won't fix really means can't fix.
StainlessS wrote a ColourYUV2() plugin which implements rpow_u, rpow_v, spow_u and spow_v options. See http://forum.doom9.org/showthread.php?p=1378126#post1378126 for the start of the discussion.
Post #17 algorithm is the SPOW mode.
Post #9 script is the RPOW mode.
Post #11 is the goal for the elusive correct Gamma_[uv] mode, a better expression of the goal would be to implement fastish
MergeChroma(ConvertToRGB().Levels(0, Gamma, 255, 0, 255).ConvertBackToYUY2())
or more fully the YtoUV(....UtoY8(), ....VtoY8(), Last)
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.