Why does rendering on a PC take 10 seconds compared to 0.25 seconds in-camera?

Started 5 months ago | Discussion thread
hdkhang
Forum MemberPosts: 66
Like?
Re: Why does rendering on a PC take 10 seconds compared to 0.25 seconds in-camera?
In reply to rbekkers, 5 months ago

rbekkers wrote:

Hi all,

I have been using various raw converters over time, but always have been left with one question: why is the rendering process so slow? Using Lightroom 4.2 on my MacBook Pro (an 17” i7 clocked at 2.66GHz, with 8GB) it takes over 10 second to export a JPG from a raw file created by my Nikon D800E. Rendering a full size view on the screen takes about as much time. Exporting a large album of 500 pictures takes one and a half to two hours. Creating a new LR catalog and doing this all on an internal Vertex 2 SSD does not make it any faster (see also http://www.lrq.me/lyons-ssd). Other RAW convertors such as Capture NX2 are not much faster. Now I might get myself a newer, faster laptop (like the top of the line MBP Retina and 16GB) but that will at best make the process twice as fast, I assume. And it will require me to spend a whole lot of money.

Yet, the in-camera rendering does this job so much faster, like one fourth of a second. In parallel, it also can encode a compressed RAW file in the same time. So, in terms of ballpark figures, my camera is around 40 times faster at this rendering job.

Where does this performance difference come from? I understand camera’s use DSP’s for this work, whereas the rendering on the PC uses a microprocessor (LR4 does not have GPU acceleration, I understand). Since DSPs can be somewhat more efficient at dosing this task, its hard to believe the difference is so use. Why would an in-camera DSP, which may run at perhaps 1W TDP be so much faster than, in my case, Core i7-620M with 35W TDP running at full load? And if it is really a DSP issue, why would Adobe not use GPU acceleration as it does in Photoshop? (An GPU is much more like a DSP than a microprocessor.)

And if it were really the DSP issue, would it make sense to make an external DSP box that would do the rendering for LR? Such an approach is quite usual for users of demanding music software (see for instance the TC Electronics Powercore Compact). Connected to a Thunderbolt port, and rendering pictures in split seconds, I would be willing to invest. Or even better, allow the D800 itself with is USB3 to be allowed to be used as an external rendering station.

Would be interested in other people's views....

best regards,RB

The camera gets the image directly from the sensor to the buffer memory where it is converted using whatever settings you have chosen and embeds it into the RAW file that is written to the memory card. The whole process does not necessarily complete before the camera is ready to take the next photo - that is why it is called "buffer" memory. Compare this to a PC which has to read the file into memory - if from a slow HDD then you could be looking at nearly 1 second alone to read into memory (e.g. some slow 4200/5400 rpm drives towards the inner tracks or that are heavily fragmented). If you are reading directly off the memory card itself over USB or card reader, then it will be bottlenecked by the slowest link in the chain (be it the card, the reader or the USB interface). Next it has to do the conversion and then has to re-save the resulting image back to the storage medium.

Comparing the actual processing power between the two devices is trickier. One is using a chip custom designed to do a small set of tasks and completely optimised for it. The other is a general purpose chip that has to cater to every whim of any software developer. If it helps to make the point, then consider the difference between a gaming console and a PC - where despite relatively weaker hardware, the console can produce similar results due to being a fixed target where the developers can communicate directly with the hardware vs. going through some API's and other layers of abstraction. Now compare a console like the PS3 to say a dedicated BluRay player and the same scenario plays out again, the PS3 will consume over 70 watts vs under 20watts for a standalone player when watching a movie (the original PS3 consumed nearly 180 watts to do this same task).

Next you have to understand that the conversion that is done in camera using those specialised chips is taking place at a reduced level of precision. You can see this for yourself if you were to set your camera to RAW + JPEG (at the highest quality setting) and process the RAW file in Nikon software without modifying any settings and saving the resultant file to JPEG at a similar compression. The differences are subtle and require pixel peeping in most cases, but it is there nonetheless. For an analogy look to computer graphics cards, where in some cases, the difference in speed going from single floating point precision to double precision can reduce processing speed by a factor of 5. For gaming and other tasks for which precision is not that important and for which speed is, then it is a good trade-off. Since pixel peeping is required to detect differences, then camera manufacturers prefer to put less precise conversion in the camera itself rather than slow down the shooting frame rate. They assume (and rightly so) that anyone who cared about the last few percent of image quality will already be shooting in RAW anyway.

In response to your other points about building a specialised "add-on DSP" or some sort to speed things up, this would only be able to help in some cases - i.e. where the CPU is the primary bottleneck. Given that it is such a specialised bit of hardware, then it would be very costly and people would rather just invest that extra cost in faster "general purpose" hardware. The rationale being that the specialised chip would only offer improvements for a singular task, vs having a faster general purpose processor whose speed would improve everything. As for offloading to the GPU, well that might help, but again, only if the bottleneck were severe enough to offset the whole grab the image from storage medium, push to memory, then push from memory to GPU memory, do the processing, then push back to main system memory to be written to storage. In the computer world, there are many examples of this playing out. e.g. a long time ago, playing back DVDs was very CPU intensive, so many DVD kits came with a dedicated hardware MPEG2 decoder, you don't see these any more as even the slowest PC can play DVD streams.

Reply   Reply with quote   Complain
Post (hide subjects)Posted by
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow