Log in

View Full Version : Where should i put colourmatrix ?


madhatter300871
14th June 2011, 21:02
Hi all

Should "colormatrix" conversions be performed before any other filters or should it be performed last. I have been performing this last but have read that it should really be the first filter in the chain.

Any thoughts ?

Thanks.

dragon_warrior
15th June 2011, 01:10
After the source filter

leeperry
15th June 2011, 01:46
Ideally, you want your post-processing to be done on the right colors ASAP. IRL, that might not really make a visible difference though.

madhatter300871
15th June 2011, 12:58
Thanks. If its an interlaced source I would be better separating the fields, doing the colourspace conversion on each field, weaving and then resizing (or whatever post processing I need) ?

Groucho2004
15th June 2011, 13:13
Another thing to consider is that if you are using DGDecode/DGDecodeNV, Colormatrix only picks up the "hints" if it's directly after the source filter.

Lyle_JP
21st June 2011, 00:12
Thanks. If its an interlaced source I would be better separating the fields, doing the colourspace conversion on each field, weaving and then resizing (or whatever post processing I need) ?

Why bother with all that? ColorMatrix can be used on an interlaced source. Just set interlaced=true. Do ColorMatrix right after source call, then do whatever you need to for deinterlacing, or leave it as is if you plan to encode interlaced.

madhatter300871
7th July 2011, 14:24
Great. I ll try it out on an interlaced source .... thanks for the replies.

So, do it straight after the source call and set interlaced=true when needed.

Job done !

mandarinka
7th July 2011, 15:59
Ideally, you want your post-processing to be done on the right colors ASAP. IRL, that might not really make a visible difference though.

Actually, if you have a say bt709 and bt601... both are "right colors" technically, no?

I don't think filters generaly adapt to the colormatrix (for example, judging by resolution). If I use some filtering on SD source that has wrong colormatrix (bt709) and a HD source with right colormatrix (bt709), who can say that the filter did a proper job in the latter case, but a wrong one in the former?

If it was so, it would more or less mean that the filter only supported yuv with a single colormatrix (only bt601 for example), in the first place.

SSH4
15th July 2011, 12:20
Anyway.
I "play" with Mushishi BD and DVD R2 Japan.
And BD colors = DVD colors + ColorMatrix(mode="Rec.601->Rec.709")

Some my friends talking about adding colormatrix conversion only after any resizes but before gradfun or addgrains. Because on some dark scenes early colormatrix can add artifacts.
I think this is possible because colormatrix conversion lossy for color transformation. Some colors can be rounded for nearest values.