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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th January 2014, 05:53   #1  |  Link
lordsmurf
Registered User
 
lordsmurf's Avatar
 
Join Date: Jan 2003
Posts: 120
Avisynth "look back" filter/command?

I want to edit a filter to look at the previous 10 frames (max) only -- not the next ones. The next ones have too much jitter.

It's my belief that such a look-back-only filter would address jitter on "talking heads" type footage.

So far, I've not found what I need.

Any ideas?
__________________
Back in town.
If you want my advice, then find me at the DigitalFAQ forum. Glad to assist.
lordsmurf is offline   Reply With Quote
Old 27th January 2014, 06:24   #2  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Reverse() ?
vampiredom is offline   Reply With Quote
Old 27th January 2014, 15:18   #3  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
>I want to edit a filter to look at the previous 10 frames
What does "look at" mean here?
Get the frame exactly 10 frames previous?
Get an average of the last 10 frames?
Random access to the 10 previous frames?

Here is how I get a delayed version of a clip
Code:
BlankClip(Last).Trim(0, x) + Last
Wrapped in a function, supporting advance or delay:
Code:
#Last=something
delayed1=UUSlip(-1)
delayed10=UUSlip(-10)
return StackVertical(Last, delayed1, delayed10) 

#######################################
### "slip" a clip in time.
##
## @ C - clip to be advanced or delayed 
## @ offset - if positive, clip is advanced;
##            if negative, clip is delayed
## @ P - clip to be used for padding (default = BlankClip) 
##
function UUSlip(clip C, int offset, clip "P")
{
    lenTrim = (offset > 0) ? offset : 0
    lenPad  = (offset < 0) ? -offset : 0

    P = IsClip(P) ? P : BlankClip(C)

    C = (lenPad==0) ? C 
    \ : P.Trim(0, -lenPad) + C

    C = (lenTrim==0) ? C 
    \ : C.Trim(lenTrim, 0) + P.Trim(P.Framecount-lenTrim, -lenTrim) 

    return C
}
raffriff42 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 19:05.


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