View Single Post
Old 20th September 2007, 13:44   #11  |  Link
yesgrey
Registered User
 
Join Date: Sep 2004
Posts: 1,295
Quote:
Originally Posted by IanB View Post
And yes the engine is (Planar YV24) <-> (Interleaved RGB32) and as the code stands matrices A and C are mutually exclusive, i.e. you can only have one or the other.
Yes, I looked at the code and noticed it. It makes sense, because you only need one at a time for the (Planar YV24) <-> (Interleaved RGB32) conversions.

Quote:
Originally Posted by IanB View Post
With a small amount of hacking (Interleaved RGB32) <-> (Interleaved RGB32) would be possible.
If you want, you could do it, but it's not necessary for what I am thinking. I only want to correct the RGB for a new RGB with a different set of primaries, and for that is enough multiplying RGB by a 3x3 matrix (colorFAQ n.20). With the current engine is already possible, i only need to pass the A and B matrices. See the example:
YUV->RGB
D = B * (S + A)
RGB->RGBdisplay
Ddisplay = T * D <=>
Ddisplay = T * B * (S + A) <=>
Ddisplay = (T * B) * (S + A)


Matrix A is the same in both situations. For calculating the matrix B in the second situation is just multiplying T and B matrices.

As you could see from above, is not necessary hacking the code for considering A and C matrices simultaneously. It's enough specifying the 12 values from A and B.

Unfortunatelly I am not very skilled at c++, I only know c, so I could not offer me to do it. Currently I am "hacking" the code simply by changing the B coefficients hardcoded with the ones I am calculating, but this is not a very friendly solution, because I need to build a custom avisynth.dll file for each combination I need, and changing between them accordingly... but it will works until somebody is able to do it. By the way, I have installed Avisynth 2.5.7 and then switch the avisynth.dll with the ones I am building. Is this the right way of doing it?

The RFE was added to your SourceForge site for Avisynth2.

Thank you very much.

Best Regards

Last edited by yesgrey; 20th September 2007 at 16:21.
yesgrey is offline   Reply With Quote