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

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th November 2003, 00:15   #81  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
I use Microsoft Visual C++ to compile filters.

You probably can compile them with some flavour of MS .net but I've no experience with this (Hopefully someone else can comment)

You can't use any known free compiler, so unfortunately you'll have to fork out some money to start.



regards
Simon
Si is offline   Reply With Quote
Old 26th January 2004, 17:03   #82  |  Link
MrTibs
Registered User
 
Join Date: Jan 2003
Posts: 90
I'm having trouble with this sample code. The code compiles fine but I can't load the finished DLL. So far, it seems to be caused by the avisynth.h file. I'm testing with Avisynth 2.5.0, is that the reason?
I'm using MSVC 5.0.

P.S. Thanks for the excellent example, it has been VERY helpful.
MrTibs is offline   Reply With Quote
Old 26th January 2004, 21:55   #83  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
AFAIK you need MSVC 6 or later to make Avisynth filters

regards
Simon
Si is offline   Reply With Quote
Old 5th February 2004, 04:43   #84  |  Link
MrTibs
Registered User
 
Join Date: Jan 2003
Posts: 90
First I would like to thank everyone who have worked on the SimpleSample. It is helping a lot. However, considering that I don't own MASC 6, would it be possible to have a SimpleSample with the C interface using the YV12 color space?
MrTibs is offline   Reply With Quote
Old 15th February 2004, 07:30   #85  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Hello everyone,
Iīm trying to make my first avisynth filter and I have a big stupid problem.I just canīt figure out how to define a destination frame with 2x the original width and height.I've been looking into many filter sources but, no way I can't understand how the new dimensions are set.
Anybody could help me?
Take note I'm really dumb about coding C++ and using Avisynth code.
Thanks.
morsa is offline   Reply With Quote
Old 15th February 2004, 15:58   #86  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
See if the stuff in this thread helps - if not - come back

http://forum.doom9.org/showthread.ph...435#post392435

regards
Simon
Si is offline   Reply With Quote
Old 18th February 2004, 03:53   #87  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
It seems that vi.width = vi.width*2; vi.height = vi.height*2; isnīt working for me.I canīt get a double size.
In fact I used simplesample as framework and changed silly things but nothing happens.

Last edited by morsa; 18th February 2004 at 04:21.
morsa is offline   Reply With Quote
Old 18th February 2004, 07:15   #88  |  Link
tempetai
Registered User
 
tempetai's Avatar
 
Join Date: Apr 2003
Posts: 49
I believed they are read only properties. Why don't you use

Code:
Simpleresize(vi.width*2,vi.height*2)
tempetai is offline   Reply With Quote
Old 18th February 2004, 08:46   #89  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Weīre not talking about scripting but coding in C++.
By this time I'm trying to make an Scale2x implementation for Avisynth for testing purposes (I'm thinking about coupling it with some kind of pre-prosesing filter or a mixture of algos) but I'm really stuck with this problem.I know it may sound trivial for most people here, but the lack of documentation and full examples is driving me nuts!
Thank you.



P.S: BTW whatīs the use of Subframe??

Last edited by morsa; 18th February 2004 at 12:34.
morsa is offline   Reply With Quote
Old 19th February 2004, 04:08   #90  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Simple Sample

I had used Siwalters simple Sample to develop my transition plugins and am greatful to him. However the example of a square box removes all complexities involved in coding a YV12 frame. I am trying to resize such a frame and find in a hopeless situation as it is becoming more and more approx. Can the YV12 be more lucidly demonstrated
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 20th February 2004, 07:04   #91  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
@vcmohan
What sort of operation do you want an example of ?

regards
Simon
Si is offline   Reply With Quote
Old 20th February 2004, 12:52   #92  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Re: Simple Sample

Quote:
Originally posted by vcmohan
I am trying to resize such a frame and find in a hopeless situation as it is becoming more and more approx.
There is a thread about the topic. YV12 is no different than other colorspaces in regard to resizing.

Quote:
Can the YV12 be more lucidly demonstrated
There is a bunch of stuff about ColorSpaces , Working with images, Data Storage in AviSynth and Planar Image formats at avisynth.org. There is also a wide variety of filters available with source - not to speak of all the internal filters. If you provided a clearer description of your problems it might be easier for us to help you.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 21st February 2004, 03:26   #93  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Quote:
Originally posted by siwalters
What sort of operation do you want an example of ?
Simon [/B]
I do reductions and rotatios. While reducing in x or y axis the adjacent pixels may be from different positions of original, the u and v values which as I understand are one value for two pixels entails re computing the original RGB values and re composing as Y U and V values. This I find as cumbersome, and a tedium of coding. May be I understood wrongly the format.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 21st February 2004, 20:26   #94  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Quote:
This I find as cumbersome, and a tedium of coding
YV12 (and YUY2) aren't as simple and neat as RGB32 for simple pixel manipulation.

The advantage of working in YV12 or YUY2 comes when you just want to manipulate Y values and therefore you don't have to translate from RGB to Y and back again.

If your source is YV12 (e.g MPEG-2) or analog YUY2 capture then your filter can run a lot faster beacuse there are less bytes to process.

Once you start doing manipulation like your's maybe the speed gains are totally offset by the complexity involved.

regards
Simon
Si is offline   Reply With Quote
Old 24th February 2004, 07:23   #95  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
..

Last edited by morsa; 24th February 2004 at 09:21.
morsa is offline   Reply With Quote
Old 25th February 2004, 02:38   #96  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Quote:
Originally posted by morsa
..
Is something missing? There was no text here
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 25th February 2004, 12:38   #97  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Could someone show me what's the way to copy YUY2 U and V planes from a source to a 2X destination frame.I lack the experience, can't find an example that works for my dead brain and I'm going nuts........................HeLp
morsa is offline   Reply With Quote
Old 25th February 2004, 20:26   #98  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
You could have a look at my ShowPixelValues filter (which is basically a type of point resize filter)

the code where I translate YUY2 to YUV is here
Code:
	// Separate Y1 and Y2 values into their own 32bit "pixels"
	// i.e double 16 130 18 131 becomes 16 130 16 131        18 130 18 131
	for (h=0;h < (src_height);h++) {
		for (w = ((src_width>>6)<<2)-4;w>=0;w-=4) {
				
			*(dstp + (w*2) + 7 + (h * dst_pitch)) = *(dstp +w + 3 + (h * dst_pitch));
			*(dstp + (w*2) + 6 + (h * dst_pitch)) = *(dstp  +(w+2) + (h * dst_pitch));
			*(dstp + (w*2) + 5 + (h * dst_pitch)) = *(dstp  +w + 1 + (h * dst_pitch));
			*(dstp + (w*2) + 4 + (h * dst_pitch)) = *(dstp  +(w+2) + (h * dst_pitch));
			*(dstp + (w*2) + 3 + (h * dst_pitch)) = *(dstp  +w + 3 + (h * dst_pitch));
			*(dstp + (w*2) + 2 + (h * dst_pitch)) = *(dstp  +w + (h * dst_pitch));
			*(dstp + (w*2) + 1 + (h * dst_pitch)) = *(dstp  +w + 1 + (h * dst_pitch));
			*(dstp + (w*2) +     (h * dst_pitch)) = *(dstp  + w +     (h * dst_pitch));
	
					
		}
	}
regards
Simon

Last edited by Si; 26th February 2004 at 08:40.
Si is offline   Reply With Quote
Old 26th February 2004, 00:00   #99  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Thanks Simon, really!!!!
Another question, what is >>6 and <<2??
morsa is offline   Reply With Quote
Old 26th February 2004, 08:49   #100  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
>> is the binary shift right operator and << the left one.
So x<<1 == x=x*2 and x>>1 == x=x div 2.
and x<<2 == x=x*4 and x>>2 == x=x div 4 etc.
therefore x>>6 == x=x div 64.


regards
Simon
Si is offline   Reply With Quote
Reply

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 12:18.


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