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. |
6th January 2005, 21:05 | #22 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
IanB : Impressive ! the changes you made in the cache seems to work : the script i PMed you some times ago is now functionning as expected The speed gain on this particular script is awesome ( from 6 fps to 14 fps )
|
7th January 2005, 10:41 | #23 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
IanB, I have a question about something in cache.cpp... this might be dumb so bear with me, but I'm wondering about what is happening. This code inside Cache::GetFrame, for the h_policy == CACHE_NOTHING handling:
Code:
if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward. __asm mov ebx,ebx // Hack! prevent compiler from trusting ebx contents across call PVideoFrame result = childGetFrame(n, env); if (result->vfb) env->ManageCache(MC_ReturnVideoFrameBuffer, result->vfb); return result; } mpeg2source() tfm() tfmpp() tdecimate() while allowing tfm/tfmpp/tdecimate to default to CACHE_ALL, and that one works perfectly. However if I add in a filter that uses CACHE_NOTHING like this: mpeg2source() tfm() tfmpp() avstimer() <= uses CACHE_NOTHING tdecimate() now the caches before tdecimate and tfmpp only store 2 frames in their lists which results in an awful lot of the getframe calls from tdecimate needing frames to be redone from tfm on up. If I comment out that line from above, or set tfm/tfmpp/tdecimate to use a CACHE_RANGE policy then everything works fine. |
7th January 2005, 11:33 | #24 | Link | ||
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
Quote:
i get a 1k tone going between left and centre of the stereo field every second or so. that what you're expecting? there's no (audible) distortions in the tone, so i'm going to assume the conversions all maintain their integrity. [edit] Quote:
__________________
sucking the life out of your videos since 2004 Last edited by Mug Funky; 7th January 2005 at 11:39. |
||
7th January 2005, 23:42 | #25 | Link | |
Alias fragger
Join Date: Jul 2003
Location: the Netherlands
Posts: 863
|
Quote:
On my 3Dnow! capable athlon, the script results in clipping, just as I suppose it should. I loaded the script in vdub and saved a short .wav, which I loaded in audacity. Here is a screendump from a zoomed-in sinus. [edit]sinus.. er... sine Last edited by Arachnotron; 8th January 2005 at 22:45. |
|
8th January 2005, 08:57 | #26 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
ah! yours is doing the right thing then. mine's flipping the positive clips to the negative side. as you can imagine it sounds pretty bad
__________________
sucking the life out of your videos since 2004 |
9th January 2005, 18:09 | #27 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
I guess I'm not the only one here that doesn't really understand it fully, and I guess a reduction of unneeded caching of frames that don't need to be cached can only be beneficial, performance-wise. np: Panasonic - Rutina (Kulma) |
|
10th January 2005, 13:23 | #28 | Link | ||
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@Arachnotron, @Mug Funky,
Thanks guys for the tests (and the screen grab). It's a relief knowing I didn't stuff up the 3DNow code. Not being able to test code paths is a real downer. @Manao, Nice to know it make some difference. Your original case was caused by exceeeeedingly long cache chains all pointing at a small number of valid, inuse, VFB's. @Leak, Yeah I probably will knock up some info when I get all the bits and pieces integrated. I'm also trying to force myself to write lots of comments in the source. Quote:
Code:
mpeg2source() -> cache <= CACHE_ALL tfm() -> cache <= uses CACHE_NOTHING avstimer() -> cache <= CACHE_ALL (maybe absent) tfmpp() -> cache <= uses CACHE_NOTHING avstimer() -> cache <= CACHE_ALL (maybe absent) tdecimate() -> cache <= CACHE_ALL Quote:
Avstimer() is a special case, Crop(), etc, are all in the same boat, in that they pass VFB's straight thru unmodified. By telling the cache below it CACHE_NOTHING, that cache dutifully returns all the associated VFB's to the tail of the queue for early reuse. Now when the cache above gets that same PFrame, it's VFB it has already been returned, and will get reused pdq. I think I will be taking that out in the next cut, I need to design a definative way to know a VFB is really unloved before I return it. CACHE_RANGE is a lot more aggressive with it's VFB members, it actually bump's their use count while they are in scope, this has 2 effects. a) the VFB can't be stolen, b) all calls to MakeWritable() return a copy (and cost a blit). I tried this logic generally and it can cause severe memory shortage. 640x480 YUY2 VFB's are 600kb each, locking 7 buffers (radius 3) is 4.2Mb per cache instance, 24 cache instances (effectively script lines) and there's 100Mb. And the performance is not as good when strange things are not happening. IanB Last edited by IanB; 10th January 2005 at 13:29. |
||
11th January 2005, 23:33 | #29 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
restore24 is not working anymore correctly with AVS 2.5.6 beta1.
(it produces jerky motion and lets blends sneak thru) but restore24 works very nice using the predecessor, AVS 2.5.6 alpha 19-12-2004 might this be a problem of smartdecimate? smartdecimate prooved being not very stable in past, unfortunately. but sadly this new AVS-version seems to broke everthing. I will test this more tomorrow with some minor complex scripts.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. Last edited by scharfis_brain; 11th January 2005 at 23:35. |
12th January 2005, 08:52 | #30 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Quote:
IanB |
|
12th January 2005, 18:43 | #31 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
I UL'd it here : http://www.saunalahti.fi/sam08/restore24.rar
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
12th January 2005, 19:23 | #32 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
updated package here
http://forum.gleitz.info/attachment....chmentid=70159 I still need to test in a less complex environment. Restore24 is way too complex....
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
17th January 2005, 23:45 | #33 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
I got a report from the german forum that SeparateFields separate the fields of field-based material, although it shoudn't do anything. This is indeed the case with the latest binary. I will look at it.
|
18th January 2005, 03:32 | #34 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
neuron2 and I have been complaining about that inconsistency between SeparateFields() and Weave() for a long time.
Now, should SeparateFields() on a field-separated clip be a no-op, or should it generate an error? (And likewise, should Weave() on a non-field-separated clip be a no-op, or should it be an error?) I'm leaning toward error, especially if you're going to be changing behavior that might affect existing scripts. |
18th January 2005, 10:02 | #35 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Yes, perhaps it's good to give an error. Saying that you should apply AssumeFrameBased before applying SeparateFields to field-based material.
I didn't check Weave. Does it also do something on frame-based material? |
18th January 2005, 10:09 | #36 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Sh0dan drop the test for already IsFieldBased() between revs 1.4 and 1.5 in the old 2.x branch (prior to the big file shuffle)
My vote is for "errors" when it's inconsistant, i.e. can only Weave() something that IsFieldBased()==True, can only SeparateFields() something that IsFrameBased()==True. @Wilbert On IsFrameBased() material :- DoubleWeave() goes thru some motions and produces 1 same frame and 1 field offset frame. Weave() goes thru the same motions as above but appears to do nothing. Remember Weave() is implemented as DoubleWeave().SelectEven() IanB Last edited by IanB; 18th January 2005 at 10:19. |
18th January 2005, 23:44 | #37 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
btw, there's still a bug in DoubleWeave and YV12. |
|
21st January 2005, 09:47 | #38 | Link | ||
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Quote:
Quote:
IanB |
||
26th January 2005, 00:13 | #39 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
About ShowFiveVersions
Code:
AviSource("F:\TestStreams\telecined-clip.avi") # YV12 clip DoubleWeave() a = Pulldown(0,2).Subtitle("0,2") b = Pulldown(1,3).Subtitle("1,3") c = Pulldown(2,4).Subtitle("2,4") d = Pulldown(0,3).Subtitle("0,3") e = Pulldown(1,4).Subtitle("1,4") ShowFiveVersions(a,b,c,d,e) |
26th January 2005, 14:04 | #40 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Wilbert,
Quote:
Q1. Is the output fully black, including the 2 grey corner blocks, or just the 5 frame elements? Q2. Is the subtitle text visible or is that black as well? Q3. Does a SeparateFields() first change the behavior? (Test 1) Q4. Does a convertToRGB32() (or YUY2) at the end change anything? (Test 2, 3) Q5. Does a StackHorizontal(a, b, c) suffer the same fate as the Show5? (Test 4) Q6. Does a YV12 BlankClip() clone behave the same? (Test 5) Q7. What are you displaying this with? What YV12 display codec are you using? Is it Xvid or DivX? What is the final total width? Is it mod 16? Does a Crop help? (Test 5) Code:
AviSource("F:\TestStreams\telecined-clip.avi") # YV12 clip # BlankClip(Last, Pixel_type="YV12", Color=$56789A) # Test 5 # SeparateFields() # Test 1 DoubleWeave() a = Pulldown(0,2).Subtitle("0,2") b = Pulldown(1,3).Subtitle("1,3") c = Pulldown(2,4).Subtitle("2,4") d = Pulldown(0,3).Subtitle("0,3") e = Pulldown(1,4).Subtitle("1,4") ShowFiveVersions(a,b,c,d,e) # ConvertToRGB32() # Test 2 # ConvertToYUY2() # Test 3 # StackHorizontal(a, b, c) # Test 4 # Crop(0, 0, 640, 480) # Test 6 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|