reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142 stars 47 forks source link

ultrafast framed preview #114

Closed arnaud-sintes closed 8 months ago

arnaud-sintes commented 10 months ago

The purpose of this ultrafast framed preview is to reduce as much as possible the computation time required to perform the framed RAW preview rendering in LiveView in order to save CPU time to do other tasks (e.g.: recording RAW data).

This is achieved by precomputing everything possible, notably the RAW buffer offsets and the RGB gamma transformations, so the drawing itself may consist in the lightest possible loop doing linear accesses to data, thanks to simple pointer dereferencing.

By doing this in colored and grayscale preview we instantly get a smoother preview (both previewing & during recording), allowing us to potentially reduce the sleep times defined to leave enough headroom for the CPU to record the RAW data.

The cache precomputation is managed by simply computing a determinant value that may change when selecting a new RAW video resolution.

Changelist: