How to "recursively" affect frames? >>
wr-forum WOW mod

SearchSearch   Users   Registration   Entrance
Today: 15.09.2025 - 10:38:15
Pages:  1  

How to "recursively" affect frames?

AuthorMessage

BGReddy00

user




Statistics:
Messages: 301
Registration: 08.14.2003

I am trying to write a filter for Avisynth that works in the following fashion: Frame 1: Does nothing. Frame 2: Modifies frame 2 based on frame 1. Frame 3: Modifies frame 3 based on the modified frame 2. Frame 4: Modifies frame 4 based on the modified frame 3. etc Obviously for practical operation it would require being run in sequence. How would I do this?

---------------------
Message # 1 12.06.24 - 08:39:12
RE: How to "recursively" affect frames?

BoostedE21

user




Statistics:
Messages: 5,378
Registration: 03.07.2003

Save a copy of the modified previous frame and use it for the next frame, then ditch it.

---------------------
E21 LEGION Crypto success: http://brief.watchersfrontline.com/SHV
Message # 2 12.06.24 - 08:46:06
RE: How to "recursively" affect frames?

99blackbird

user




Statistics:
Messages: 132
Registration: 03.03.2003

Sure, you can do that. The overhead of a malloc is pretty small, though, compared to processing a frame.

---------------------
'97 M3 Coupe JC CAI UUC TSE UUC Clutch Stop Hardwired V-1 B&M SSK 2002 RC51 Yoshimura Exhaust
Message # 3 12.06.24 - 08:51:46
RE: How to "recursively" affect frames?

fredo

user




Statistics:
Messages: 3,230
Registration: 04.30.2001

Another question: why doesn't this work? *PreviousFrame = malloc(src_width*src_height*sizeof(int)); 1>.\Main.cpp(121) : error C2440: '=' : cannot convert from 'void *' to 'int' 1> There is no context in which this conversion is possible I didn't have to do anything when my code was in c, in x264: int *array=x264_malloc(h->param.i_height * h->param.i_width * sizeof(int)); Why won't this work in C++?

---------------------
Fred 330Ci zhp
Message # 4 12.06.24 - 08:58:27
RE: How to "recursively" affect frames?

Lone Star

user




Statistics:
Messages: 55
Registration: 07.10.2001

If you're doing this inside a filter, just use a PVideoFrame variable (that has scope larger than the getframe call) and assign it the frame you want to keep. Then it'll still be there when you want to use it.

---------------------
Devon 1983 323e (sold) 1988 525e (sold) 2002 X5 3.0 (sold) 1993 325is Coupe 160,000 miles
Message # 5 12.06.24 - 09:09:14
RE: How to "recursively" affect frames?

E39540i6

user




Statistics:
Messages: 257
Registration: 09.16.2003

Another question: In x264, I used this: uint8_t *curframe_block = &fenc->plane[0][x+y*fenc->i_stride[0]]; uint8_t *prevframe_block = &prevframe->plane[0][x+y*fenc->i_stride[0]]; to create pointers to the current macroblock of the current and previous frame. Can I do this with Avisynth? What type do I declare them to be, since C++ seems to have no uint8_t? (Also, come on #avisynth IRC channel, on freenode--your help will be appreciated :) )

---------------------
19" HRE 543, Remus Exhaust w/Res Delete, GruppeM CAI, M5 Front Bumper, Xenon Angel Eyes
Message # 6 12.06.24 - 09:16:50
RE: How to "recursively" affect frames?

frayed

user




Statistics:
Messages: 7,395
Registration: 03.18.2001

Put something like this in your constructor: Code:

---------------------
In the slow lane
Message # 7 12.06.24 - 09:21:16
RE: How to "recursively" affect frames?

95m3ltw

user




Statistics:
Messages: 113
Registration: 11.17.2001

Thanks, working on the error handling. Some other issues: 1. I want to check my mallocs, but c++ doesn't have an identifier called "null"--what do I do for == null? Edit: nevermind, NULL seems to work. 2. How do I deallocate my memory? free(ptr)? 3. What licensing requirements are there for an Avisynth filter? I assume it doesn't have to be GPL, given the exception given in the license--but what requirements are there? 4. How do I make certain parameter values default if not specified? Edit: Found this, thanks anyways.

---------------------
Message # 8 12.06.24 - 09:32:45
RE: How to "recursively" affect frames?

bmwQ

user




Statistics:
Messages: 516
Registration: 12.02.2003

2. if (ptr) free(ptr); 3. If all you do is include avisynth.h, there are no requirements. Ben made an exception for that. 4. As Ben writes in : "For convenience, AVSValue offers a set of As...() functions which take default values. See avisynth.h." This example sets defaults of 0 and 7 for mode and threshold, respectively: Code:

---------------------
SOLD, again!! Good luck, Eric!! 6/10/2012 "To my mind it is wholly irresponsible to go into the world incapable of preventing violence, injury, crime, and death. How feeble is the mindset to accept defenselessness. How unnatural. How cheap. How cowar
Message # 9 12.06.24 - 09:40:52
RE: How to "recursively" affect frames?
MIDI controller 120 and 121 : Previous topicNext topic: Uninstalling DV Toolkit Demo in PT 6.1...
Pages:  1  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants