Reputation: 135
I know that most graphics hardware uses MPEG hardware decompression. I would like to use the hardware to decompress JPEG images. Does anyone know of a book or link to any information about using this functionality, or can tell me anything about it?
Also, I am willing to convert the images into a "video" if I can obtain hardware decompression of each frame. Would this be more viable?
Upvotes: 3
Views: 1764
Reputation: 21
If you are looking for speed and ease, look into using jpegturbo. Its a developed library that I believe is a complete replacement for the standard libjpeg. Compression on 10MP images dropped from 2 seconds to ~.6 seconds on a 2GHZ Atom processor.
Upvotes: 2
Reputation: 6584
You might want to have a look at OpenMAX, although I don't think it's widely adopted yet.
Upvotes: 0
Reputation: 8401
Video decompression hardware is special purpose. It takes a video stream that is encoded to a specific standard. You will generally not be able to decode JPEG using MPEG decoding hardware.
Another software option is to use the Intel Integrated Performance Primitives. These are optimized to take advantage of SSE instructions on Intel processors.
As @6502 notes if you convert your JPEG images to a video format (e.g. h.264) there are many ways to use hardware accelerated playback (e.g. DirectShow under Windows). You can do this conversion manually with most video editing software.
Upvotes: 1
Reputation: 4282
I don't agree to the "most graphics hardware uses MPEG hardware decompression", at least in the PC or similar desktop environment.
Mostly compression, decompression jobs are done in the main processor (CPU). Graphic hardwares mainly do the post processing of decompressed images.
MPEG decompression hardwares are extincted at least 10 years ago, I think.
Upvotes: 0
Reputation: 114539
Decompression for jpeg using specialized hardware is stuff that's available at the driver level, so it's not easy to do from normal user space. It would be easier to try using generic hardware assisted processing (e.g. CUDA).
However if your need is just having a movie where frames are coming from jpegs then you should check ffmpeg, because it's a tool that can do many things for videos, including this or the opposite (i.e. getting all frames of a video as images).
For example to make a movie using a list of jpeg files (picture1.jpg, picture2.jpg, ...)
ffmpeg -i picture_%d.jpg result.wmv
Most video players will then use hardware acceleration during playback if that is available
Upvotes: 2