The Disk and RAM Cache Pipeline

< Previous | Contents | Manuals Home | Boris FX | Next >

The Disk and RAM Cache Pipeline

To help you understand disk and RAM caching in SynthEyes, this section provides some more detailed information about how images are read, processed, and stored. The sections below provide information on each stage/step in this pipeline.

Image Readers. There is an image reader in SynthEyes for each supported still RGB image format, such as JPEGs, TIFFs, PNGs, Cineons, etc. These components get told to produce 8-bit, 16-bit, or floating-point buffers, filling them with whatever data the image supplies, which may be 8-bit, 16-bit, or floating point depending on the particular image. The image readers can also read and store the alpha channel, if one is in the file, or read a separate alpha-channel file.

Movie Readers. There is a movie reader for each supported movie file type, such as MOVs, AVIs, MP4s, IFLs, BAFFs, etc. The IFL movie reader uses the appropriate still image reader to read each image. Movie readers for AVIs, MOVs, etc, use the operating system to decode the image, as described previously. As with the image readers, the movie readers get told what format buffer to produce, and whether or not to read the alpha channel, if it is present and supported.

Disk Cache Reader. The disk cache is a movie reader too. If an image is present in the disk cache, it is supplied immediately from the cache. If not, the disk cache passes the request to the underlying original movie reader. When the disk reader asks for an image, it always asks for the image in its original bit depth, unless the Cache only 8-Bit versions preference is on. If that preference is on, the disk reader always requests 8-Bit versions. Either way, when the disk cache receives an image from the underlying reader, it caches it in the BAFF file for (faster) future use. The disk cache images are not preprocessed.

Image Preprocessor. The image preprocessor performs all the color adjustments, resolution adjustments, distortion correction, stabilization, etc. It asks for images from the shot's movie reader, which is either a disk cache reader (if the shot is disk-cached), or the appropriate movie reader. The image preprocessor asks the movie/disk cache reader for the image in the format set by the Process Depth area of the Shot/Edit Shot shot setup dialog, which is also on the Rez tab of the image preprocessor. The image preprocessor processes the image in whatever format it is presented in by the reader. Accordingly: if the shot is in disk cache, the Process Depth setting will be ignored, since the disk cache reader uses the Cache only 8-bit versions setting.

RAM Cache. The RAM cache stores preprocessed image, so that images don't have to be repeatedly reread and reprocessed. It stores up to the number of GBs set by the Max RAM Cache GB preference in the Image Input section. The RAM cache requests images from the image preprocessor, asking for images in the Store/Output format. The

preprocessed images are always converted into this desired format for storage, right at the end of preprocessing. This permits you to use floating point format for processing, but convert to 8-bit for storage, for example. The RAM cache is shared among all open shots.

Tracking and Display. The trackers and viewport display code request images from the RAM cache, based on what you want SynthEyes to do. If you scrub through only frames 20-30, then only frames 20-30 will be fetched and potentially reside in the RAM or disk cache: image reading is based on "pull" not "push."

Operating System Free RAM Pool. (Not an official part of the processing pipeline, but working off to the side.) Modern computers often have many GBs of RAM, even though they are running fairly small applications such as web browsers. This means that often there is a large pool of unused free RAM—unused in the sense that it is not part of any particular application or process on your machine.

The operating system uses the free RAM as a cache for your disk. Once you read a file, it stays in RAM as well as in disk, so that if you need it again, the operating system already has it. And when you are writing to disk, the operating system will put the data in RAM, then tell the application that the write is done, even though it is merely queued, and may not be written for some time. So this pool of unused RAM is quite helpful. The operating system may keep the disk cache's BAFF files in this unused RAM, if there is enough available, which makes your machine quicker. If it needs the RAM, the operating system writes the data to disk, if that is needed. If the data on disk is already correct (the file is being read), then the operating system can take the RAM back at any time. All of this happens automatically without your interaction.

Final exam question. If you change the Saturation value in the image preprocessor, what caches are affected? Answer: only the RAM cache. Any affected images stored in the RAM cache will be invalidated (dropped), and the image preprocessor will have to regenerate them as they are needed. Since the disk cache stores unprocessed images, it is unaffected, and the RAM cache will be supplied with images from the disk cache (if present). SynthEyes will not have to go back to the movie reader (and maybe image reader) to reread the original images.

©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.