Comments (3)
Hi, thanks for writing.
Can I have some questions? You are saying that you encode 24 FullHD frames 0.05 second. This means 2 ms per frame? This is rather more that I'd expect but I cannot say that it is incorrect, it depends on image and encoder properties. The problem may also be that whether there is "only" 24 images, the GPU initialization doesn't amortize well, to be concrete, CUDA initialization can cost as much as encoding 200 frames.
How much improvement would you imagine by parallel encoding? The thing is that the performance bottleneck is mostly PCIe transfers. I've created example encode.c.txt and some evaluations:
$ time ./encode 8000 1
real 0m8.680s
$ time ./a.out 2000 4
real 0m6.414s
$ time (./a.out 2000 1 & ./a.out 2000 1 & ./a.out 2000 1 & ./a.out 2000 1 & wait)
real 0m5.501s
So running in multiple processes improves the performance by some 36%, multi-threaded something less (there is some space for improvement here). When run within the NVidia Profiler, GPUJPEG performence is limited by memory transfers of uncompressed image to GPU (for encode). From the profiler, I can imagine improvement by, let say, 20% but surely not multiple times. Of course I am writing about images in CPU RAM - if you have or can have them already on GPU, it may be quite a different story.
from gpujpeg.
Hi, I've update on the above. I've tweaked the example from my previous post to use pinned memory and now its performance is optimal (it is entirely utilizing host-to-device bandwidth according to NVIDIA profiler), it is here. The point is that the input (raw) image buffer must be allocated with CUDA API to achieve optimal performance, also CUDA streams should be used.
Is the example above something you were looking for or have I misunderstood it somehow? Of course it could be added to GPUJPEG API, including some thread scheduler to create some higher-level API for user but I'd rather keep it simple
from gpujpeg.
I am closing for now since I believe that the question was more or less answered (according to my understanding). If not, feel free to reopen the issue.
from gpujpeg.
Related Issues (20)
- gpujpeg_decoder_get_image_info broken HOT 2
- Set restart_interval==8 the gpu can't work HOT 2
- Crash with JPG Image HOT 13
- Performence question HOT 2
- Error building a static gpujpeg binary HOT 3
- Crash when parsing malformed PNM file HOT 2
- GPUJPEG with Vulkan HOT 9
- "No CUDA toolset found" with Visual Studio 17 2022 (Windows 10) HOT 6
- gpujpeg_opengl_destroy definition of dllimport function not allowed HOT 1
- main.obj : error LNK2019: unresolved external symbol HOT 4
- Support custom install folder on windows HOT 1
- can GPUJPEG support one channel grayscale 8-bit? how to use? HOT 4
- a GPU with multiple threads, gpujpeg_encoder_encode error HOT 4
- How to use multi-GPU parallelism HOT 3
- Support of conan center HOT 2
- Input the image size and image format HOT 2
- GPUJPEG fails on AMD with ZLUDA: named symbol not found HOT 2
- Is it possible to compress png format images into jpeg or jpg formats? HOT 3
- Is there support for pitched (noncontiguous) image? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpujpeg.