video2x icon indicating copy to clipboard operation
video2x copied to clipboard

Hardware Acceleration on Downscaling

Open Super99Master opened this issue 5 years ago • 8 comments
trafficstars

Description

Add Hardware Acceleration to the Downscaling process since it's barely using the CPU.

Sources

HADownscaling

Running 2 Downscaler for a max of 32% CPU utilization.

Super99Master avatar Nov 03 '20 09:11 Super99Master

I haven't looked at the code yet; would it be possible to launch N downscaling processes where N is the number of logical processors on the system?

GitGerby avatar Nov 20 '20 14:11 GitGerby

I haven't looked at the code yet; would it be possible to launch N downscaling processes where N is the number of logical processors on the system?

Yes https://github.com/Super99Master/video2x/commit/a1b2aa380d67fe423d63c113d6bc471b03c8c3ff

Results of Multythreading: Number of threads | Whole time compleation (3 run avg) | Runs 1 | 118,19566 | 117.69998 119.31545 117.57157 4 | 52,39386 | 54.2574 52.24034 50.68386 12 | 40,72011 | 40.01302 41.70235 40.44497

I think 4 threads is good enough without pinning the processor at 100%. With 4 threads it was around 80% utilization

Super99Master avatar Nov 22 '20 00:11 Super99Master

https://github.com/Super99Master/video2x/commits/master

This is more or less how multithreading the downscaling process should work,

Super99Master avatar Nov 23 '20 11:11 Super99Master

Can i leave the downscaling, put that commit into mine, and then continue where i left off don't wanna spend 5 hours downscaling when you spent 4 upscaling

Rmdhn1 avatar Sep 09 '21 09:09 Rmdhn1

Can i leave the downscaling, put that commit into mine, and then continue where i left off don't wanna spend 5 hours downscaling when you spent 4 upscaling

Sorry, but i don't understand what you mean. Multy threaded downscaling was added in the dev tree

Super99Master avatar Sep 09 '21 09:09 Super99Master

also, huh, i downloaded it from git and the downscaling isn't multi threaded, i checked it on the python code and it isn't there

edit: OH GOD DAMNIT, DEV TREE? I DOWNLOADED THE MASTER

Rmdhn1 avatar Sep 10 '21 10:09 Rmdhn1

also, huh, i downloaded it from git and the downscaling isn't multi threaded, i checked it on the python code and it isn't there

edit: OH GOD DAMNIT, DEV TREE? I DOWNLOADED THE MASTER

https://github.com/k4yt3x/video2x/pull/449

Super99Master avatar Sep 10 '21 11:09 Super99Master

FYI: The 5.0 beta will be streamlined, so it will also be multi-threaded...or multi-processed rather.

k4yt3x avatar Sep 10 '21 16:09 k4yt3x