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 Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th February 2013, 09:08   #1  |  Link
CraziFuzzy
Registered User
 
Join Date: Jun 2006
Posts: 11
Checker3D filter?

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:
Code:
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.
CraziFuzzy is offline   Reply With Quote
Old 16th February 2013, 22:45   #2  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
You will need the latest 2.6 Alpha 4 :-
Code:
...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, ...

Last edited by IanB; 16th February 2013 at 22:49.
IanB is offline   Reply With Quote
Old 19th February 2013, 05:57   #3  |  Link
CraziFuzzy
Registered User
 
Join Date: Jun 2006
Posts: 11
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).

Last edited by CraziFuzzy; 19th February 2013 at 06:19.
CraziFuzzy is offline   Reply With Quote
Old 19th February 2013, 10:37   #4  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
Just create one checkerboard stillimage.
Afterwards use masktools, overlay, or layer to combine both Images.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 19th February 2013, 15:45   #5  |  Link
CraziFuzzy
Registered User
 
Join Date: Jun 2006
Posts: 11
Quote:
Originally Posted by scharfis_brain View Post
Just create one checkerboard stillimage.
Afterwards use masktools, overlay, or layer to combine both Images.
I've tried that, and the performance was terrible.
CraziFuzzy is offline   Reply With Quote
Old 19th February 2013, 21:41   #6  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Quote:
Originally Posted by CraziFuzzy View Post
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.

Quote:
... - 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.
IanB is offline   Reply With Quote
Old 20th February 2013, 00:15   #7  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
http://www.mediafire.com/download.php?ewq8rc0aprzmk8r

It seems that it was good for practice of SSE2.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 20th February 2013, 01:44   #8  |  Link
CraziFuzzy
Registered User
 
Join Date: Jun 2006
Posts: 11
Quote:
Originally Posted by IanB View Post
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 pretty much depends on MT capabilities, which is why it hasn't moved to 2.6 beta-4 yet.
CraziFuzzy is offline   Reply With Quote
Old 20th February 2013, 02:43   #9  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Quote:
Originally Posted by CraziFuzzy View Post
SVP 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.
IanB is offline   Reply With Quote
Old 27th February 2013, 05:46   #10  |  Link
CraziFuzzy
Registered User
 
Join Date: Jun 2006
Posts: 11
Quote:
Originally Posted by IanB View Post
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.
CraziFuzzy is offline   Reply With Quote
Old 27th February 2013, 22:38   #11  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
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.
IanB is offline   Reply With Quote
Reply


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 22:31.


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