The Floating Point Engine: Difference between revisions

From RawPedia
Jump to navigation Jump to search
(Revised first paragraph)
No edit summary
Line 3: Line 3:
RawTherapee performs all calculations in 32-bit [https://en.wikipedia.org/wiki/Floating_point floating point] precision (in contrast to 16-bit integer as used in many other converters such as [https://en.wikipedia.org/wiki/Dcraw dcraw] and also in RawTherapee up to version 3.0).
RawTherapee performs all calculations in 32-bit [https://en.wikipedia.org/wiki/Floating_point floating point] precision (in contrast to 16-bit integer as used in many other converters such as [https://en.wikipedia.org/wiki/Dcraw dcraw] and also in RawTherapee up to version 3.0).


Classical converters work with 16-bit integer numbers. A pixel channel has values ranging from 0-65535 in 16-bit precision (to increase precision, converters usually multiply the 12- or 14-bit camera values to fill the 16-bit range). The numbers have no fractions, so for example there is no value between 102 and 103. In contrast, floating point numbers store a value at a far wider range with a precision of 6-7 significant digits. This helps especially in the highlights, where higher ranges can be recovered. It allows intermediate results in the processing chain to over- or undershoot temporarily without losing information. The fraction values possible also help to smooth color transitions to prevent color banding. And not the least, floating point makes life easier for developers who don't need to worry as much about rounding errors or clipping when developing image algorithms for RawTherapee.
Classical converters work with 16-bit integer numbers. A pixel channel has values ranging from 0-65535 in 16-bit precision (to increase precision, converters usually multiply the 12- or 14-bit camera values to fill the 16-bit range). The numbers have no fractions, so for example there is no value between 102 and 103. In contrast, floating point numbers store a value at a far wider range with a precision of 6-7 significant digits. This helps especially in the highlights, where higher ranges can be recovered. It allows intermediate results in the processing chain to over- or undershoot temporarily without losing information. The fraction values possible also help to smooth color transitions to prevent color banding.


The downside is the amount of RAM that floating point numbers require, which is exactly twice that of 16-bit integer. Together with the ever-increasing megapixel count of digital cameras, a 32-bit operating system can quite easily run out of memory and cause RawTherapee to crash. Therefore a 64-bit operating system is highly advised for stability.
The downside is the amount of RAM that floating point numbers require, which is exactly twice that of 16-bit integer. Together with the ever-increasing megapixel count of digital cameras, a 32-bit operating system can quite easily run out of memory and cause RawTherapee to crash. Therefore a 64-bit operating system is highly recommended for stability.


If you have problems running RawTherapee on a 32-bit system, try the following:
We officially ended support for 32-bit versions of RawTherapee with release 5.0-r1 in February 2017. Do not file bug reports regarding issues on 32-bit systems.


* As a general rule, you should avoid having folders with too many raw photos in them as each photo takes up memory when displayed in RawTherapee's File Browser tab.
If you nevertheless need to use RawTherapee on a 32-bit system, the following will help make the most of it:
* RawTherapee uses more RAM while you are using the File Browser tab, so avoid opening that tab while you are processing photos.
* Use 4-Gigabyte Tuning in Windows. See "[http://msdn.microsoft.com/en-us/library/bb613473%28VS.85%29.aspx 4-Gigabyte Tuning: BCDEdit and Boot.ini]" for an explanation of what it is, and find out how to do it by reading the guide "[http://avatechsupport.blogspot.se/2008/03/how-to-set-3gb-startup-switch-in.html How to set the /3GB Startup Switch in Windows XP and Vista]".
* Use 4-Gigabyte Tuning in Windows. See "[http://msdn.microsoft.com/en-us/library/bb613473%28VS.85%29.aspx 4-Gigabyte Tuning: BCDEdit and Boot.ini]" for an explanation of what it is, and find out how to do it by reading the guide "[http://avatechsupport.blogspot.se/2008/03/how-to-set-3gb-startup-switch-in.html How to set the /3GB Startup Switch in Windows XP and Vista]".
* Close other programs while working in RawTherapee.
* Close other programs while working in RawTherapee.
* Close the Image Editor tab when you're done editing to free up memory.
* Use a [[Preferences#Layout|single Editor tab]].
* Turn off "auto-start" in the batch queue. Only add photos to the batch queue once you are done editing all of them, and then start it. Use the batch queue, do not use the immediate save button.
* Turn off "auto-start" in the [[Queue]]. Add photos to the Queue as usual. When ready to start processing them, restart RawTherapee to free up RAM (no image open in the Editor), and start the queue.
* Change to a directory with few or no photos in it before starting the batch queue.
* Ensure that RawTherapee [[Preferences#Directories|does not load]] dark-frame or flat-field images if you do not use them.
* You can free some memory by deleting (or moving to a different folder, or renaming to something like .unusedicc) all the .icc profiles in iccprofiles\input for the cameras you do not use.
* Avoid having more than a few hundred photos per folder, as each photo requires a little RAM (thumbnail, embedded ICC profile, etc.).
* Assure that the Dark-frames Directory and the Flat-fields Directory in Preferences do not point to folders containing raw-files if you do not use Dark-frames or Flat-fields.
* The most memory-intensive tools are [[Tone Mapping]], [[Contrast by Detail Levels]] and [[Exposure#Highlight_Reconstruction | Highlight Reconstruction]] using "Color Propagation", so you might need to avoid using them if your machine and operating system are not up to standard.
* The most memory-intensive tools are [[Tone Mapping]], [[Contrast by Detail Levels]] and [[Exposure#Highlight_Reconstruction | Highlight Reconstruction]] using "Color Propagation", so you might need to avoid using them if your machine and operating system are not up to standard.

Revision as of 22:43, 6 January 2019


RawTherapee performs all calculations in 32-bit floating point precision (in contrast to 16-bit integer as used in many other converters such as dcraw and also in RawTherapee up to version 3.0).

Classical converters work with 16-bit integer numbers. A pixel channel has values ranging from 0-65535 in 16-bit precision (to increase precision, converters usually multiply the 12- or 14-bit camera values to fill the 16-bit range). The numbers have no fractions, so for example there is no value between 102 and 103. In contrast, floating point numbers store a value at a far wider range with a precision of 6-7 significant digits. This helps especially in the highlights, where higher ranges can be recovered. It allows intermediate results in the processing chain to over- or undershoot temporarily without losing information. The fraction values possible also help to smooth color transitions to prevent color banding.

The downside is the amount of RAM that floating point numbers require, which is exactly twice that of 16-bit integer. Together with the ever-increasing megapixel count of digital cameras, a 32-bit operating system can quite easily run out of memory and cause RawTherapee to crash. Therefore a 64-bit operating system is highly recommended for stability.

We officially ended support for 32-bit versions of RawTherapee with release 5.0-r1 in February 2017. Do not file bug reports regarding issues on 32-bit systems.

If you nevertheless need to use RawTherapee on a 32-bit system, the following will help make the most of it: