View Full Version : colormatrix question
colinb
10th October 2005, 12:48
Is it only necessary to use colormatrix() if you are calling a color conversion routine in AviSynth?
I'm currently using a script which takes DVD mpeg (via mpeg2source() ), crops and LanczosResize-es it the outputs to the HC encoder. I don't do any ConvertXXX() calls and the whole script stays in YV12 so can I forget about using colormatrix() ?
I guess the resize must have to interpolate the chroma values but can't it do this independently of whatever color matrix the source had.
communist
10th October 2005, 15:34
It is not for colorspace conversions but to 'correct' coefficients - read up here:
http://forum.doom9.org/showthread.php?s=&threadid=82217
colinb
10th October 2005, 18:28
OK, so it would seem that the DVD source will likely be using rec.709 (or one of the "nearly identical" matrices), and HC seems to assume rec.709.
In that case I would conclude that I do NOT need to use colormatrix().
To be absolutely sure I guess I could check the color matrix setting of the DVD source file, and in the unlikely event that it happened to be one of the rec.601 matrices then I would need to use
colormatrix("rec601->rec709")
Wilbert
10th October 2005, 19:22
To be absolutely sure I guess I could check the color matrix setting of the DVD source file, and in the unlikely event that it happened to be one of the rec.601 matrices then I would need to use
colormatrix("rec601->rec709")
Yes, and that can be checked with:
Mpeg2source("F:\TestStreams\avs\AguileraGrammies.d2v", info=1)
Boulder
11th October 2005, 07:24
And you could also use ColorMatrix(mode="rec.601->rec.709",d2v="path\clip.d2v") if you use an encoder which assumes rec.709 coeffs. The d2v parameter should point to the project file you load with MPEG2Source. In this way ColorMatrix is automatically applied if needed, if not, it only calls Limiter().
danpos
12th October 2005, 02:27
@Wilbert
I've readed the documentation out and I would like a additional clarification: My "The Day After Tomorrow" - R4 DVD presents SMPTE 170M colorimetry (DGIndex/DGDecode 1.4.5) and as I've understood:
1 - If I use CCE as encoder, I should use the line
colormatrix("Rec.601->Rec.709")
to provide the corrects coefficients to CCE. But
2 - If I use a libavcodec based encoder as AQE (AutoQmatEnc by SAPSTAR),
I shouldn't any colormatrix() statement in AVS script ?
TIA,
Boulder
12th October 2005, 13:19
Check the coefficients of a file you have encoded with a libavcodec based encoder with DGIndex. If it's the same as with CCE, you need the line there. Alternatively, use the d2v file as a reference to ColorMatrix as I wrote earlier.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.