Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd September 2009, 18:42   #581  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
if a conversion from 601 to 709 has been done. can it be reversed by just calling colormatrix again and changing the destination to 601? I realize it would just be best to go back and not do the conversion in the first place.
Sure. Use mode="Rec.709->Rec.601".
Wilbert is offline   Reply With Quote
Old 8th October 2009, 13:06   #582  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477


Code:
ColorMatrix(mode="Rec.601->Rec.709")


why would it change the levels
leeperry is offline   Reply With Quote
Old 8th October 2009, 23:42   #583  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Hi. I'd like to ask something about colormatrix...

Here is info from DGIndex about my DVD.
Here is a screenshot, taken in VirtualDub using avisynth script with only one line in it: Mpeg2source("VTS_01_1.d2v")
Here is a screenshot of the same frame, but taken with following script: Mpeg2source("VTS_01_1.d2v",info=3).Colormatrix(hints=true,interlaced=true)
It looks like screenshots are the same, but here is what I see after overlaying them using "difference" and boosting levels.

I expected to see no difference at all or to see much more difference... So all is fine here, this is how it should be? Am I doing something wrong?
Keiyakusha is offline   Reply With Quote
Old 9th October 2009, 01:32   #584  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
After reading many nice posts by manono in this thread, I think maybe the difference on my screens appears because of clamping some levels after applying colormatrix. Indeed such things shouldn't be done 'behind the back'.

Last edited by Keiyakusha; 9th October 2009 at 01:46.
Keiyakusha is offline   Reply With Quote
Old 11th October 2009, 17:48   #585  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
indeed, RTFM helped me a lot too

Code:
ColorMatrix(mode="Rec.601->Rec.709",clamp=0,opt=0)
leeperry is offline   Reply With Quote
Old 30th October 2009, 02:11   #586  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
XhmikosR has been kind enough to compile an ICL11/SSE3 version of ColorMatrix, on the aforementioned call(on 4 threads w/ a 3.2Ghz Q6600) I get a 3% speed improvement(going from 593 to 609 fps): http://www.mediafire.com/?n2gumty1zyn
leeperry is offline   Reply With Quote
Old 30th October 2009, 02:25   #587  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by leeperry View Post
XhmikosR has been kind enough to compile an ICL11/SSE3 version of ColorMatrix, on the aforementioned call(on 4 threads w/ a 3.2Ghz Q6600) I get a 3% speed improvement(going from 593 to 609 fps): http://www.mediafire.com/?n2gumty1zyn
Thanks
Keiyakusha is offline   Reply With Quote
Old 30th October 2009, 13:49   #588  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
XhmikosR has been kind enough to compile an ICL11/SSE3 version of ColorMatrix, on the aforementioned call(on 4 threads w/ a 3.2Ghz Q6600) I get a 3% speed improvement(going from 593 to 609 fps): http://www.mediafire.com/?n2gumty1zyn
Please, include the source. Thanks.
Wilbert is offline   Reply With Quote
Old 30th October 2009, 13:51   #589  |  Link
XhmikosR
Registered User
 
Join Date: Mar 2007
Location: Hellas (Greece)
Posts: 543
So you need the ICL project files? Because that's the only thing that's different and that I changed the File Info to distinguish it from the normal build.
Anyway, here is the package with the source included.
__________________
My Specs

Last edited by XhmikosR; 3rd November 2009 at 22:25.
XhmikosR is offline   Reply With Quote
Old 12th December 2009, 16:32   #590  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
Feature request: 64 bit version

Thanks for your great tool. I use it all the time.

I was wondering if it would be feasible to prepare a 64-bit version. I have been looking at squid_80's 64 bit version of AVISynth and related 64-bit plugins that he has prepared, and he has everything I use in AVISynth ready in 64-bit except ColorMatrix.

I have no idea what that would imply, but if it is something feasible it would be great! Thanks again.
JoeH is offline   Reply With Quote
Old 25th December 2009, 22:44   #591  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
hi tritical, I was wondering if you had any idea about this: http://forum.doom9.org/showpost.php?...postcount=1751

problem of chroma alignment possibly? any idea how to get the same exact output as ffdshow please?

leeperry is offline   Reply With Quote
Old 26th December 2009, 14:40   #592  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by leeperry View Post
any idea how to get the same exact output as ffdshow please?
When you use t3dlut, the conversion between BT.601 and BT.709 coefficients is performed like this:
1) up-sample chroma from 4:2:0 or 4:2:2 to 4:4:4
2) convert BT.601 -> BT.709
3) sub-sample chroma from 4:4:4 to 4:2:0 or 4:2:2
I'm not sure about Colormatrix, but I think it will work similarly...
When you use ffdshow it's a different thing, because you are not converting YV12->YV12 or YUY2->YUY2, you are converting YV12->RGB32, and in this kind of conversion, you don't need to downsample the chroma at the end.

Summing up, you only could be able to get the same output as ffdshow if you use it like ffdshow. With t3dlut, you should set it for YV12->RGB32, and not for YV12->YV12 as you are performing in your examples. With Colormatrix, that's not possible, because it only performs conversions between YV12/YUY2->YV12/YUY2.

Last edited by yesgrey; 26th December 2009 at 15:08.
yesgrey is offline   Reply With Quote
Old 26th December 2009, 14:46   #593  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
ok, but we had the same problem when I wanted to get the same output from your LUT as I was getting from the PS script...and at some point, we did! you told me there was some hiccup in the LUT code and made a bugfix

I'll try to fix the 601>709 LUT conversion .ini file, and hopefully I'll have more details about what's "broken" to give to tritical.
leeperry is offline   Reply With Quote
Old 26th December 2009, 15:08   #594  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by leeperry View Post
hopefully I'll have more details about what's "broken" to give to tritical.
I don't think there's anything that tritical could "fix".
From what I understand, the difference between Colormatrix and t3dlut is that the later let's the user define which chroma placement to consider, while the former always assume it internally.
I believe the problem is due to the last step of chroma sub-sampling, so I don't think it could be fixed, because there is nothing to fix...
yesgrey is offline   Reply With Quote
Old 26th December 2009, 15:16   #595  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
well, maybe he could allow to choose the chroma alignment?
leeperry is offline   Reply With Quote
Old 26th December 2009, 17:02   #596  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by leeperry View Post
well, maybe he could allow to choose the chroma alignment?
First, try with t3dlut chroma alignment options. If it doesn't solve the problem, adding the chroma alignment to Colormatrix will not help also...
yesgrey is offline   Reply With Quote
Old 28th December 2009, 18:34   #597  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Quote:
Originally Posted by yesgrey3 View Post
First, try with t3dlut chroma alignment options. If it doesn't solve the problem, adding the chroma alignment to Colormatrix will not help also...
I've just tried all the possible settings in t3dlut/yv12toyuy2 and yuy2toyv12...what works the best is t3dlut(cplaceU=1) + yv12toyuy2(itype=0):



but if you compare to these, ffdshow still looks slightly better IMHO: http://forum.doom9.org/showpost.php?...postcount=1751

still would be pretty cool if tritical could allow to change the chroma placement in ColorMatrix()

Last edited by leeperry; 28th December 2009 at 18:51.
leeperry is offline   Reply With Quote
Old 28th December 2009, 20:35   #598  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
To match ffdshow you probably need to set itypeU=1 in t3dlut. Since by default t3dlut uses cubic interpolation for 4:2:2->4:4:4, which utilizes 4 pixels, so the end points of the kernel will still be spanning those color blocks. Anyways, I think basing what looks best on that one image is not a good idea. It contains big blocks of color with hard transitions and mpeg1 chroma placement... so of course duplication and mpeg1 chroma placement assumption in t3dlut/yv12toyuy2 will look best on it. However, I could easily generate an image where that combination will look much worse than cubic interpolation with mpeg2 chroma placement assumed. Anyways, with respect to colormatrix there is nothing to change in regards to chroma alignment since it does not upsample. It converts directly YUV->YUV, to get the UV values for computing the new Y samples it uses nearest neighbor. That is, in YV12 each set of 4 luma pixels ((x,y)(x+1,y)(x,y+1)(x+1,y+1)) uses the U and V pixels at (x>>1,y>>1) in the U and V plane respectively.
tritical is offline   Reply With Quote
Old 28th December 2009, 20:38   #599  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
ok, thanks for the feedback tritical...if you say that this doesn't matter(even on a wide projection screen), I wholeheartly believe you
leeperry is offline   Reply With Quote
Old 12th October 2010, 00:20   #600  |  Link
Shinji-kun
Registered User
 
Join Date: Aug 2010
Posts: 82
I encoded an MPEG-2 file to MPEG-4 AVC (x264). Would colormatrix be necessary in this situation. The brightness does seem a little off.
Shinji-kun is offline   Reply With Quote
Reply

Tags
colormatrix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.