This is a modified version of DCRAW (ver.8.89/ rev.1.409) to prototype "variance of color differences".  Enhancement and refinement steps are borrowed from "hybrid CFA demosaicking".  Primary goal of this work is to provide an interpolation algorithm superior to AHD in DCRAW's framework.

New options for the modified DCRAW are:
-q 4             => turn on variance of color difference interpolation
-E <num>    => apply edge-sensitive median filters on differential color planes and update interpolated pixels by <num> times "-E <num>" option can be used for any 3-color RGB mosaic patterns.  For example, PPG and AHD interpolators are compatible.

An example is: dcraw_vcd -v -w -q 4 -m 3 -E 1 -T <raw file>