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. |
23rd September 2015, 05:00 | #1 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
How to Process Multiple Frames At Once
I know some filters such as NNEDI3 have internal multi-threading. How does it go about processing several frames at once?
More specifically, I finally got the filter to run HLSL Shaders to work. However, after I pass in the data of a frame, it instead returns the previous frame. One work-around is to render an extra dummy frame in DirectX so that the previous becomes the right one. However, that 1-frame delay might be by design, so that it displays the previous while passing in the instructions of the current frame. This avoids delays between GPU instructions. If I want to follow that design (for performance gain), how would I go about starting processing frame 2 before getting the result of frame 1? |
23rd September 2015, 13:20 | #2 | Link |
Registered User
Join Date: Mar 2014
Posts: 308
|
This just sounds a lot more like you're doing something wrong rather than this behaviour being "by design". No other filter does this, so why would this be by design?
Are you sure it's not just an off-by-one error somewhere in your code, or a seeking problem with the source filter?
__________________
Say no to AviSynth 2.5.8 and DirectShowSource! |
23rd September 2015, 17:05 | #3 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Nobody has a clue why it is behaving that way. But I can can work-around it by simply creating a 2nd dummy scene.
How do OpenCL filters handle their internal multi-threading, or keeping the GPU buffer always busy, or allowing other filters to use the CPU while the GPU is working? Note that I'm not using OpenCL, but DirectX 9 to create and render scenes.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 23rd September 2015 at 17:11. |
23rd September 2015, 21:36 | #5 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I also read there's always a delay between when the instruction is give to the GPU and the execution of the code, and filling in the next frame ahead of time avoid that. Are you saying this cannot be done with AviSynth? It's not a big deal, but it might have a performance penalty. Unless I'm missing something.
|
23rd September 2015, 21:43 | #6 | Link |
Registered User
Join Date: Jan 2010
Posts: 270
|
What I'm saying is that avisynth does not have any support for GPU computing whatsoever. The only way GPU filtering is implemented is processing the whole frame on the GPU while blocking every other filter.
In theory you can do some kind of prefetching yourself but if you ever actually do this then wat. |
Thread Tools | Search this Thread |
Display Modes | |
|
|