initial ultrafast commit

Open
#2 · Created  · Last updated

Description

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:

  • src/raw.h

    • add framed preview parameters definition, setter & getter functions

    • add a RAW_PREVIEW_ADAPTIVE quality value to pass to raw_preview_fast_ex, to apply preview settings depending of the current configuration and state (idle or recording)

    • add the raw_preview_fast_ext2 function with an additional parameters indicating the recording state
      recording means raw_recording_state == RAW_RECORDING, others states (RAW_IDLE, RAW_PREPARING, RAW_FINISHING & RAW_PRE_RECORDING) are considered as idle

  • src/raw.cpp

    • add ultrafast framed preview structures, templates and functions, mainly around the init_preview_ultrafast_cache and draw_preview_ultrafast functions (covering both colored/grayscaled & half/quarter resolutions)

    • switch from raw_preview_fast_ex to raw_preview_fast_ex2 to properly deal with both legacy and ultrafast preview, take in account framed preview configuration & dump statistics

  • modules/mlv_lite/mlv_lite.c

    • add specific framed preview menus & configuration

    • alter raw_rec_update_preview function to deal with both legacy and ultrafast preview with potential timing tweaks

  • modules/mlv_play/mlv_play.c

    • optionally remove a useless sleep statement depending of timing configuration

 

0 attachments

0 comments

Loading commits...