Discussions thread:
http://forum.doom9.org/showthread.php?t=93571
This plugin support YV12 and YUY2 color sprace.
Usage:
AVISource(...)
SeparateFields() #if
content is interlaced
HDRAGC()
Weave() #if content
is interlaced
MOST
IMPORTANT PARAMETERS:
coef_gain (default 1.0) - increase parameter to get brighter
image, decrease to limit auto brightening
coef_sat (1.0) - incerease to bring more saturation
TODO for 2.0 version
- MMX, SSE, SSE2 optimization
Tips:
1. I'd like to have brigther results.
Try increasing coef_gain and/or min_gain
2. Image lacks colours saturation after brightening
Try increasing coef_sat parameter
3. I would like to operate only in luma (without changing chrominance channels)
Set max_sat to 1.0
4. When I set coef_sat lower that 1.0, bright area of image are loosing
saturation
Set min_sat to 1.0 (default value id 0.0)
5. Bright areas of image are too much gained
Try corrector parameter - recommended values are (0.8 - 1.0), the lower value
then less gain is applied to brighter part of image
6. Gained parts have too much noise
Try increasing reducer parameter. Default value is 0.5, max is 2.0
Examples:
- original shoots taken from this site:
http://www.videomax.ru/tests/
Parameters for all sample: min_gain = 3.0, coef_sat = 3.0
1. Simple gain of low-light scene with local saturation enhancement (original /
HDR AGC)


2. Backlight compensation (Original / Normal gain / HDR AGC)



3. Shadow gaining (Original / Normal gain / HDR AGC)



Syntax:
HDRAGC(int avg_lum, float max_gain, float min_gain, float coef_gain, float
max_sat, float min_sat, float coef_sat, int avg_window, int response, int
debug, int mode, int protect, int passes, int shift, bool shadows, int shift_u,
int shift_v, float corrector, float reducer, float black_clip)
Parameter description:
avg_lum [int]
average luminance to which video should be gained (default - 128 )
max_gain [float]
maximum gain value which can't be passed by auto control (default 3.0)
min_gain [float]
minimum gain (default 1.0)
coef_gain [float]
How to change auto calculation of gain. Default is 1.0, if you set 1.5 then if
previously plugin was finding 2.0 gain, now it will 2.5 (1.0 + (2.0 - 1.0) *
coef_gain)
max_sat [float]
maximum gain for saturation (default 9.0, 1.0 means no saturation enhancment,
below 1.0 - desaturation)
min_sat [float]
minimum saturation enhancment (default 0.0)
coef_sat [float]
how saturation control is connected with gain control, sat = (gain - 1.0) *
coef_sat (default 1.0 - means that if pixel is gained by factor 2.0, saturation
is also gained 2.0). When setting coef_sat below 1.0, look also at min_sat
parameter< BR >
mode
[int]
value 0 - algorithm from 0.2 version
value 1 - new algorithm
value 2 - new algorithm with some float precision (default), 30%
slower than mode = 1
protect [int]
value 0 - no protection for highlights
value 1 - protects highlights from blowing
value 2 (default) - plugin automatically choose between 0 (off) and 1
(on)
passes [int]
number of interations for mode 0 (values from 1 to 9, default 4)
black_clip [float]
value in percents, that force to treat first x% darkest pixels as
black pixels (works as auto shift), recommended values 0.0 - 1.0 (default
0.0)
shift [int]
every luminance value x is shifted down by shift (x = x - shift),
helpfull in low-light, some camcorders brighten image by getin black more gray
(default 0)
shift_u, shift_u [int]
parameters for sublte white balance correction, shift_u < 0 - removes
blue tint, shift_u > 0 - removes yellow tint, shift_v < 0 - removes red
tint, shift_v > 0 - removes green tint (default 0)
corrector [float]
default 0.0 - auto correction, recommended values 0.8 - 1.0. The lower value
then less bright parts of image are gained (help for high values of gain)
reducer [float]
default 0.5, values from 0.0 to 2.0. The higher value the more
noise is removed from gained shadows
shadows [bool]
default true - not only gain but also enhance shadows
avg_window [int]
number of frames for averaging gain value (default one second = 25 frames
for PAL, 30 frames for NTSC, etc)
response [int]
how much gain value can differ between frames (default 100%, there is no
pumping effect, so it's needed only in special cases)
debug
[int]
value 1 displays calculated gain value for frame (default 0)
freezer [int]
number of the frame (from 0), that will be taken to calculate all parameters, the
parameters are then constant in time (deafult -1, which means that parameters will
be calculated for every frame)