Discrepencies in output when calling the same function twice >> E-Commerce >> Forum
Forum

Forum



SearchSearch   Users   Registration   Entrance
Today: 10.07.2025 - 15:56:05
Pages:  1  2  

Discrepencies in output when calling the same function twice

Advertising

/
MessageAuthor

I've encountered some strange behavior with multiple instances of the same function being called from the same script. First, I'll describe some behavior that I did manage to solve, thus understanding what was being done wrongly on my part. Then, forward to what I don't yet understand. The issue began with me trying to compare result of several methods of smoothers, and creating a function for . The function was first conceived thus: Code:

---------------------------

LboogieG12

users




Statistics:
Messages: 18
Registration: 01.05.2003
23.05.20 - 16:54:56
Message # 1
RE: Discrepencies in output when calling the same function twice

Provide the complete AVS script with all functions, including SeeTheDifference().

---------------------------

DiScoTeknix

users




Statistics:
Messages: 4,067
Registration: 07.22.2002
23.05.20 - 17:06:28
Message # 2
RE: Discrepencies in output when calling the same function twice

Gladly, and thanks for the quick attention. :-) Code:

---------------------------

Trentk

users




Statistics:
Messages: 81
Registration: 03.12.2002
23.05.20 - 17:17:38
Message # 3
RE: Discrepencies in output when calling the same function twice

I removed ColorMatrix and PeachSmoother and the problem does not occur. Often, in such cases, a filter is using a global variable instead of a per-instance variable, and that causes one to interfere with the other. In this case, PeachSmoother would be implicated.

---------------------------

gC-

users




Statistics:
Messages: 248
Registration: 12.20.2002
23.05.20 - 17:27:53
Message # 4
RE: Discrepencies in output when calling the same function twice

I've had a look at PeachSmoother's source code and it's riddled with globals. There's no way multiple instances can function without potentially interfering with each other. The result will be undefined and will depend on the specific invocations and ordering of operations.

---------------------------
1982 320i - 86xxx miles and not moving for now. Sound : Sony Cassette + 10 disk changer, Pioneer speakers, 10'' Boss sub x 2 --- Suspesion : H&R lowering springs, Bilstien Sport shocks all around. 1995 Mitsubishi Mighty Max - 84,xxx miles Broken A/C,

BetaTested

users




Statistics:
Messages: 939
Registration: 04.03.2003
23.05.20 - 17:33:17
Message # 5
RE: Discrepencies in output when calling the same function twice

Which leads me to ask: Why not just do: Code:

---------------------------
Hey man, I'm a professional!

themadhatter

users




Statistics:
Messages: 37,960
Registration: 02.26.2001
23.05.20 - 17:38:41
Message # 6
RE: Discrepencies in output when calling the same function twice

Ah, I see now. Seems like only possible way would be a bob -> reinterlace then.

---------------------------
"I'd probably take the E30 M3 in this case just because I love that little car, and how tanky that inline 6 is." - thecj

reelizmpro

users




Statistics:
Messages: 100
Registration: 11.11.2002
23.05.20 - 17:46:08
Message # 7
RE: Discrepencies in output when calling the same function twice

P.S. The practical solution is, of course, instead of using SeeTheDifference(VHSPeachClean(),VHSPeachClean()) to use VHSPeachClean() SeeTheDifference(Last,Last) In which case the function isn't being called twice, but only the resulting clip (I would assume that will also translate to faster processing). I am still intrigued as to what cause the logical collision - or rather, what causes a logical collision when there's a double-call to PeachSmoother using an identical chain, that doesn't occur when the chain is arranged in a different manner. While this gives a practical solution should I want to test other functions chained after that point, it renders any testing of pre-chained filters useless, as one cannot tell whether any changes seen are due to such usage or due to the aforementioned discrepancy. Back to frame 0. -- Piggie

---------------------------
M3 SEDAN CLUB #12 2011 M3 ZCP 2006 M3 CS (SOLD ) 1993 E34 M5 Euro-Spec (SOLD )

Gop-Dogg

users




Statistics:
Messages: 89
Registration: 12.04.2002
23.05.20 - 17:55:43
Message # 8
RE: Discrepencies in output when calling the same function twice

@PigOnWing As I said, the behavior will be undefined. Undefined can include working correctly (for some fortuitous invocations). :)

---------------------------

Yonkers320is

users




Statistics:
Messages: 3,286
Registration: 02.06.2003
23.05.20 - 17:59:38
Message # 9
RE: Discrepencies in output when calling the same function twice

@stickboy: I actually was influenced by your functions when creating my own functions quoted above. Kudos for that. :-) @Leak: Yup, I (surprising myself) understand the problem. However, as far as I go, I would still not call anything regarding PeachSmooth's author, simply because I wouldn't allow myself to speak anything about programming when I know nothing about it. :-) It's too much of a mystery to me. @Neuron2: Thanks again. I'm now ceasing my attempts of making a non-workie work, and instead trying to approach achieving the same goal in a different manner. The original goal was to check the differences in different order of chaining several smoothers (used as general denoisers). I wanted to check the results I'll get from chaining FluxSmooth before and after PeachSmoother. In order to overcome the limitation calling PeachSmoother only once in order to get consistent results, I'm currently using this approach: Code:

---------------------------
"In proportion to his intelligence he was extremely isolated. There's no record of his having had close friends. He traveled alone. Always. Even in the presence of others he was completely alone. People sometimes felt this and felt rejected by it, an

Phaedrus

users




Statistics:
Messages: 133
Registration: 10.03.2001
23.05.20 - 18:10:10
Message # 10
RE: Discrepencies in output when calling the same function twice
avoiding the DEATH PENALTY (hypothetically) : Previous topicNext topic: help with latency anybody
Pages:  1  2  

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


Participants