View Full Version : Checker3D filter?
CraziFuzzy
16th February 2013, 09:08
I don't know if I'm getting in over my head, or if it would even be worth me trying vice just requesting someone more experienced whipping it up, but I'm looking to build a Checkerboard combining filter to be used with wobulated DLP television displays. Basically, every other pixel in a 1 pixel checkerboard is displayed separately. So, this filter would require having two video inputs, and outputing a single video (much like the StackHorizontal and StackVerticle filters - though the output would be the same size as the input.
So, if given the following input:
XXXXXXXXXXXX
XXXXXXXXXXXX
XXXXXXXXXXXX
XXXXXXXXXXXX
XXXXXXXXXXXX
and
OOOOOOOOOOOO
OOOOOOOOOOOO
OOOOOOOOOOOO
OOOOOOOOOOOO
OOOOOOOOOOOO
it would return:
XOXOXOXOXOXO
OXOXOXOXOXOX
XOXOXOXOXOXO
OXOXOXOXOXOX
XOXOXOXOXOXO
I'm not sure on the best way to accomplish this, and frankly, am WAY novice with C++. I was hoping for a way to tweak the Stack filters to work, but they seem to work in whole blocks at a time, and not a per-pixel basis, so it's not as easy as i had hoped.
Any help/guidance would be appreciated.
IanB
16th February 2013, 22:45
You will need the latest 2.6 Alpha 4 :-...Source("one")
SeparateRows(2)
E1=SelectEven() # Rows 1.0, 1.2, 1.4 ,...
O1=SelectOdd() # Rows 1.1, 1.3, 1.5, ...
...Source("two")
SeparateRows(2)
E2=SelectEven() # Rows 2.0, 2.2, 2.4 ,...
O2=SelectOdd() # Rows 2.1, 2.3, 2.5, ...
E=Interleave(E1, E2).WeaveColumns(2) # 1.0.0, 2.0.0, 1.0.1, ..., 1.2.0, 2.2.0, 1.2.1, ...
O=Interleave(O2, O1).WeaveColumns(2) # 2.1.0, 1.1.0, 2.1.1, ..., 2.3.0, 1.3.0, 2.3.1, ...
Interleave(E, O)
WeaveRows(2) # 1.0.0, 2.0.0, 1.0.1, ..., 2.1.0, 1.1,0 2.1.1, ...
CraziFuzzy
19th February 2013, 05:57
Wow, that is a LOT of memory manipulation going on. That's why i was hoping to build this otherwise simple process in a filter to do it in one shot.
Also, unfortunately, I don't think this will work for me anyways at this point. Part of the reason for wanting to build this was as an enhancement to SVP, by allowing smoothvideo processing out to 120Hz on my display - however, SVP only works with AVISynth 2.5.8 I believe, and throws an error if using 2.6 Alpha-4. (Well, it MIGHT work with SEt's 2.6 MT build, but I believe that is currently at 2.6 Alpha-3, which doesn't have the weave filters).
scharfis_brain
19th February 2013, 10:37
Just create one checkerboard stillimage.
Afterwards use masktools, overlay, or layer to combine both Images.
CraziFuzzy
19th February 2013, 15:45
Just create one checkerboard stillimage.
Afterwards use masktools, overlay, or layer to combine both Images.
I've tried that, and the performance was terrible.
IanB
19th February 2013, 21:41
Wow, that is a LOT of memory manipulation going on. That's why i was hoping to build this otherwise simple process in a filter to do it in one shot.Not so. The SeparateRows, SelectEven, SelectOdd and Interleave are all zero cost filters, they just organise respective pointers into the right sequence. The two WeaveColumns do the actual pick and place of the alternating pixels from the 2 clips. The WeaveRows blits the odd and even rows back into the final output. A custom filter could do the pick and place in a single pass avoiding the output blits but these are fast compared to the pick and place.
... - however, SVP only works with AVISynth 2.5.8 I believe, and throws an error if using 2.6 Alpha-4. ...All 2.5 filters are supposed to work transparently with 2.5 colour spaces under 2.6. This is by design! If they do not, then it is a bug and you should be properly reporting it, with the full exact error text, a copy of the simplest script that can show the problem, a list of any relevant plugins, with their version and the url of where you actually downloaded them from and explicit instruction on how to reproduce the problem.
Chikuzen
20th February 2013, 00:15
http://www.mediafire.com/download.php?ewq8rc0aprzmk8r
It seems that it was good for practice of SSE2.
CraziFuzzy
20th February 2013, 01:44
Not so. The SeparateRows, SelectEven, SelectOdd and Interleave are all zero cost filters, they just organise respective pointers into the right sequence. The two WeaveColumns do the actual pick and place of the alternating pixels from the 2 clips. The WeaveRows blits the odd and even rows back into the final output. A custom filter could do the pick and place in a single pass avoiding the output blits but these are fast compared to the pick and place.
All 2.5 filters are supposed to work transparently with 2.5 colour spaces under 2.6. This is by design! If they do not, then it is a bug and you should be properly reporting it, with the full exact error text, a copy of the simplest script that can show the problem, a list of any relevant plugins, with their version and the url of where you actually downloaded them from and explicit instruction on how to reproduce the problem.
SVP (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDYQFjAA&url=http%3A%2F%2Fwww.svp-team.com%2F&ei=ShwkUailG-rhiwLfvIG4Cw&usg=AFQjCNFnRWjVGck1Bg5x0GzhwJZ4I0ir5g&sig2=b8bedlMdJlic3VxFAMFy3Q&bvm=bv.42661473,d.cGE) pretty much depends on MT capabilities, which is why it hasn't moved to 2.6 beta-4 yet.
IanB
20th February 2013, 02:43
SVP (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDYQFjAA&url=http%3A%2F%2Fwww.svp-team.com%2F&ei=ShwkUailG-rhiwLfvIG4Cw&usg=AFQjCNFnRWjVGck1Bg5x0GzhwJZ4I0ir5g&sig2=b8bedlMdJlic3VxFAMFy3Q&bvm=bv.42661473,d.cGE) pretty much depends on MT capabilities, which is why it hasn't moved to 2.6 beta-4 yet.
You are misinformed or confused, SVP are a set of standard 2.5 plugins. If you use scripts with SetMT or GetMT calls then of course they will not load, but the rest of the script is expected to behave identically. Of course you could make an .AVSI to provide dummy versions of the calls to achieve script transparency.
CraziFuzzy
27th February 2013, 05:46
You are misinformed or confused, SVP are a set of standard 2.5 plugins. If you use scripts with SetMT or GetMT calls then of course they will not load, but the rest of the script is expected to behave identically. Of course you could make an .AVSI to provide dummy versions of the calls to achieve script transparency.
Sorry, i guess to clarify - SVP seems to require MT functionality to perform to acceptable performance levels.
IanB
27th February 2013, 22:38
Okay, you were asserting SVP "failed" without MT, this is clearly not true.
What you obviously meant was that your personal SVP scripts are slow and using MT makes them a bit faster.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.