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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th March 2023, 20:53   #2221  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Probably on Amazon
That's where I bought my Blu-ray collection with 4 films of Lucky Luke.
LeXXuz is offline   Reply With Quote
Old 25th March 2023, 08:45   #2222  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Changing FPS a LOT !!

I have a bit of a project...

I have an interlaced anime @ 23.976, and using BWDIF to de-interlace brings it up to 59.94, but then it needs to go double again to 119.88.

Would Frameconverter do that, if it was de-interlaced first ??

Some script suggestions would be greatly appreciated.
FTLOY is offline   Reply With Quote
Old 25th March 2023, 11:39   #2223  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
@LeXXuz: What are the source details? I'm not having any Also pure GPU scripts don't like prefetch(>1).
It is the prefetch. Although MT mode is set to 3 for KNLmeansCL and cache mode to 0.
Then how do you run SMD with that prefilter at a decent speed

EDIT: Well I can get it to run @ Prefetch(16). Then 7.8/8.0Gb of that GPU's VRAM is used.
And only because it's 1440x1080. For the full HD resolution I have to go even lower.

Damn I hate Nvidia for being so cheap about VRAM for their GPUs.
Would prefer ATI... pardon me... AMD anyway.
But can't run any CUDA filters then obviously

Last edited by LeXXuz; 25th March 2023 at 12:18.
LeXXuz is offline   Reply With Quote
Old 25th March 2023, 12:38   #2224  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by LeXXuz View Post
It is the prefetch. Although MT mode is set to 3 for KNLmeansCL and cache mode to 0.
Then how do you run SMD with that prefilter at a decent speed

EDIT: Well I can get it to run @ Prefetch(16). Then 7.8/8.0Gb of that GPU's VRAM is used.
And only because it's 1440x1080. For the full HD resolution I have to go even lower.

Damn I hate Nvidia for being so cheap about VRAM for their GPUs.
Would prefer ATI... pardon me... AMD anyway.
But can't run any CUDA filters then obviously
I always thought that AMD GPU's were better for KNLMeansCL...
FTLOY is offline   Reply With Quote
Old 25th March 2023, 13:11   #2225  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Well, just for fun and giggles I started that script on my Ryzen 7950x machine and selected the internal GPU as renderer.
And it runs, even with Prefetch(32)

The internal GPU takes ~10.5GB of systems DDR5 memory for that job. Of course it was not meant to run compute jobs and it runs only at ~1.5FPS, but it runs at least.
Take that Nvidia!


Last edited by LeXXuz; 25th March 2023 at 13:23.
LeXXuz is offline   Reply With Quote
Old 25th March 2023, 13:50   #2226  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by LeXXuz View Post
Well, just for fun and giggles I started that script on my Ryzen 7950x machine and selected the internal GPU as renderer.
And it runs, even with Prefetch(32)

The internal GPU takes ~10.5GB of systems DDR5 memory for that job. Of course it was not meant to run compute jobs and it runs only at ~1.5FPS, but it runs at least.
Take that Nvidia!
Yep, the iGPU's of the Ryzens are pretty piss- weak alright, only 1 compute unit I believe

Last edited by FTLOY; 25th March 2023 at 14:09.
FTLOY is offline   Reply With Quote
Old 25th March 2023, 16:33   #2227  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,075
Quote:
Originally Posted by LeXXuz View Post
Well, just for fun and giggles I started that script on my Ryzen 7950x machine and selected the internal GPU as renderer.
And it runs, even with Prefetch(32)

The internal GPU takes ~10.5GB of systems DDR5 memory for that job. Of course it was not meant to run compute jobs and it runs only at ~1.5FPS, but it runs at least.
Take that Nvidia!
If the task is memory-limited - the very cheap 128bit bus width datacompute accelerator (endusers 'video card' today) will easily outperform integrated GPU with very slow typically 2-channels DDR5 RAM of the very old and very slow x86(64) intel-architecture. Its peak memory transfer typically below 100 GB/s. And if we take medium segment 'videocard' with RAM >200..300 GB/s it will be even better visible. The top PC DCAs like Tesla A100 have already about 2000 GB/s memory performance in a single full-sized PCIe x16 card of 2slots size - thanks to new HBM RAM.

So it may be only some benefit if run very compute-extensive task into large register file and cache of integrated GPU in CPU.
DTL is offline   Reply With Quote
Old 25th March 2023, 16:49   #2228  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Of course the iGPU is very weak and extremely limited in bandwith. It was just to proof it is working, nothing more.

The iGPU is meant to be used for desktop work and maybe watch some media. But certainly not for computational purposes or gaming.

Or, as in my case, if you just need the CPU, spares you to buy a dedicated graphics card.
LeXXuz is offline   Reply With Quote
Old 25th March 2023, 18:11   #2229  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Sorry, me again Dogway.

Should these two be identical in output?

Code:
PRE=ex_Median(mode="IQMST", UV=3,thres=255)
Code:
PRE0=ex_Median(mode="IQMST", UV=3,thres=255)
PRE=ex_blend(PRE0,"blend",opacity=1)
Since opacity is clamped between 0,1 in ex_blend
-output with opacity=0 seems identical with the last clip, as it should.
-output with opacity=1 seems not identical with the blend clip, which I would've expected.

Also I noticed some flickering in the output when opacity is used with anything but 0.
Quite subtle but noticeable in some backgrounds when you're very susceptible to flicker. Could these be rounding errors from the blending process by any chance?

I'm not so sure atm if this is a good way to control that prefilter's strength. Same seems to be the case with ex_lutxy().
LeXXuz is offline   Reply With Quote
Old 25th March 2023, 20:19   #2230  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Sorry, I felt very sick today so probably will get things going at a slower pace from now on.
Yesterday I managed to streamline ex_KNLMeansCL() as KNLMeansCL expects a simple YUV444 source, so yes it's slower, but tell me back if it fixes the memory leak issues.
I don't think the previous version was at fault either, just the way KNLM handles memory.

Code:
function ex_KNLMeansCL (clip c, float "h", int "d", int "a", int "s", int "wmode", clip "rclip", float "LFR", bool "DCT", bool "chroma", int "gpuid", float "wref", string "knlm_params") {

    h            = Default( h, 7.0)         # Sigma
    d            = Default( d,   0)         # Temporal radius
    a            = Default( a,   1)         # Spatial  radius
    s            = min(Default( s, a*2),8)  # Spatial  radius of the similarity neighborhood
    wmode        = Default( wmode,  0)
    wref         = Default( wref, 1.0)
    gpuid        = Default( gpuid,  0)      # Set to -1 for "cpu" mode (currently -2022- not implemented)
    chroma       = Default( chroma, true)
    LFR          = Default( LFR, wmode < 1 || d > 0 ? min(2,d+1)*300*(c.width()/1920.) : 0) # Restore low frequency details, specially on wmode=0, and more specially with d > 0 (motion estimation is very bad in KNLMeansCL). Set to 0 to disable.
    DCT          = Default( DCT,    true)
    knlm_params  = Defined( knlm_params) ? ","+knlm_params : ""
    device_type  = gpuid < 0 ? "cpu" : "auto"

    pID  = color_propGet(c)
    mat  = pID[2]+(pID[6]?":l":":f")

    isy     = c.isy()
    rgb     = c.isrgb()
    is44    = c.is444()

    UV      = rgb ? "auto" : isy || !chroma ? "Y" : "YUV"
    dwclip  = Defined( rclip )
    wclip   = dwclip ? rclip : Undefined()

    c
    isy   ? last                 : \
    rgb   ? ConvertToPlanarRGB() : \
    !is44 ? ConvertToYUV444(matrix=mat,chromaresample=!chroma?"point":"bicubic",param1=0,param2=0.5) : last
    al   = last

    Eval("KNLMeansCL(D=d, A=a, h=h, s=s, device_type=device_type, device_id=max(0,gpuid), rclip=wclip, wmode=wmode, wref=wref, mode_9_to_15bits=1, channels=UV" + knlm_params + ")")
    LFR > 50 ? ex_LFR(last,al,LFR,DCT,UV=chroma?3:2) : last

    isy || rgb || is44 ? last                            : \
    chroma             ? MatchClip(c,matrix=pID[2])      : \
    CombinePlanes(last,c,planes="YUV",pixel_type=PixelType(c))

    propCopy(c,true,props="_ChromaLocation") }
After confirmation I upload SMDegrain with some other fixes.

Will have a look on ex_blend(), bug reports are always appreciated.

Quote:
Originally Posted by FTLOY View Post
I have a bit of a project...

I have an interlaced anime @ 23.976, and using BWDIF to de-interlace brings it up to 59.94, but then it needs to go double again to 119.88.

Would Frameconverter do that, if it was de-interlaced first ??

Some script suggestions would be greatly appreciated.
After deinterlacing using RIFEwrap with the anime model, it's in ResizersPack
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 25th March 2023 at 21:06.
Dogway is offline   Reply With Quote
Old 25th March 2023, 22:12   #2231  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
Sorry, I felt very sick today so probably will get things going at a slower pace from now on.
No worries! Take things slow and watch your health. All this here can wait

All the best and get well soon!
LeXXuz is offline   Reply With Quote
Old 26th March 2023, 00:28   #2232  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by Dogway View Post
After deinterlacing using RIFEwrap with the anime model, it's in ResizersPack
Thanks for the tip, but looking at RIFEwrap, I'm non-the-wiser, and confused

Line 578

Code:
function RIFEwrap(clip a, int "model", int "FrameNum", int "FrameDen", bool "FrameDouble", bool "Anime", int "gpuid")
Code:
md  = Default(model,         22) # model: 3 - for Anime or lineart, 17,6,22 - for photos or live action (in ascending order of qual/speed)
    num    = Default(FrameNum,     num)
    den    = Default(FrameDen,     den)
    fd     = Default(FrameDouble, !(numD || denD))
    an     = Default(Anime,      false)
    gid    = Default(gpuid,          0)
Regards
FTLOY is offline   Reply With Quote
Old 26th March 2023, 00:33   #2233  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Just do:
Code:
RIFEwrap(model=3, anime=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 26th March 2023, 00:58   #2234  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by Dogway View Post
Just do:
Code:
RIFEwrap(model=3, anime=true)
There seems to be something wrong here, it's VERY slow to load, then processes 1 frame, and then tries to start again...remove that call, and it's fine...

Does RIFE need something else ?

Anyway, I've been able to achieve what I needed with FrameRateConverterMIX.

Last edited by FTLOY; 26th March 2023 at 03:20.
FTLOY is offline   Reply With Quote
Old 26th March 2023, 15:32   #2235  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Yes, it's meant to be slow, but for the restart thing... I don't know. I'm checking now.

EDIT: no problem for me with RIFEwrap(). Encoded HD clip at around 2.5fps, and no problem either in AvsPmod.

By the way, if anyone can confirm my above refactored ex_KNLMeansCL() for the memory leak issues I can upload SMDegrain update today.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 26th March 2023 at 15:55.
Dogway is offline   Reply With Quote
Old 26th March 2023, 17:45   #2236  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
By the way, if anyone can confirm my above refactored ex_KNLMeansCL() for the memory leak issues I can upload SMDegrain update today.
The memory load is about the same on my systems with the new code. I guess it's either the filter or AVS+ causing this huge VRAM demand.
LeXXuz is offline   Reply With Quote
Old 26th March 2023, 22:57   #2237  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Ok, so with above function refactor KNLMeansCL still does memory leak, updating SMDegrain now.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 27th March 2023, 00:41   #2238  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by Dogway View Post
Yes, it's meant to be slow, but for the restart thing... I don't know. I'm checking now.

EDIT: no problem for me with RIFEwrap(). Encoded HD clip at around 2.5fps, and no problem either in AvsPmod.
I've heard that it's S-L-O-W, but does RIFE need some dependency, like Vulkan ??
FTLOY is offline   Reply With Quote
Old 27th March 2023, 03:29   #2239  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by FTLOY View Post
I've heard that it's S-L-O-W, but does RIFE need some dependency, like Vulkan ??
Of course yes
kedautinh12 is offline   Reply With Quote
Old 27th March 2023, 04:43   #2240  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Quote:
Originally Posted by kedautinh12 View Post
Of course yes
SDK or Runtime ?
FTLOY is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs


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 03:20.


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