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. |
21st September 2022, 10:40 | #1 | Link |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
Runtime question
Probably stupid a question but as I cannot find out how for example temporalsoften is coded to handle scenechange I thought to ask this.
I guess it must use some kind of averageluma or similar with a threshold and conditional call to ignore the frames above the given threshold? It seems that scenechange params does not slow it down alot yet using scriptclip is pretty slow? This 'cheat' calls only one frame one time so it is fast while scenechange threshold in temporalsoften has to check every frame? So I was thinking if the way scenechange is coded so fast maybe it would be possible to use the same principle but for the filter to instead adjust its filter strength (tradius, lumathreshold, chromathreshold etc.)? Just an idea. |
21st September 2022, 12:00 | #2 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
TemporalSoften:- http://avisynth.nl/index.php/Soften
Quote:
Quote:
[Offset is only available as arg in AVS+, default 1, ie next frame] LumaDifference(), does similar but between frames of the same frame number of two different clips. TemporalSoften() Scenechange, will likely do a Sort Of CurrentOffsetDiff = YDifferenceToNext(Offset), ie for each frame between current_frame and current_frame + Offset : Where Offset is (+/-) 1 to radius. If CurrentOffsetDiff for a particular frame diffence is above SceneChange then will not include that frame in softening [I would assume any frames further away in that direction from current frame, are then also ignored], this would happen in both directions, ie in radius both before and after current_frame. I note that TemporalSoften(Scenechange) arg is type Int, it really should be float as YDifferenceToNext(Offset) calc will be float result. [Float Scenechange arg would be better precision for user threshold, but probably dont matter too much] Would be very slow in ScriptClip. Hope above makes some sense and answers your question. EDIT: Above guesswork, I have not looked at source. EDIT: Quote:
EDIT Reason:: Where frames very similar, Maximum Processing, :: where frames very dissimilar Minimum processing ::::: Almost a NOP Where frames very similar, Minimum Processing, :: where very dissimilar Maximum processing ::::: Does not seem useful to me, standard thresholding better [at least for TemporalSoften]. Also, CurrentOffsetDiff would be calculated for each Offset from current frame (both +ve and -ve offsets), dont know how you might be thinking of mixing all those together to adjust overall strength. [Any wildly fluctuating strength massaging might also introduce temporal instability in result].
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 21st September 2022 at 13:33. |
|||
21st September 2022, 15:30 | #3 | Link | |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
Quote:
My idea was not to use the exact same operation (and not temporalsoften specifically, yet any denoiser could be used I guess) but if the scenechange code somehow could be altered to use my noise detection to dynamically regulate the params of the denoiser/filter since it (most plugins scenechange detection seems fast) seems faster than using scriptclip. Hope I was clear in my reply, they tend to be messy. Edit: good idea! You mentioned "when frames are similar" then low noise, and when dissimilar = higher noise. I have tested my noise detection and it corresponds well on all my test clips noise amount numbers with the image. Last edited by anton_foy; 21st September 2022 at 15:35. |
|
21st September 2022, 15:48 | #4 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
The SceneChange type functionality basically just sets/calcs extent of frames used in averaging to produce temporal softenening,
where "sceneChange" detected, is not necessarily a scene change, just means frames so different as to be BestNotAveragedAsTooDifferent. Lumathreshold, chromathreshold, functionality acts similarly at pixel level, where some offset frame pixels ignored in averging as too different to current_frame pixels. EDIT: Some scene change detectors [eg SCSelect()] dont necessarily detect scene change, just means "unreliable results if processing using this frame". (also why scene change stuff dont necessarily force eg StartOfScene after EndOfScene) Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 21st September 2022 at 16:17. |
|
21st September 2022, 19:36 | #5 | Link | |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 703
|
Quote:
Edit: RaffRiff42 posted mdiff2 which I had alot of use for and it is comparing two frames non-runtime so very fast. Last edited by anton_foy; 21st September 2022 at 19:48. Reason: Forgot something |
|
|
|