Log in

View Full Version : DGIndex Bug Report: hints incompatible with top clipping


CarlEdman
26th July 2011, 01:01
I usually begin my avisynth scripts with lines like this:
DGDecode_mpeg2source("{source.d2v}", info=3, idct=4, cpu=3)
ColorMatrix(hints=true,interlaced=true)
Usually this works just fine: DGDecode embeds the hints in the LSBs of the top of picture and ColorMatrix reads them from there.

The problem occurs if the top is cropped by DGIndex (as can be recognized by non-zero values in the Clipping= line in the d2v file).

In that case, the dgdecode only serves the non-cropped part of the video image (as is probably the correct behavior), but ColorMatrix fails when the top is cropped because--I guess without looking at the source--the hints are embedded before the cropping and if the top of the video image is cropped, the hints are gone.

The workaround is to not embed hints (info=0 in DGDecode) and just specify the d2v= option for ColorMatrix. That will work, but is less elegant because it requires you to specify the d2vfile twice and--I believe--does not correctly handle that rare source material which has a change in colorimetry within the stream.

So, if I am right, the bug is that the hints are embedded before dgdecode crops, rather than after. If I am wrong, could somebody explain to me why hints don't work if you crop the top of an image in dgindex?