Andrea/Phyllis plugins, shortcuts, and gang fixes
[goodguy/cin-manual-latex.git] / parts / Plugins.tex
index ce576fe6eddf73efba77e1fb90a6712d5f4d6cd5..29fa2d120855c022e44263207cc8d4dd1925cf5c 100644 (file)
@@ -72,13 +72,13 @@ When enabled, which is the default, and you edit tracks, the effects follow the
 \begin{figure}[htpb]
     \centering
     \includegraphics[width=0.9\linewidth]{editing-effects.png}
-    \caption{Screencast of the native Video plugins in the default Cinfinity icon set.}
+    \caption{Screencast showing the menu where Editing Effects behavior is changed.}
     \label{fig:editing-effects}
 \end{figure}
 
 To edit effects, you can move the timeline cursor over the effect borders until it changes to a resize left or resize right icon. In this state, if you drag the end of the effect, it performs an edit just like dragging an edit edge. The five editing behaviors of track trimming apply to effect trimming and they are bound to the mouse buttons that you set in interface preferences as shown in the previous screencast. \textit{Trimming} simply means changes the duration dragging the edges.
 
-When you perform a trim edit on an effect, the effect boundary is moved by dragging it. Unlike track editing, the effect has no source length. You can extend the end of an effect as much as you want. Also unlike track editing, the starting position of the drag operation does not bind the edit decision to media. The media the effect is bound to does not follow effect edits. Other effects, however, do follow editing decisions made on an effect. You can disable effects from being subject to the edit decisions by using the pulldown Settings and toggling off Edit effects. If you drag the end of an effect which is lined up to effects on other tracks, the effects on the other tracks will be edited while the media stays the same. When you drag an effect in from the Resources window you can insert the effect in the portion of the row unoccupied by the trimming operation. In some cases you will want a trimming operation to change only one row of effects. This can be achieved by first positioning the insertion point on the start or end of the effect. Then press the shift key while beginning the trimming operation. This causes the operation to change only one row of effects.
+When you perform a trim edit on an effect, the effect boundary is moved by dragging it. Unlike track editing, the effect has no source length. You can extend the end of an effect as much as you want. Also unlike track editing, the starting position of the drag operation does not bind the edit decision to media. The media the effect is bound to does not follow effect edits. Other effects, however, do follow editing decisions made on an effect. You can disable effects from being subject to the edit decisions by using the pulldown \textit{Settings} and toggling off Edit effects. If you drag the end of an effect which is lined up to effects on other tracks, the effects on the other tracks will be edited while the media stays the same. When you drag an effect in from the Resources window you can insert the effect in the portion of the row unoccupied by the trimming operation. In some cases you will want a trimming operation to change only one row of effects. This can be achieved by first positioning the insertion point on the start or end of the effect. Then press the shift key while beginning the trimming operation. This causes the operation to change only one row of effects.
 
 You can move effects up or down. Every track can have a stack of effects under it. By moving an effect up or down you change the order in which effects are processed in the stack. Go to an effect and right click to bring up the effect menu. The \textit{Move up} and \textit{Move down} options move the effect up or down. When you are moving effects up or down, be aware that if they are shared as shared effects, any references will be pointing to a different effect after the move operation.
 
@@ -104,6 +104,15 @@ Two other effect types available in the Attach Effect dialog are \textit{Shared
     \item The insertion point or selected region must start inside the other effects.
 \end{itemize}
 
+Before going into further detail about how to use \textit{Shared effects}, an easier
+alternative method of application which is especially useful for Audio tracks is
+available.  In this method, all you have to do is use the \textit{Audio} pulldown and
+choose \textit{Attach effect}, highlight the effect you would like and make sure the
+default of \textit{Attach single standalone and share others} is checked on.  It will
+automatically be a "Shared Effect" on all audio tracks (be sure to disarm any audio
+tracks that you do not want to have the effect shared on).  This method also works for
+Video tracks using the \textit{Video} pulldown choice of \textit{Attach effect}.
+
 In the case of a shared track, there must be another track on the timeline of the same type as the track you are applying an effect to. If you right clicked on a video track to attach an effect, there will not be anything in the shared tracks column if no other video track exists. The same applies equally to audio tracks in that another audio track must exist. Shared tracks are often used as layers for titles, curves and keyframes.
 
 If shared effects or shared tracks are available, they appear in the shared effects and shared tracks columns when you used the \textit{Attach effect} option (RMB on a track). When the green colored checkmark is clicked OK, anything highlighted in the column is attached under the current track.
@@ -285,16 +294,16 @@ Restart cin by changing \texttt{Settings$\rightarrow$ Preferences$\rightarrow$ A
 
 The \textit{Visibility} tool in the Resources window (figure~\ref{fig:visibility01}) gives you the ability to turn off or on any of several sets of plugins. If you left-click the Visibility box, you will see the various categories of plugins, such as \textit{ladspa}, \textit{ffmpeg}, \textit{audio}, \textit{lv2}, and \textit{video} (figure~\ref{fig:visibility02}).
 
-Highlight the set you want to turn on and a check mark appears to show it is active. Highlight again to toggle it off. See the next screenshot which illustrates that all of the plugins are turned off (not visible) except for audio. There is also the ability to add your own personal directory of plugins which will show up here. All you have to do to have these plugins become visible is to create a directory, with some name that is meaningful to you, and put your .png files in your: \\
-\texttt{cinelerra\_path bin/plugins/<your\_directory\_name>}.
-
 \begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.6\linewidth]{visibility02.png}
-    \caption{Screenshot showing the Visibility categories of plugins with all toggled on and audio highlighted.}
-    \label{fig:visibility02}
+       \centering
+       \includegraphics[width=0.6\linewidth]{visibility02.png}
+       \caption{Screenshot showing the Visibility categories of plugins with all toggled on and audio highlighted.}
+       \label{fig:visibility02}
 \end{figure}
 
+Highlight the set you want to turn on and a check mark appears to show it is active. Highlight again to toggle it off. See the next screenshot which illustrates that all of the plugins are turned off (not visible) except for audio. There is also the ability to add your own personal directory of plugins which will show up here. All you have to do to have these plugins become visible is to create a directory, with some name that is meaningful to you, and put your .png files in your: \\
+\texttt{cinelerra\_path bin/plugins/<your\_directory\_name>}.
+
 \subsection{Expanders for Plugin Subtrees in the Resources Window}%
 \label{sub:expanders_plugin_subtrees}
 
@@ -304,11 +313,18 @@ If there are recommendations for other relevant categories, they can be added. T
 
 The \texttt{expanders.txt} file has very specific requirements. The most specific is that there are no blanks -- you must use tabs only. A \# (pound sign) can be used in column 1 to indicate a comment. Here is a short example:
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.8\linewidth]{expander.png}
+       \caption{$\triangledown$,$\triangleright$ = expander; "-" = options}
+       \label{fig:expander}
+\end{figure}
+
 \begin{lstlisting}[style=sh]
 Video Effects
     - Color_Correction
         Blue Banana
-#\qquad \qquad Color 3 Way
+                         Color 3 Way
         Color Balance
 Audio Effects
     - Calf
@@ -318,13 +334,6 @@ Audio Effects
         L2_Calf Fluidsynth
 \end{lstlisting}
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.8\linewidth]{expander.png}
-    \caption{$\triangledown$,$\triangleright$ = expander; "-" = options}
-    \label{fig:expander}
-\end{figure}
-
 \subsection{Speed-up of Ffmpeg plugin usage with OPTS files}%
 \label{sub:speedup_ffmpeg_plugin_opts}
 
@@ -721,7 +730,8 @@ export LADSPA_PATH=/usr/lib/ladspa
 
 LV2 is an open standard for audio plugins using a simple interface with extensions which add functionality to support audio software. These plugins were written by external developers and provide additional audio effects to \CGG{} audio without having to change \CGG{} every time. Because the LV2 plugins are separate from \CGG{} Infinity, if one fails or does not perform as expected, \CGG{} should stay running and you will have to contact the programmers responsible for that plugin for a fix.
 
-Typically, a user OS has specialized package groups installed. It is difficult to create one build of \CGG{} to accommodate all potential LV2 plugins. Specifically for the \textit{Calf-Studio LV2 plugins}, you should install the \textit{Calf Plugins} package. The user’s computer must have \textit{gtk-2-runtime} installed, which seems to be automatically done already for most distros. For users doing their own builds, you can build \CGG{} without LV2 support by including \texttt{-{}-without-lv2} in the configure step. The default build is \texttt{-{}-with-lv2=yes} and requires that \textit{GTK-2-devel} must be installed or the build will fail and notify you.
+Typically, a user OS has specialized package groups installed. It is difficult to create one build of \CGG{} to accommodate all potential LV2 plugins. Specifically for the \textit{Calf-Studio LV2 plugins}, you should install the \textit{Calf Plugins} package. The user’s computer must have \textit{gtk-2-runtime} installed, which seems to be automatically done already for most distros. For users doing their own builds, you can build \CGG{} without LV2 support by including \texttt{-{}-without-lv2} in the configure step. The default build is \texttt{-{}-with-lv2=yes} and requires that \textit{GTK-2-devel} must be installed or the build will fail and notify you. In addition for some newer distros, you will need to install
+\textit{lv2-calf-plugins-gui}; for example Fedora version 32.
 
 LV2 plugins have their own category in the \textit{Audio Plugins Visibility} as lv2. There is a simple text interface which is available via the usual \textit{Show controls} button when the plugin is attached to the audio track. This window has a Reset button to get back to the default settings. To change a value of one of the parameters, highlight that parameter and type in the new value in the topmost text box and then hit Apply to take effect -- the reason for requiring hitting apply is so that the audio is not moving all over the place while you are still typing a value. More easily, you can just move the \textit{pot dial} or the \textit{slider} bar which take effect automatically.
 
@@ -776,6 +786,13 @@ Note the UI button in the upper right hand corner above the Reset button (figure
 
 When the glitzy ui is up, the simple text window remains up also since it is the \CGG{} side and keeps track of the value changes so they remain in effect for further usage of the plugin. Changes to one or the other will occur in both with the exception of certain features in the glitzy window which are not communicated correctly back to \CGG{}; for example a reset button -- the simple interface Reset button must be used instead. To change values in the glitzy window you use the mouse and move up or down unlike a knob that turns! (Figure~\ref{fig:calf02})
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.8\linewidth]{calf02.png}
+       \caption{Screencast with a Calf plugin glitzy window that appears when clicking the simple interface UI button.}
+       \label{fig:calf02}
+\end{figure}
+
 In order to test a particular plugin without bringing up \CGG{}, especially for ones that do not operate, it is possible to manually display an lv2ui gui with: \\
 \texttt{/cin-path/lv2ui <lv2-uri>} \\
 For example:
@@ -784,12 +801,6 @@ For example:
 /tmp/cinelerra-5.1/bin/lv2ui http://calf.sourceforge.net/plugins/Flanger
 \end{lstlisting}
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.8\linewidth]{calf02.png}
-    \caption{Screencast with a Calf plugin glitzy window that appears when clicking the simple interface UI button.}
-    \label{fig:calf02}
-\end{figure}
 
 \section[Video Effects --- Native]{Video Effects -- Native}%
 \label{sec:video_effects_native}
@@ -1063,18 +1074,18 @@ is a clear button on the right to set the value to 1.
 \subsection{Brightness/Contrast}%
 \label{sub:brightness_contrast}
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.6\linewidth]{brightness.png}
+       \caption{How it works Brightness and Contrast}
+       \label{fig:brightness}
+\end{figure}
+
 To brighten a dark shot, or add light, use this plugin. Do not overuse the effect or you risk degrading your video quality.
 The \textit{Brightness} slider moves up or down the values of the entire channel and corresponds to the \textit{Master Offset} of the various grading programs.
 The \textit{Contrast} slider expands or narrows the brightness values of the entire channel; corresponds to the use of the \textit{cursors} (small triangles) in the \textit{Histogram} plugin. Clear icons are present to reset its slider to default without affecting others.
 Use the effect along with keyframing to brighten a long shot that is dark at the beginning but bright at the end. Generally you will want to change the brightness and contrast about the same amount (for example -- brightness $28$, contrast $26$) so that your original colors are kept intact. This effect is also keyframable (figure~\ref{fig:brightness}).
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.6\linewidth]{brightness.png}
-    \caption{How it works Brightness and Contrast}
-    \label{fig:brightness}
-\end{figure}
-
 \subsection{BurningTV}%
 \label{sub:burningtv}
 
@@ -1687,6 +1698,80 @@ Enable the \textit{Automatic} toggle to have the histogram calculate an automati
 \textit{Split output} is a checkbox that enables a diagonal split showing in the compositor.
 \textit{Reset} returns the four curves to their initial state (neutral) as well as the Value/RGB histogram buttons.
 
+The histogram plugin ordinarily applies a value for a single frame.  A
+new feature modifies histogram to show values for a selection of frames.
+You use several frames in a video that you want to use the \textit{average}
+color to determine the color you want the rest of the video to be.  When
+there is a large light or color variation within a range of a few frames,
+you spend a lot of time correcting each frame when it would be better to
+just get an average value to use.  If you want, then you can make a LUT for
+that set of frames instead of each frame.
+
+It works by selecting the area on the timeline for
+which you would like to see the Histogram averaged and then click on the
+\textit{Frames} button in the Histogram plugin.
+The parameters are:
+\textit{Linear to Log} slider: frequency in Linear range to Log range; default is 50\%, but if you want it to be the same as the Videoscope or Histogram Bezier, set the slider all the way to Log.  The variation is by 10\% steps.  Linear generally represents what the eye sees in the real world.  Log is an exponential look where the small numbers are represented more - that is, the leading digit.
+\textit{Frames} button: if a Selection is set on the timeline, the number of frames
+will be calculated and shown in the box next to it.
+\textit{Frame Count box}: type in the number of frames you want to be looked at
+starting at the insert marker or use the up/down counter.
+\textit{Clear Frames} icon: reset the frame count to the default value of 0.
+
+A side note: by using a number of frames, you can get a \textit{dissolve-like
+transition effect}.
+
+\paragraph{Theory:} 
+
+A histogram is a bunch of \textit{bins} (accumulators) that count the number of times a particular pixel channel intensity occurs in an image. Dim are on the left, bright on the right.
+
+The number of bins used depends on the color model bit depth:
+
+\begin{description}
+       \item[Histogram:] 256 for rgb8 and 65536 for all others.
+       \item[Bezier:] 256 for rgb8/yuv8 and 65536 for all others.
+       \item[Scopes:] always uses 65536
+\end{description}
+
+All of the bins are scanned when the graph is plotted.  What is shown
+depends on which plugin is used:
+
+\begin{description}
+       \item[Histogram:] was max of the bins in the pixel range, now is the sum
+       \item[Bezier:] is the max of the bins in the pixel range
+       \item[Scopes:] is the max of the bins in the pixel range
+\end{description}
+
+When the color space and the bin size are the same, all of the values
+increment the indexed bins.  When the color is the result of yuv $\rightarrow$ rgb conversion, the results \textit{spread} if there are more bins than colors.  This is the same effect you see when you turn on \textit{smoothing} in the vectorscope histogram.
+
+The \textit{total} pixels for each value is approximately the same, but the \textit{max} value depends on the color quantization.  More colors increment more bins.  Fewer colors increment fewer bins.  In both cases, the image size has the same
+number of pixels.  The fewer color case increments the used bins, and skips the
+unused bins.  This sums all of the pixels into fewer bins, and the bins have
+higher values. That is the \textit{rgb} vs \textit{yuv} case, fewer vs more bins are used.
+
+To report something more consistent, has been changed the reported value to
+the \textit{sum} of the accumulated counts for the bins reporting a pixel bar on the
+graph. The effect of this is to do this:
+
+\begin{center}
+       \begin{tabular}{ l l c r r }
+               \hline
+               1 &  & & & \\
+               1 &  & & 1 & \\
+               000100 & 3 pixels & vs & 001000& 3 pixels \\
+               \hline
+       \end{tabular}
+\end{center}
+
+On the left, the course color model piles all 3 pixels into one bin.  max
+value 3
+
+On the right, the fine color model puts the counts into 2 bins, max 2, sum 3
+
+So, by reporting the sum the shape of the results are more similar.
+
+
 \subsection{Histogram Bezier / Curves}%
 \label{sub:histogram_bezier_curves}
 
@@ -1729,20 +1814,19 @@ the beginning, to fix their values and prevent clipping.
 
 Curves are generally adjusted by introducing several control points, some to be kept fixed (as anchors) to prevent curve modification beyond them, and others to be dragged to make the desired correction. The power of the curves lies in being able to circumscribe a small interval at will and intervene only on this without involving the remaining parts of the frame. The precision with which you can work is such that you can almost arrive at a secondary color correction.
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.8\linewidth]{ex-bezier.png}
-    \caption{Gain Up/Down; clamp; S-Shaped curve and Luma Key}
-    \label{fig:ex-bezier}
-\end{figure}
-
-
 The most used type of modification is to create a \textit{S curve}. There can be a lot of shapes that use the S curve; the simplest is to create a control point in the shadows, one in the midtones (anchors) and one in the highlights. Moving the highlight point upwards and the shadow point downwards increases the contrast, making the image sharper and improving the color rendering. With the type of \textit{linear} curve you can make hard adjustments, similar to the result of the use of \textit{Color 3 Way}, even if this acts on the color wheel (Hue) while the curves act on individual RGB channels.
 
 The \textit{Polynomial} and \textit{Bézier} types introduce \textit{control handles} that allow for more sophisticated and smoother adjustments. The quality of the result is much better, but they require more experience for their optimal use. Extending the handles away from the control point increases the \textit{radius} of the curve at that point. By varying the angle of the handles we change the \textit{tangent} and thus the curvature of the curve below. The difference between Polynomial and Bézier lies in the underlying mathematics, but for practical purposes the use is similar.
 
 Some examples of the use of curves to demonstrate the variety of possible interventions (figure~\ref{fig:ex-bezier}):
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.8\linewidth]{ex-bezier.png}
+       \caption{Gain Up/Down; clamp; S-Shaped curve and Luma Key}
+       \label{fig:ex-bezier}
+\end{figure}
+
 \begin{itemize}
     \item Scale the image values by increasing the white point or decreasing the white point (gain up and gain down).
         You can decide the scaling value with the formula: $(Input \div Output) = Scale Factor$
@@ -1781,7 +1865,7 @@ Uses a Bayer filter algorithm to interpolate (estimate) missing color informatio
 \subsubsection*{Theory}
 \label{ssub:theory}
 
-Each video has its own framerate. If we want to change it (for \textit{timelapse} or \textit{slowmotion}) the best thing is to shoot the scene with suitable framerate. But even in post production we can do something. The simplest method is to remove some frames to speed up the movie or add some to slow it down (from now on, for simplicity we will consider only the timelapse). Needless to say, the result is not smooth and the viewer will notice it immediately. A better method is to use the interpolation, mediating the pairs of frames that alternate. For example, if we have a sequence of frames $1, 2, 3, 4, 5, 6, 7, 8\dots$ we can make a timelapse mixing frames $1$ and $2$, $3$ and $4$, $5$ and $6$, $7$ and $8$ and so on. So we will have a new sequence of $4$ frames instead of the initial $8$: $\underline{12, 34, 56, 78}\dots$ We will get $50\%$ acceleration but it will always be of bad quality because of the too rough blending between the pairs of frames. Blending can be improved by weighing it differently by $50\% frame 1 + 50\% frame 2$, but the result is still unsatisfactory. Further improvements can be achieved by using $logarithmic$ or $exponential$ interpolation instead of $linear$ interpolation. But the most sophisticated methods that lead to better results are based on \textit{optical flow analysis}. These analyses the movement of circumscribed areas over a given period of time. With this method the intermediate frames do not derive from an approximate blending, but from the calculation of the \textit{vector} of the motion between two frames that determines the displacement (\textit{warping}) of the moving figure in the new intermediate frame. \textit{Interpolate Video} works this way.
+Each video has its own framerate. If we want to change it (for \textit{timelapse} or \textit{slow motion}) the best thing is to shoot the scene with suitable framerate. But even in post production we can do something. The simplest method is to remove some frames to speed up the movie or add some to slow it down (from now on, for simplicity we will consider only the timelapse). Needless to say, the result is not smooth and the viewer will notice it immediately. A better method is to use the interpolation, mediating the pairs of frames that alternate. For example, if we have a sequence of frames $1, 2, 3, 4, 5, 6, 7, 8\dots$ we can make a timelapse mixing frames $1$ and $2$, $3$ and $4$, $5$ and $6$, $7$ and $8$ and so on. So we will have a new sequence of $4$ frames instead of the initial $8$: $\underline{12, 34, 56, 78}\dots$ We will get $50\%$ acceleration but it will always be of bad quality because of the too rough blending between the pairs of frames. Blending can be improved by weighing it differently by $50\% frame 1 + 50\% frame 2$, but the result is still unsatisfactory. Further improvements can be achieved by using $logarithmic$ or $exponential$ interpolation instead of $linear$ interpolation. But the most sophisticated methods that lead to better results are based on \textit{optical flow analysis}. These analyses the movement of circumscribed areas over a given period of time. With this method the intermediate frames do not derive from an approximate blending, but from the calculation of the \textit{vector} of the motion between two frames that determines the displacement (\textit{warping}) of the moving figure in the new intermediate frame. \textit{Interpolate Video} works this way.
 
 \subsubsection*{Practice}
 \label{ssub:practice}
@@ -1873,7 +1957,8 @@ Every time a keyframe is set in a loop effect, the keyframe becomes the beginnin
 \subsection{Motion51}%
 \label{sub:motion51}
 
-This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. Alternatively, the \textit{MotionCV} and \textit{MotionHV} plugins can still be used as the originals, if more control over specific parameters is needed. The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking.
+This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. 
+The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking.
 
 The better results require more samples. Setting the \textit{sample set size} is probably the most important setup change. Also, when computing motion compensation, the entire history of the image motion is important, and so it is desirable to enable the playback setting \textit{play every frame} in order to get good results. When every frame has to be processed, it can be time-consuming. Reasonable results are possible with small sample sets. After setup, the sample size can be increased to produce a high quality rendered result.
 
@@ -1923,49 +2008,230 @@ The \textit{motion tracker} is almost a complete application in itself. The moti
 
 Motion tracker works by using one region of the frame as the region to track (Match Box). It compares this region between $2$ frames to calculate the motion. This region can be defined anywhere on the screen. Once the motion between $2$ frames has been calculated, a number of things can be done with that \textit{motion vector}. It can be scaled by a user value and clamped to a maximum range. It can be thrown away or accumulated with all the motion vectors leading up to the current position.
 
-To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The master layer is where the comparison between $2$ frames takes place. The target layer is where motion is applied either to track or compensate for the motion in the master layer.
+To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The \textit{master} layer is where the comparison between $2$ frames takes place. The \textit{target} layer is where motion is applied either to track or compensate for the motion in the \textit{master} layer (figure~\ref{fig:motion}).
+
+\begin{figure}[ht]
+       \centering
+       \includegraphics[width=0.9\linewidth]{motion.png}
+       \caption{Motion plugin GUI}
+       \label{fig:motion}
+\end{figure}
 
 Motion tracking parameters:
 
 \begin{description}
-    \item[Track translation] Enables translation operations. The motion tracker tracks $X$ and $Y$ motion in the master layer and adjusts $X$ and $Y$ motion in the target layer.
+    \item[Track translation] Enables translation operations. The motion tracker tracks $X$ and $Y$ motion in the \textit{master} layer and adjusts $X$ and $Y$ motion in the \textit{target} layer.
 
     \item[Translation block size] For the translation operations, a block is compared to a number of neighboring blocks to find the one with the least difference. The size of the Match Box to search for is given by this parameter.
     \item[Translation search radius] The size of the area to scan for the translation block.
-    \item[Translation search steps] Ideally the search operation would compare the translation block with every other pixel in the translation search radius. To speed this operation up, a subset of the total positions is searched. Then the search area is narrowed and re-scanned by the same number of search steps until the motion is known to $\frac{1}{4}$ pixel accuracy.
+    \item[Translation search steps] Ideally the search operation would compare the translation block with every other pixel in the \textit{Translation search radius}. To speed this operation up, a subset of the total positions is searched. Then the search area is narrowed and re-scanned by the same number of search steps until the motion is known to $\frac{1}{4}$ pixel accuracy.
+    \item[Translation direction] Tracking translation is possible in any direction, or in horizontal or vertical direction only, depending on this selection.
     \item[Block X, Y] These coordinates determine the center of the translation block based on percentages of the width and height of the image. The center of the block should be part of the image which is visible at all times.
     \item[Maximum absolute offset] The amount of motion detected by the motion tracker is unlimited if this is $100$. If it is under $100$ the amount of motion is limited by that percentage of the image size.
-    \item[Settling speed] The motion detected between every frame can be accumulated to form an absolute motion vector. If the settling speed is $100$ the absolute vector is added to the next frame. If the settling speed is less than $100$ the absolute vector is downscaled by the settling amount before being added to the next frame.
-    \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the master layer and adjusts rotation in the target layer.
-    \item[Rotation block size] For rotation operations a single block is compared to equally sized blocks, each rotated by a different amount. This is the size of the rotation block.
-    \item[Rotation search radius] This is the maximum angle of rotation from the starting frame the rotation scanner can detect. The rotation scan is from this angle counterclockwise to this angle clockwise. Thus the rotation search radius is half the total range scanned.
-    \item[Rotation search steps] Ideally every possible angle would be tested to get the rotation. To speed up the rotation search, the rotation search radius is divided into a finite number of angles and only those angles compared to the starting frame. Then the search radius is narrowed and an equal number of angles is compared in the smaller radius until the highest possible accuracy is achieved. Normally you need one search step for every degree scanned. Since the rotation scanner scans the rotation search radius in two directions, you need two steps for every degree in the search radius to search the complete range.
-    \item[Draw vectors] When translation is enabled, $2$ boxes are drawn on the frame. One box represents the translation block. Another box outside the translation block represents the extent of the translation search radius. In the center of these boxes is an arrow showing the translation between the $2$ master frames. When rotation is enabled, a single box the size of the rotation block is drawn rotated by the amount of rotation detected.
-    \item[Track single frame] When this option is used the motion between a single starting frame and the frame currently under the insertion point is calculated. The starting frame is specified in the Frame number box. The motion calculated this way is taken as the absolute motion vector. The absolute motion vector for each frame replaces the absolute motion vector for the previous frame. Settling speed has no effect on it since it does not contain any previous motion vectors. Playback can start anywhere on the timeline since there is no dependence on previous results. We talk about \textit{Keep shape} and it is the most precise way to calculate the motion vector; but it only works well when the object to be traced does not change along the clip, remaining identical in shape, size and without rotation.
-    \item[Track previous frame] Causes only the motion between the previous frame and the current frame to be calculated (\textit{Follow shape}). This is added to an absolute motion vector to get the new motion from the start of the sequence to the current position. After every frame processed this way, the block position is shifted to always cover the same region of the image. Playback must be started from the start of the motion effect in order to accumulate all the necessary motion vectors. This method is less precise because you have error propagation between frames. However, it is essential when the object changes shape or size or rotates.
-    \item[Previous frame same block] This is useful for stabilizing jerky camcorder footage. In this mode the motion between the previous frame and the current frame is calculated. Instead of adjusting the block position to reflect the new location of the image, like Track Previous Frame does, the block position is unchanged between each frame. Thus a new region is compared for each frame.
-    \item[Master layer] This determines the track which supplies the starting frame and ending frame for the motion calculation. If it is Bottom the bottom track of all the tracks sharing this effect is the master layer. The top track of all the tracks is the target layer.
-    \item[Calculation] This determines whether to calculate the motion at all and whether to save it to disk. If it is \textit{Don't Calculate} the motion calculation is skipped. If it is \textit{Recalculate} the motion calculation is performed every time each frame is rendered. If it is \textit{Save} the motion calculation is always performed but a copy is also saved. If it is \textit{Load}, the motion calculation is loaded from a previous save calculation. If there is no previous save calculation on disk, a new motion calculation is performed.
-    \item[Action] Once the motion vector is known this determines whether to move the target layer opposing the motion vector or following the motion vector. If it is \textit{Do Nothing} the target layer is untouched. If it is \textit{Track\dots} the target layer is moved by the same amount as the master layer. This is useful for matching titles to objects in the frame. If it is \textit{Stabilize\dots} the target layer is moved opposite to the motion vector. This is useful for stabilizing an object in the frame. The motion operations can be accurate to single pixels or subpixels by changing the action setting.
+    \item[Motion settling speed] The motion detected between every frame can be accumulated to form an absolute motion vector. Settling speed determines how fast the accumulated translation fades away, and the image resettles to its actual appearance. If the settling speed is 0\% the total absolute vector is added to the next frame. So every frame that is processed accumulates the whole motion of the past. If the settling speed is 100\% the absolute vector is cancelled completely, adding no past translation to the next frame. If the settling speed is intermediate between 0\% and 100\% the absolute vector is downscaled by (100 $-$ settling amount) before being added to the next frame.
+    \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the \textit{master} layer and adjusts rotation in the \textit{target} layer.    
+    \item[Rotation search radius] This is the maximum angle of rotation from the starting frame the rotation scanner can detect. The rotation scan is from this angle counterclockwise to this angle clockwise. Thus the \textit{Rotation search radius} is half the total range scanned.
+    \item[Rotation search steps] Ideally every possible angle would be tested to get the rotation. To speed up the rotation search, the \textit{Rotation search radius} is divided into a finite number of angles and only those angles compared to the starting frame. Then the search radius is narrowed and an equal number of angles is compared in the smaller radius until the highest possible accuracy is achieved. Normally you need one search step for every degree scanned. Since the rotation scanner scans the \textit{Rotation search radius} in two directions, you need two steps for every degree in the search radius to search the complete range.
+    \item[Rotation center] Usually this parameter is zero, and the rotation search
+    range is $+/-$ \textit{Rotation search radius}.  Otherwise, it shifts the rotation search range to the area of angles between (\textit{Rotation center} $-$ \textit{Rotation search radius}) and (\textit{Rotation center} $+$ \textit{Rotation search radius}).
+    \item[Maximum angle offset] The total accumulated amount of rotation is unlimited
+    if this is 90 degrees.  If it is under 90, the total amount of rotation is
+    limited by the given maximum angle.
+    \item[Rotation settling speed] This parameter determines how fast the accumulated
+    rotation fades away.  Analogously to the \textit{Motion settling speed}, if it is 0\%,
+    the total accumulated rotation is added to the next frame, and every frame
+    accumulates the whole rotation of the past.  If the settling speed is 100\%,
+    no past rotation is added to the next frame.  If the settling speed is
+    intermediate between 0\% and 100\%, the amount of accumulated rotation is
+    downscaled by (100 $-$ settling amount) before being added to the next frame.
+    \item[Motion noise level] This parameter allows to compensate such undesirable
+    behavior when motion tracker wildly springs away because some outlying area
+    of a noisy picture becomes accidentally more "similar" to the reference
+    picture than the right one.  If noise level is set to 0\% (its normal value),
+    then it is not taken into account at all.  When it is set to 100\%, then
+    similarity of the match block contents is totally ignored, and the current
+    motion vector will be zero.  An intermediate value between 0\% and 100\%
+    defines the proportional noise level between minimum and maximum difference
+    of all examined match block positions.  From all such positions whose
+    difference is found below noise level, that one is chosen which has the
+    shortest translation relative to the reference frame.
+    \item[Rotation noise level] This parameter has similar meaning to the \textit{Motion noise level}.  It influences rotation tracking.  If set to 0\% (its normal value),
+    it is not taken into account.  The 100\% setting completely suppresses
+    rotation detection.  An intermediate value between 0\% and 100\% defines the
+    proportional noise level between minimum and maximum difference of all
+    examined rotated match blocks from that of the reference picture.  From all
+    rotation angles whose match block differences are found below noise level,
+    that one is chosen which has the minimum rotation angle relative to the
+    reference frame.    
+    \item[Draw vectors] When translation is enabled, $2$ boxes are drawn on the frame. One box represents the translation block. Another box outside the translation block represents the extent of the \textit{Translation search radius}. In the center of these boxes is an arrow showing the translation between the $2$ master frames. When rotation is enabled, a single box the size of the rotation block is drawn rotated by the amount of rotation detected.
+    \item[Two pass tracking] Although this parameter can be enabled at any time, it is useful only while simultaneous tracking both translation and rotation, when
+    the rotation amount is large.  The normal tracking algorithm firstly
+    examines translation, then rotation.  However, comparison of a strongly
+    tilted picture with the reference one can lead to rather inaccurate
+    determination of the translation vector.  The subsequent determination of
+    rotation will be also inexact because of the preceding translation error.  The
+    second tracking pass, if enabled, refines translation and rotation.
+    
+    If motion and/or rotation noise level is set above 0\% and \textit{Two pass tracking}
+    is enabled, then both noise levels affect the first tracking pass only.
+    During the second tracking pass of two pass tracking both noise levels are
+    ignored.
+    
+    It should be noted that two pass tracking is not twice slower than the usual
+    single pass tracking.  Actually it is only about 40\% slower.  As the second
+    pass serves only for motion refinement, it starts from the reduced search
+    range for block positions and rotation angles.  And, as the first pass only
+    yields an approximate position, which will be later refined during the
+    second pass, it skips subpixel position search and examines rotation angles
+    with the accuracy reduced to 1 degree.
+    \item[Track single frame] When this option is used the motion between a single
+    starting frame and the frame currently under the insertion point is
+    calculated.  The starting frame is specified in the \textit{Frame number} box.  The
+    motion calculated this way is taken as the absolute motion vector.  The
+    absolute motion vector for each frame replaces the absolute motion vector
+    for the previous frame.  \textit{Settling speed} has no effect on it since it does
+    not contain any previous motion vectors.  Playback can start anywhere on the
+    timeline since there is no dependence on previous results.  We talk about
+    \textit{Keep shape} and it is the most precise way to calculate the motion vector;
+    but it only works well when the object to be traced does not change along
+    the clip, remaining identical in shape, size and luminance.
+    
+    Strong rotation of the picture can also have a bad impact on the tracking
+    accuracy.  If it is the case, accuracy can be significantly improved by
+    enabling \textit{Two pass tracking}.
+    
+    \item[Frame number] The number of the reference frame used for motion tracking in
+    the \textit{Track single frame} mode is specified in this input field.  Frame
+    number is set as the 0-based absolute number starting from the very
+    beginning of the whole timeline.  Instead of manual calculating, it is
+    possible to get \textit{Frame number} directly from the current cursor position by
+    pressing the \textit{Get current} button.
+    
+    \item[Get current] Pressing this handy button provides a convenient way to set the
+    \textit{Frame number} parameter to the value of the current cursor position.
+    
+    \item[Add (loaded) offset from tracked frame] This toggle can help when the tracked
+    object changes shape, leaves the screen area or becomes obscured by other
+    objects somewhere in the middle of the \textit{Motion} effect.  Sometimes it can help
+    also if a strong rotation causes the motion tracker to miss the right
+    tracked object and wildly spring away.
+    
+    To overcome this problem, one has to define two keyframes: the first one at
+    the start of the \textit{Motion} effect, the second shortly before the problematic
+    location in the clip.  At the first keyframe one defines the \textit{Motion} effect
+    parameters as usual, the \textit{Add offset} toggle being switched off.  At the
+    second keyframe the match block can be redefined to cover another region of
+    the picture which remains visible during the following part of the effect.
+    The \textit{Frame number} parameter should be set several frames before position of this second keyframe, and the \textit{Add offset} toggle switched on.
+    
+    After defining the two keyframes (even more can be added in the similar way)
+    one switches at all the defined keyframes \textit{Calculation} mode to \textit{Save coords
+    to tracking file}, \textit{Action} mode to \textit{Do Nothing}, rewinds the timeline cursor
+    to the beginning of the \textit{Motion} effect, and starts playback.  The determined
+    motion vectors will be written to the tracking file, the \textit{Add offset}
+    parameter having no effect during the \textit{save} stage.
+    
+    After playback finishes and all the relevant motion vectors are saved in the
+    tracking file, one switches at all the defined keyframes \textit{Calculation} mode to
+    \textit{Load coords from tracking file}, \textit{Action} mode to whatever one needs, rewinds again to the beginning of the \textit{Motion} effect and starts playback or
+    rendering.  After reaching the second keyframe, where \textit{Add offset} was
+    switched on, the program continues to follow the second object adding the
+    total motion and rotation, accumulated so far.
+    
+    Of course, the \textit{Add offset} toggle can be used in the \textit{Track single frame} mode only.  In the other tracking modi such a technics is unnecessary.
+    \item[Track previous frame] Causes only the motion between the previous frame and
+    the current frame to be calculated (\textit{Follow shape}).  This is added to an
+    absolute motion vector to get the new motion from the start of the sequence
+    to the current position.  After every frame processed this way, the block
+    position is shifted to always cover the same region of the image.  Playback
+    must be started from the start of the \textit{Motion} effect in order to accumulate
+    all the necessary motion vectors.  This method is less precise because you
+    have error propagation between frames.  However, it is essential when the
+    object changes shape, size or luminance.  Possible inaccuracies caused by
+    rotation of the picture can partly be reduced by enabling \textit{Two pass tracking}
+    \item[Previous frame same block] This is useful for stabilizing jerky camcorder footage. In this mode the motion between the previous frame and the current frame is calculated. Instead of adjusting the block position to reflect the new location of the image, like \textit{Track Previous Frame} does, the block position is unchanged between each frame. Thus a new region is compared for each frame.
+    \item[Master layer] This determines the track which supplies the frames for the
+    motion calculation.  If it is \textit{Bottom} the bottom track of all the tracks
+    sharing this effect is the \textit{master} layer.  Then the top track of all the
+    tracks is the \textit{target} layer.  And vice versa, if the \textit{master} layer is \textit{Top},
+    then the \textit{target} layer is bottom.
+    \item[Calculation] This determines whether to calculate the motion at all and
+    whether to save it to disk.  If it is \textit{Don't Calculate} the motion calculation is skipped.  If it is \textit{Recalculate} the motion calculation is performed every  time each frame is rendered.  If it is \textit{Load coords from tracking file}, the motion vectors are loaded  from a previous \textit{save} calculation.  If the previous \textit{save} calculation does not provide the data for the currently processed frames, a new motion  calculation is performed for that frames.  If \textit{Calculation} mode is \textit{Save coords to tracking file} the motion vectors can be still loaded from disk if the previously
+    calculated data exist.  Otherwise, a new motion calculation is performed,
+    and the calculated motion vectors are saved.
+    \item[Tracking file] This parameter determines the name of the file where the
+    motion data are saved and/or loaded from.  By default it is \texttt{/tmp/motion}
+    but it can have any name and reside anywhere on the disk.  \textit{Tracking file} is
+    a text file where each line contains four numbers: the absolute frame number
+    (0-based integer), the X and Y translation displacements of subpixel
+    precision (a subpixel is $\frac{1}{4}$ pixel in size, and to give integer values of X and Y these subpixel coords are multiplied by 4), and the rotation angle in
+    degrees (as a floating point value).  The user may have different tracking
+    files for different timeline regions, it is possible to do any manipulations
+    on them if necessary and even manually edit in a text editor.
+    \item[Generate tracking file name] This handy pushbutton suggests a tracking file
+    name based on the name of the current asset.  It helps to maintain more
+    different tracking files with unique but predictable names used in the same
+    project.  When tracking file name is changed (either via the pushbutton or
+    after entering it in the corresponding input field), the contents of that
+    files (both the old and the new ones) remains unchanged.
+    \item[Clear tracking file contents] The values and meaning of the saved motion data depend on such a bunch of parameters, they can be even edited manually, so
+    one can hardly predict whether the outdated motion vectors are to be reset
+    or left untouched.  Therefore the existing motion data are never altered
+    implicitly (only newly calculated data may be added).  And, should the user
+    need to reset them here and right now, it is possible to clear the given
+    tracking file contents explicitly by pressing this pushbutton.
+    
+    As protection against accident clearing tracking file contents, right before
+    clearing the program ensures closing the current tracking file and renames
+    it to the same name with the suffix \texttt{.old}.  This way, the user can undo an erroneous clearing action by manual restoring the saved file.
+    \item[Action] Once the motion vector is known this determines whether to move the \textit{target} layer opposing the motion vector or following the motion vector. If it is \textit{Do Nothing} the \textit{target} layer is untouched. If it is \textit{Track\dots} the \textit{target} layer is moved by the same amount as the \textit{master} layer. This is useful for matching titles to objects in the frame. If it is \textit{Stabilize\dots} the \textit{target} layer is moved opposite to the motion vector. This is useful for stabilizing an object in the frame. The \textit{Motion} operations can be accurate to single pixels or subpixels by changing the \textit{Action} setting.
 \end{description}
 
+As motion tracking works consistently only in the \textit{Play every frame} mode,
+the corresponding info on the current playback mode is shown in the bottom
+right edge of the effect dialog.  The needed playback mode is defined in the
+Preferences dialog of \CGG{} main window.
+
 \subsubsection*{Secrets of motion tracking}
 \label{ssub:secrets_motion_tracking}
 
-Since it is a very slow effect, there is a method to applying the motion tracker to get the most out of it. First disable playback for the track to do motion tracking on. Then drop the effect on a region of video with some motion to track. Then rewind the insertion point to the start of the region. \textit{Set Action $\rightarrow$ Do Nothing}; \textit{Set Calculation $\rightarrow$ Don't calculate}; Enable \textit{Draw vectors}. Then enable playback of the track to see the motion tracking areas.
+Since it is a very slow effect, there is a method to applying the motion tracker to get the most out of it. First disable playback for the track to do motion tracking on. Then drop the effect on a region of video with some motion to track. Then rewind the insertion point to the start of the region. Set \textit{Action $\rightarrow$ Do Nothing}; set \textit{Calculation $\rightarrow$ Don't calculate}; enable \textit{Draw vectors}. Then enable playback of the track to see the motion tracking areas.
 
-Enable which of translation motion or rotation motion vectors you want to track. By watching the compositor window and adjusting the \textit{Block x,y} settings, center the block on the part of the image you want to track. It is advisable to choose elements that have evident edges in the $x$ and $y$ directions because the calculations are made on these coordinates. Then set \textit{search radius}, \textit{block size} and \textit{block coordinates} for translation and rotation.
+Enable which of translation motion or rotation motion vectors you want to track. By watching the compositor window and adjusting the \textit{Block X, Y} settings, center the block on the part of the image you want to track. It is advisable to choose elements that have evident edges in the $x$ and $y$ directions because the calculations are made on these coordinates. Then set \textit{search radius}, \textit{block size} and \textit{block coordinates} for translation and rotation.
 
-Once this is configured, set the calculation to \textit{Save coords} and do test runs through the sequence to see if the motion tracker works and to save the motion vectors. Next, disable playback for the track, disable \textit{Draw vectors}, set the motion action to perform on the target layer and change the calculation to \textit{Load coords}. Finally enable playback for the track.
+Once this is configured, set \textit{Calculation} to \textit{Save coords} and do test runs through the sequence to see if the motion tracker works and to save the motion vectors. Next, disable \textit{Draw vectors}, set the motion \textit{Action} to perform on the \textit{target} layer and change \textit{Calculation} to \textit{Load coords}.
 
-When using a single starting frame to calculate the motion of a sequence (Keep Shape), the starting frame should be a single frame with the least motion to any of the other frames. This is rarely frame $0$. Usually it is a frame near the middle of the sequence. This way the search radius need only reach halfway to the full extent of the motion in the sequence.
+When using a single starting frame to calculate the motion of a sequence (\textit{Keep Shape}), the starting frame should be a single frame with the least motion to any of the other frames. This is rarely frame $0$. Usually it is a frame near the middle of the sequence. This way the search radius need only reach halfway to the full extent of the motion in the sequence. The suitable reference frame number can be defined conveniently via the \textit{Get current} pushbutton.
 
-If the motion tracker is used on a render farm, Save coords and previous frame mode will not work. The results of the save coords operation are saved to the hard drives on the render nodes, not the master node. Future rendering operations on these nodes will process different frames and read the wrong coordinates from the node filesystems. The fact that render nodes only visualize a portion of the timeline also prevents previous frame from working since it depends on calculating an absolute motion vector starting on frame $0$.
+Summarizing:
 
-\subsubsection*{2 pass motion tracking}
-\label{ssub:2_pass_motion_tracking}
+\begin{enumerate}
+       \item In the Master Layer create and save the tracking file:
+       \begin{itemize}
+               \item \textit{Draw vectors}: checked
+               \item \textit{Action}: Do Nothing
+               \item \textit{Calculation}: Save coords to Tracking File
+       \end{itemize}
+       \item Clone the track, which becomes the Target Layer. The \textit{Motion} plugin will also be copied.
+               \begin{itemize}
+                       \item \textit{Draw vectors}: unchecked
+                       \item \textit{Action}: Do Nothing
+                       \item \textit{Calculation}: Load coords from Tracking File
+               \end{itemize}
+       \item Add a third track to place the video of the object to be superimposed. Add the shared effects of the \textit{Motion} plugin taken from the Master Layer.
+               \begin{itemize}
+                       \item \textit{Draw vectors}: unchecked
+                       \item \textit{Action}: Track Subpixel
+                       \item \textit{Calculation}: Load coords from Tracking File
+               \end{itemize}
+\end{enumerate}
 
-The method described above is \textit{two-pass motion tracking}. One pass is used just to calculate the motion vectors. A second pass is used to apply the motion vectors to the footage. This is faster than a single pass because errors in the motion vector calculation can be discovered quickly. This also allows the motion tracking to use a less demanding colormodel like \textit{RGB888} in the scanning step and a more demanding colormodel like \textit{RGB Float} in the action step. The scanning step takes much longer than action. This has the disadvantage of not being practical for extremely long sequences where some error is acceptable and the picture quality is low to begin with, like stabilizing camcorder footage.
+If the motion tracker is used on a render farm, \textit{Save coords} and \textit{Previous frame} mode will not work. The results of the \textit{Save coords} operation are saved to the hard drives on the render nodes, not the master node. Future rendering operations on these nodes will process different frames and read the wrong coordinates from the node filesystems. The fact that render nodes only visualize a portion of the timeline also prevents \textit{Previous frame} from working since it depends on calculating an absolute motion vector starting on frame $0$.
+
+\subsubsection*{2 step motion tracking}
+\label{ssub:2_step_motion_tracking}
+
+The method described above is \textit{two-step motion tracking}. One step is used just to calculate the motion vectors. A second step is used to apply the motion vectors to the footage. This is faster than a single pass because errors in the motion vector calculation can be discovered quickly. This also allows the motion tracking to use a less demanding colormodel like \textit{RGB888} in the scanning step and a more demanding colormodel like \textit{RGB Float} in the action step. The scanning step takes much longer than action. This has the disadvantage of not being practical for extremely long sequences where some error is acceptable and the picture quality is low to begin with, like stabilizing camcorder footage.
 
 The slower method is to calculate the motion vectors and apply them simultaneously. This method can use one track as the motion vector calculation track and another track as the target track for motion vector actions. This is useful for long sequences where some error is acceptable.
 
@@ -1973,20 +2239,47 @@ The slower method is to calculate the motion vectors and apply them simultaneous
 \label{ssub:pre_processing_shot}
 
 \begin{enumerate}
-    \item The motion plugin uses \textit{luminance} to do its own calculations, so we can edit the clip to enhance contrast and make it easier to calculate motion vectors. You can even create a copy of the monochrome clip and optimize it for the plugin. It lengthens the time but minimizes errors. The saved file can then be used for the original clip.
+    \item The \textit{Motion} plugin uses \textit{luminance} to do its own calculations, so we can edit the clip to enhance contrast and make it easier to calculate motion vectors. You can even create a copy of the monochrome clip and optimize it for the plugin. It lengthens the time but minimizes errors. The saved file can then be used for the original clip.
     \item  Correct lens distortion, especially if the object to be tracked moves to the edges of the frame.
-    \item Study the entire shot well: if necessary, divide it into many edits, each with its own Motion plugin. For example, if the object to be tracked leaves the frame or is covered by some other element or changes in shape, size or rotation. You can try to use the \textit{Offset Tracking} technique described below.
+    \item Study the entire shot well: if necessary, divide it into many edits, each with its own \textit{Motion} plugin. For example, if the object to be tracked leaves the frame or is covered by some other element or changes in shape, size or rotation. You can try to use the \textit{Offset Tracking} technique described below.
 \end{enumerate}
 
 \subsubsection*{Using blur to improve motion tracking}
 \label{ssub:blur_improve_motion_tracking}
 
-With extremely noisy or interlaced footage, applying a blur effect before the motion tracking can improve accuracy. Either save the motion vectors in a tracking pass and disable the blur for the action pass or apply the blur just to the master layer. You can even use a copy of the track formed only by the channels of Red + Green, because the channel of Blue is the noisiest. Another trick is to enlarge the Match Box to minimize the effect of noise.
+With extremely noisy or interlaced footage, applying a blur effect before the motion tracking can improve accuracy. Either save the motion vectors in a tracking pass and disable the blur for the action pass or apply the blur just to the \textit{master} layer. You can even use a copy of the track formed only by the channels of Red + Green, because the channel of Blue is the noisiest. Another trick is to enlarge the Match Box to minimize the effect of noise.
 
 \subsubsection*{Using histogram to improve motion tracking}
 \label{ssub:histogram_improve_motion_tracking}
 
-A histogram is almost always applied before motion tracking to clamp out noise in the darker pixels. Either save the motion vectors in a tracking pass and disable the histogram for the action pass or apply the histogram just to the master layer. Finally, you can use the histogram to increase contrast.
+A histogram is almost always applied before motion tracking to clamp out noise in the darker pixels. Either save the motion vectors in a tracking pass and disable the histogram for the action pass or apply the histogram just to the \textit{master} layer. Finally, you can use the histogram to increase contrast.
+
+\subsubsection*{Using two pass tracking to improve accuracy and stability}
+\label{ssub:two_pass_improve_accuracy}
+
+A common source of inaccuracy when tracking single frame is rotation of the
+picture.  Ideally, the motion vectors should be determined by checking all
+possible rotation angles at every possible match block location.  But such
+an algorithm would be unacceptably slow.  Therefore the program finds for
+each frame the translation vector first, and then the rotation angle.  A
+strong rotation can prevent motion tracker from finding accurate translation
+displacements.  Then the subsequent rotation search will be also inaccurate
+because translation has been estimated not sufficiently well.  In the \textit{Two
+pass tracking} algorithm the first, coarse estimation of translation and
+rotation is followed by the second, refinement pass yielding more exact
+motion vectors.
+
+Sometimes, particularly if the amount of rotation is large, the translation
+tracker can lose its right object and wildly spring away.  Then the
+following strategy may help.
+
+Firstly switch \textit{Two pass tracking} off, \textit{Track rotation} off, set \textit{Motion noise level} to zero.  Switch \textit{Draw vectors} on, \textit{Action: Do Nothing}, \textit{Calculation: Save coords to tracking file}.  Start playback and watch if the motion tracker has problems finding the right displacements (you can also examine the tracking file afterwards on the existence of discontinuities in coordinates).  If there are such, try to increase \textit{Motion noise level}, let's say, to 10\% or 20\%, \textit{clear tracking file contents}, repeat playback and look if tracker does not spring away any more.  A single pass translation tracking can be relatively fast, while tracking rotation is expensive.
+
+When a sufficient motion noise level is found, switch \textit{Track rotation} on, \textit{Two
+pass tracking} on, \textit{clear tracking file contents} and perform the complete
+translation + rotation tracking pass.  As the refinement pass uses
+restricted search area and ignores the noise level parameters, the result
+should be more stable and accurate.
 
 \subsubsection*{Possible sources of errors}
 \label{ssub:possible_sources_errors}
@@ -2006,15 +2299,15 @@ A histogram is almost always applied before motion tracking to clamp out noise i
 
 This is an explanation of how to stabilize a video as in the case of a video taken from a vehicle.
 
-First select on the timeline the part of the footage you want to stabilize, using the in and out points. Then apply the motion effect on that part of the video. Select the \textit{Previous frame same block} option. That option is recommended for stabilizing jerky camcorder footage. Its goal is not to \textit{follow} an object. The block stays exactly at the same place during all the effect length.
+First select on the timeline the part of the footage you want to stabilize, using the in and out points. Then apply the \textit{Motion} effect on that part of the video. Select the \textit{Previous frame same block} option. That option is recommended for stabilizing jerky camcorder footage. Its goal is not to \textit{follow} an object. The block stays exactly at the same place during all the effect length.
 
-Enlarge the block and select almost half the size of the video. Select the \textit{Stabilize subpixel} option as it will give a finer stabilization. Reduce the \textit{Maximum absolute offset} value to limit the stabilization amplitude. You probably prefer to get a non-perfect stabilization on some places on the video rather than having a very large black border on one side of the picture during big shakes. Set the \textit{Translation search steps} value to $128$. Increasing that value will not give a better result and only considerably increases the rendering time. Make sure the \textit{Draw vectors} option is selected, and render the part of the video where the motion effect is applied.
+Enlarge the block and select almost half the size of the video. Select the \textit{Stabilize subpixel} option as it will give a finer stabilization. Reduce the \textit{Maximum absolute offset} value to limit the stabilization amplitude. You probably prefer to get a non-perfect stabilization on some places on the video rather than having a very large black border on one side of the picture during big shakes. Set the \textit{Translation search steps} value to $128$. Increasing that value will not give a better result and only considerably increases the rendering time. Make sure the \textit{Draw vectors} option is selected, and render the part of the video where the \textit{Motion} effect is applied.
 
 If the result is good, deselect the \textit{Draw vectors} option so that the block and vectors are not drawn anymore on the video. Then, render your video to a \texttt{.dv} file, and import it into your project. You will notice the video is stabilized but there are black borders which appear on sides of the frame. You have to \textit{zoom in} and define projector keyframes to move the projector around the screen, in order to remove those black borders. The more your footage is jerky, the more you have to zoom in to discard the black borders. That is why the result is better with HDV footage than with DV footage.
 
-An interesting side note about \textit{add offset} usage is explained next\protect\footnote{credit Pierre Marc Dumuid}
+An interesting side note about \textit{Add offset} usage is explained next\protect\footnote{credit Pierre Marc Dumuid}
 
-To stabilize video, the motion plugin uses a \textit{tracking frame} to which to track to and a region within that frame to track (generally an object in the background) in the current frame.  When the region is obscured, often by something in the foreground or by leaving the screen, then the motion compensation would fail, and the video jumps all over the place.
+To stabilize video, the \textit{Motion} plugin uses a \textit{tracking frame} to which to track to and a region within that frame to track (generally an object in the background) in the current frame.  When the region is obscured, often by something in the foreground or by leaving the screen, then the motion compensation would fail, and the video jumps all over the place.
 
 You set a second region to track, and then \textit{add offset}.
 
@@ -2047,7 +2340,7 @@ C - has only object2 visible
 \subsection{Motion 2 Point}%
 \label{sub:motion_2_point}
 
-Motion stabilization using 2 pass tracking. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
+Motion plugin using 2 \textit{Match box} for tracking. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
 
 \subsection{Motion Blur}%
 \label{sub:motion_blur}
@@ -2058,16 +2351,6 @@ Uses X/Y camera automation vectors to apply a linear blur trailing camera direct
     \item[Steps] number of blur steps to be used in the calculation. Increasing the number takes more CPU.
 \end{description}
 
-\subsection{MotionCV}%
-\label{sub:motioncv}
-
-Motion tracking/stabilization from the community version of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
-
-\subsection{MotionHV}%
-\label{sub:motionhv}
-
-Updated motion tracking/stabilization of 2017 from the original author of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
-
 \subsection{Oil painting}%
 \label{sub:oil_painting}
 
@@ -2122,7 +2405,9 @@ Key Presses for using the Perspective plugin:
 
 Note that the red color lines in the box show the composer boundary.
 
-In order to see endpoints that go off the screen, you can use the zoom slider which changes only the zoom view and does nothing else. The slider uses a logarithmic scale ranging from $\frac{1}{100} to 100$.
+In order to see endpoints that go off the screen, you can use the zoom slider which changes only the zoom view and does nothing else. The slider uses a logarithmic scale ranging from $\frac{1}{100} to 100$.  Although not shown in the 
+image here, each endpoint is labeled in yellow with 1-4 and the Current X
+endpoint is shown in the menu to make it easier to tell which point is in play.
 
 Figure~\ref{fig:perspective01} show the results of the 4 different smoothing options.
 
@@ -2133,6 +2418,15 @@ Figure~\ref{fig:perspective01} show the results of the 4 different smoothing opt
     \label{fig:perspective01}
 \end{figure}
 
+Just a side note about the possibility of ending up with a divide by 0 case when manipulating
+the endpoints.  Sometimes this results in a single frame anomaly but you can workaround this
+by setting the X value for the middle keyframe of a series to just a little more than 0,
+such as .01 so that dividing by 0 is avoided. The actual cause of the problem is that the
+interpolated X1..X4 auto coordinates used by perspective eventually have x1==x2, x3==x4, so
+that all points x are scaled by zero. Another solution is to tweak the frame count to an even
+number, so that the center is not over the point where x1==x2, x3==x4, or perturb the midpoint
+position a little so that the answers are not exactly zero.
+
 \subsection{Polar}%
 \label{sub:polar}
 
@@ -2162,6 +2456,13 @@ Most cameras take the light coming into the lens, and convert that into $3$ sets
 
 Radial blur is a \textit{Bokeh} effect that creates a whirlpool which simulates a swirling camera. You can vary the location, type, and quality of the blur.
 
+\begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=0.8\linewidth]{radial.png}
+       \caption{For clarity of presentation only 2 fields are shown}
+       \label{fig:radial}
+\end{figure}
+
 \begin{description}
     \item[X,Y] center of the circle of movement.
     \item[Angle] angle of motion in one direction.
@@ -2171,12 +2472,6 @@ Radial blur is a \textit{Bokeh} effect that creates a whirlpool which simulates
 
 Figure~\ref{fig:radial} has the parameters: $Angle=-35$ and $Steps=2$.
 
-\begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=0.8\linewidth]{radial.png}
-    \caption{For clarity of presentation only 2 fields are shown}
-    \label{fig:radial}
-\end{figure}
 
 \subsection{ReframeRT}%
 \label{sub:reframert}
@@ -2200,11 +2495,11 @@ to interpolation.
 
 Stretch mode multiplies the current frame number of its output by the \textit{scale factor} to arrive at the frame to read from its input. The scaling factor is not entered directly but using a number of \textit{input} frames to be divided by the number of \textit{output} frames.
 
-\vspace{1ex} \texttt{Scale factor = Input frames / Output frames}
+\vspace{1ex} \texttt{Scale factor (SF) = Input frames / Output frames}
 
-\[\frac{1}{8} \Rightarrow scale\, factor = 0.125 \qquad (slowmotion)\]
+\[\frac{1}{8} \Rightarrow scale\, factor = 0.125 \qquad (slow\, motion)\]
 
-That is, one input frame of the original movie corresponds to $8$ new output frames originated by interpolation. It is the opposite with regard to \textit{fast play}.
+For slow motion we leave 1 for the frames of the input and we increase the number of frames of the output (for example putting 8 for the output we have slow motion $8\times$, with $SF=\frac{1}{8}=0.125$). For fast motion we leave 1 for the output and we increase the number for the input (for example 8 to have $8\times$, with $SF=\frac{8}{1}=8$). Another possibility is to put the frame rate of the media (e.g 120 fps) in the input and the project frame rate in the output (e.g 30 fps) or the opposite.
 
 The stretch mode has the effect of changing the length of output video by the inverse of the scale factor. If the scale factor is greater than $1$, the output will end before the end of the sequence on the timeline. If it is less than $1$, the output will end after the end of the sequence on the timeline. The ReframeRT effect must be lengthened to the necessary length to accommodate the scale factor. Change the length of the effect by clicking on the endpoint of the effect and dragging.
 
@@ -2217,6 +2512,8 @@ in stretch mode with a value less than $1$.
 
 \textit{Example:} you have a clip that you want to put in slow motion. The clip starts at $33.792\, seconds$ and ends at $39.765$. The clip is $5.973\, seconds$ long. You want to play it at $\frac{4}{10}^{ths}$ normal speed. You divide the clip length by the playback speed ($5.973\div0.4$) to get a final clip length of $14.9325\,seconds$. You create an in point at the start of your clip: $33.792\,seconds$. You put an out point $14.9325\,seconds$ later, at $48.7245\,seconds$ ($33.792 + 14.9325$). You attach a \texttt{ReframeRT} effect, set it to $0.4$ and stretch. You change the out point at $48.7245$ to an in point. You start your next clip after the slow motion effect at the $48.7245$ out point. You can do this without making any calculations by first applying the effect and then lengthening or shortening the bar to where the stretched movie ends.
 
+Now in the timeline we have the affected part of the plugin where we see the slow/fast effect, and the continuation of the timeline from where the plugin ends. We then have to select the interval on which the plugin acts and render it or transform it into a nested clip or nested asset. In this way we can replace or overlap it with the part of the timeline that originally included all of the part we wanted to slow down/speed up.
+
 \subsubsection*{Downsample}%
 \label{ssub:downsample}
 
@@ -2228,10 +2525,11 @@ Downsample mode changes the frame rate of the input as well as the number of the
 \label{ssub:other_important_points}
 
 \begin{itemize}
-    \item ReframeRT uses the fps indicated in \texttt{Settings$\rightarrow$ Format$\rightarrow$ fps} project and not the \texttt{fps} of the assets.
+    \item ReframeRT uses the fps indicated in \texttt{Settings $\rightarrow$ Format $\rightarrow$ fps} project and not the \texttt{fps} of the assets.
     \item It can be associated with Nested Clips.
-    \item As an alternative to ReframeRT you can use the \textit{speed curve}, or change the framerate in \texttt{Resources$\rightarrow$ info} and in the \texttt{Project}.
+    \item As an alternative to ReframeRT you can use the \textit{speed curve}, or change the framerate in \texttt{Resources $\rightarrow$ info} and in the \texttt{Project}.
     \item It is keyframmable.
+    \item ResampleRT with the same settings is used to act on audio tracks.
 \end{itemize}
 
 \subsection{Reroute}%
@@ -2546,6 +2844,11 @@ Inside the time average effect is an accumulation buffer and a divisor. A number
     \item[Don’t buffer frames] in order to represent the accumulation of only the specified number of frames, the time average retains all the previous frames in memory and subtracts them out as it plays forward. It would run out of memory if it had to accumulate thousands of frames. By disabling subtraction the previous frames are not stored in memory and only the average function is affected by the frame count.
 \end{description}
 
+\subsection{TimeBlur}%
+\label{sub:timeblur}
+
+The TimeBlur plugin provides a way to blur a number of \textit{Frames}.
+
 \subsection{Timefront}%
 \label{sub:timefront}
 
@@ -2613,9 +2916,9 @@ If the video is displayed on a consumer TV, the outer border is going to be crop
 \label{ssub:some_recently_added_options}
 
 \begin{description}
-    \item[Drag] initial default checkbox is \textit{off} so that the Title plugin will work as it always has.
+    \item[Drag] initial default checkbox is \textit{off} so that the Title plugin will work as it always has. With Drag active, we can create a box that works as a region to the title; we can resize and translate it as we wish, and we can add a background image to it. See later how to use the background image.
     \begin{description}
-        \item[Anchors] When you turn on the Drag feature, nine different anchors/handles will appear on compositor window. The \textit{middle anchor} allows you to drag your title wherever you want in the compositor window ($X, Y$ coordinates). The other 8 handles, drawn as arrows in each corner and in the middle of each side, let you change the size of the drag area box so that your title is within that area if it fits and as it is directed.  If you need to clear the Drag enabled, you can easily do this with \textit{Allow keyframe spanning} whose use is described in \nameref{sec:allow_keyframes_spanning}.
+        \item[Anchors] When you turn on the Drag feature, nine different anchors/handles will appear on compositor window. The \textit{middle anchor} allows you to drag your title wherever you want in the compositor window ($X, Y$ coordinates). The other 8 handles, drawn as arrows in each corner and in the middle of each side, let you change the size of the drag area box so that your title is within that area if it fits and as it is directed.  If you need to clear the Drag enabled, you can easily do this with \textit{Allow keyframe spanning} whose use is described in \nameref{sec:allow_keyframes_spanning}. Another way to reset the box to default, i.e. the entire frame, is to set X and Y to 0 and W and H to the frame resolution (e.g. 1920x1080 for FullHD).
         \item[W/H] the values in these 2 boxes specify the size of the drag area box measured in pixels as shown in the compositor window. You can set these manually and if you can't see the location of your box or find your handles, set them to zero because $0$ sets it to the same as the width/height of the media.
         The Drag effect ignores all boundaries, including the \textit{Title Safe Region} of the Compositor so that if you drag your titles off the screen, it will look like they disappeared completely. Reset X and Y to reasonable values to have it reappear. The Title \textit{text}, \textit{background}, and \textit{pngs} are applied on a single layer so that they will drag together as an entity. All of the Title capabilities work in conjunction with dragging so if you want to justify the title, you can still use the \textit{Left/Center/Right/Top/Mid/Bottom} within the drag area. Be sure to turn off Drag when rendering or the box will show in the video; keep in mind that drag bars do not appear until there is some text in the text box and you can not actually drag until the Title window controls are available.
     \end{description}
@@ -2704,7 +3007,7 @@ Figure~\ref{fig:title03}.
 \paragraph{Special Characters (< > / \textbackslash \#)} Besides the previously described <, >, and / characters, there are two special characters: backslash “\textbackslash”, and the pound sign “\#”. The backslash character is used for two things. With the advent of the attribute name and value, your line may become quite long so you can use “\textbackslash” followed by the carriage return to continue on the next line as if it is just a single line. It also can be used to designate that the following character does not represent the beginning of an attribute. For example, if you want to use the opening angle character “<“ as a title character, precede it with the backslash character. The pound sign, “\#”, designates the whole line as a comment or if in the middle of the line, then the rest of the line is a comment (this includes the carriage return).
 
 \begin{description}
-    \item[Background] in this box you can keyin the name of a file of the type that \CGG{} accepts and use that file as a background for your Title characters. This will be seen in the compositor window on top of the video that is loaded in the main track canvas. Besides typing in the filename, you must also check the checkbox. This makes it easy to turn it \textit{On} and \textit{Off} to see what it looks like. Next to the background box is a \textit{Loop} checkbox. If the background file takes less time than the main track canvas video to run, you can turn on the loop checkbox so that it runs over and over again to match the time size of your video.
+    \item[Background] in this box you can keyin the name of a file of the type that \CGG{} accepts and use that file as a background for your Title characters (media video or image). This will be seen in the compositor window on top of the video that is loaded in the main track canvas. Besides typing in the filename, you must also check the checkbox. This makes it easy to turn it \textit{On} and \textit{Off} to see what it looks like. Next to the background box is a \textit{Loop} checkbox. If the background file takes less time than the main track canvas video to run, you can turn on the loop checkbox so that it runs over and over again to match the time size of your video. By default the background image will occupy the whole frame, but if we activate drag mode and create a box of the desired size, the image will occupy only the box leaving the rest of the frame visible.
     \item[Stroker] to add \textit{pen strokes} to the text letters, adjust the stroke width numerically. This looks particularly nice on certain fonts and with a negative adjustment of the \textit{Drop shadow}.
     \item[Unicode Insertion] if you want to enter a special character like the mathematical \textit{summation} symbol, you can use the unicode equivalent to do so. Press Ctrl-Shift-U followed by $2022$ and a carriage return is an example of the bullet. Refer to section \hyperref[sec:textbox_non_std_character_unicode]{17.5} for details.
     \item[Popup Helper] put your cursor where you want to add an attribute, then right mouse will bring up a list of the available attributes for you to choose, along with a submenu to choose from. The program will insert that attribute for you and all you have to add is a value when required! (see figure~\ref{fig:title02}).
@@ -2857,36 +3160,95 @@ This effect applies a traditional \textit{darkroom} technique, the so called \te
 \subsection{Videoscope}%
 \label{sub:videoscope}
 
-Videoscope summarizes intensity and color on a calibrated display. The Videoscope can be used in conjunction with other \CGG{} plugins such as \textit{Color 3 Way}, \textit{YUV}, \textit{Brightness}, \textit{Color Balance} or \textit{Histogram} to accurately correct video for contrast, clarity, conformance (to normalize various videos shot under different light settings), or for cinematic purposes. The human eye is not specialized to match precise level of light and color, but Videoscope is. Videoscope contains three displays: the waveform scope and the vectorscope, plus the histograms (figure~\ref{fig:videoscope01}). Instead of applying the plugin to the tracks/edits we want to examine, we can use the Videoscope button in the Composer and Viewer windows. The Videoscope menu window has many options. From the pulldown menu (\textit{Scopes}) we can choose between two histograms (Histogram and Histogram RGB); three waveforms (Waveform, Waveform RGB and Waveform Ply) and two vectorscopes (Vectorscope and VectorWheel). The \textit{Smooth} checkbox serves to make the graph more homogeneous while the \textit{sliders} allow for varying the 'solidity' of the dots shown. You can get to the subpixel
-level for precision.
+Videoscope summarizes intensity and color on a calibrated display. The Videoscope can be used in conjunction with other \CGG{} plugins such as \textit{Color 3 Way}, \textit{YUV}, \textit{Brightness}, \textit{Color Balance} or \textit{Histogram} to accurately correct video for contrast, clarity, conformance (to normalize various videos shot under different light settings), or for cinematic purposes. The human eye is not specialized to match precise level of light and color, but Videoscope is. Videoscope contains three displays: the waveform scope and the vectorscope, plus the histograms (figure~\ref{fig:videoscope01}). Instead of applying the plugin to the tracks/edits we want to examine, we can use the Videoscope buttons in the Composer and Viewer windows. \includegraphics[height=\baselineskip]{scope.png} In this way the monitors act on the frame indicated by the insertion point, without taking into account the stack of tracks or on which edits to apply the plugin.
+
+The Videoscope menu window has many options.
+
+\paragraph*{Scopes:} we can choose between two histograms:
+
+\begin{itemize}[noitemsep]
+       \item \textit{Histogram}
+       \item \textit{Histogram RGB}
+\end{itemize}
+three waveforms: 
+\begin{itemize}[noitemsep]
+       \item \textit{Waveform}
+       \item \textit{Waveform RGB} (aka RGB Parade)
+       \item \textit{Waveform Ply} (which superimposes the three Waveform RGB graphs in a single view.)
+\end{itemize}
+and two vectorscopes: 
+\begin{itemize}[noitemsep]
+       \item \textit{Vectorscope}
+       \item \textit{VectorWheel}
+\end{itemize}
 
 \begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=1.0\linewidth]{videoscope01.png}
-    \caption{GUI of the Videoscope. You see Histogram, RGB Parade and Vectorscope}
-    \label{fig:videoscope01}
+       \centering
+       \includegraphics[width=1.0\linewidth]{videoscope01.png}
+       \caption{GUI of the Videoscope. You see Histogram, RGB Parade and Vectorscope}
+       \label{fig:videoscope01}
 \end{figure}
 
+\paragraph*{Settings:} It is divided into two sections. The upper section contains two items:
+
+\begin{description}
+       \item[Smooth:] serves to make the graph more homogeneous, improving its visualization.
+       \item[Refresh on Stop ON:] [checked -- only for Transport buttons] scopes are updated when you stop playback at a given location. Instead, they are locked at the start position while you playback. This saves system resources and makes playback smoother. By dragging the cursor the scopes are updated in realtime.
+       \item[Refresh on Stop OFF:] [unchecked -- for Transport buttons and dragging cursor] the display of the scopes is synchronized with the playback. Every variation of the graphs is in realtime. There may be some decrease in fps during playback.
+       \item[Refresh on Release:] This works for the Viewer and Compositor windows. Scopes are not updated during playback. The update occurs only when you stop playback, that is at the final position (either by dragging the cursor or using the Transport buttons). When in the timeline, if you drag on the TimeBar or reposition in the TimeBar in either Drag and Drop or Cut and Paste mode, the release of the button also will update the Scopes.  This saves system resources and makes playback smoother.  Because there is no update when playing in the main window, you can still easily get a videoscope update simply by moving the mouse to the Compositor and a single click there will update the scopes without changing the frame (as long as Click to Play is not enabled).
+\end{description}
+
+ The lower section, called \textit{VectorWheel Grids}, it is only active when VectorWheel is set up in Scopes pull-down and contains four entries (figure~\ref{fig:videoscope06}):
+
+ \begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=1.0\linewidth]{videoscope06.png}
+       \caption{Pull-down Settings}
+       \label{fig:videoscope06}
+ \end{figure}
+ \begin{description}
+       \item[None:] It only shows the colour wheel, without any superimposed graticula.
+       \item[All:] Shows the most complete grid that allows precise and useful measurements. It also shows the skintones area.
+       \item[Hue:] Show a more minimal grid.  It also shows the I-Line.
+       \item[IQ:] Show shows only I-Line and Q-Line.
+ \end{description}
+
+
+You can create custom grids. These are raster .png images of adequate resolution and must be put in:
+
+\begin{lstlisting}[style=sh]
+[your cinelerra path]/bin/plugins/scopes/custom_grid.png
+\end{lstlisting}
+
+More information in the later section on Vectorscope.
+
+\paragraph*{Sliders:} allow for varying the \textit{solidity} of the dots shown in Waveforms and Vectorscope. You can get to the subpixel level for precision. They are accompanied by Reset buttons that restore them to default values.
+
+
+
 \subsubsection*{Waveform/RGB Parade/Waveform Ply}%
 \label{ssub:waveform_rgb_parade_ply}
 
-The \textit{Waveform Scope} displays image intensity (luminance) versus image $X$ position. The \textit{Waveform RGB} (or RGB Parade) displays image RGB intensity versus image $X$ position (one graph per channel). The \textit{Waveform Ply} shows the three channels in a single graph. The Waveform Scope appears on the left side or in the middle of the Videoscope window. The display is calibrated vertically from $0\%$ intensity (black) at the bottom up to $100\%$ intensity (white) at the top. Each column of pixels in the image corresponds to one column of pixels in the Waveform Scope (figure~\ref{fig:videoscope02}). Note that the height of the values of a waveform/RGB Parade corresponds exactly to the values on the $x\, axis$ in the \textit{histogram}. A vertical/horizontal correspondence is therefore obtained.
+The \textit{Waveform Scope} displays image intensity (luminance) versus image $X$ position. The \textit{Waveform RGB} displays image RGB intensity versus image $X$ position (one graph per channel). The \textit{Waveform Ply} shows the three channels in a single graph. The Waveform Scope appears on the left side or in the middle of the Videoscope window. The display is calibrated vertically from $0\%$ intensity (black) at the bottom up to $100\%$ intensity (white) at the top. Each column of pixels in the image corresponds to one column of pixels in the Waveform Scope (figure~\ref{fig:videoscope02}). Note that the height of the values of a waveform/waveform RGB corresponds exactly to the values on the $x\, axis$ in the \textit{histogram}. A vertical/horizontal correspondence is therefore obtained.
 
 \begin{figure}[hbtp]
     \centering
     \includegraphics[width=1.0\linewidth]{videoscope02.png}
-    \caption{Colortest 75\% with RGB Parade (left) and Waveform (right)}
+    \caption{Colortest 75\% with Waveform RGB (left) and Waveform (right)}
     \label{fig:videoscope02}
 \end{figure}
 
-On the left is shown RGB Parade: instead of the color shadows as in figure~\ref{fig:videoscope01}, we have lines representing the color bar test at $75\%$. They are pure colors, so all pixels have the same value. In fact, they are all at the level of $75\%$ except for the $100\%$ white band and the $0\%$ black band. In the waveform on the right, we have the same behavior with regard to luminance: the white band is $100\%$; the black band is $0\%$ and all the others $75\%$.
+On the left is shown waveform RGB: instead of the color shadows as in figure~\ref{fig:videoscope01}, we have lines representing the color bar test at $75\%$. They are pure colors, so all pixels have the same value. In fact, they are all at the level of $75\%$ except for the $100\%$ white band and the $0\%$ black band. In the waveform on the right, we have the same behavior with regard to luminance: the white band is $100\%$; the black band is $0\%$ and all the others $75\%$.
 
-The Waveform scope helps correct image light levels for contrast range or for conforming light levels on various scenes originally shot on different light settings (figure~\ref{fig:videoscope03}). The same can be done with RGB Parade or the convenient overlapping representation (Waveform Ply).
+If we left-click on the graph with the mouse, we will see a crosshair that we can place exactly where we want to measure. We can read the precise values of X and Luminance (Value) in the pop-up box that appears at the bottom right (figure~\ref{fig:videoscope03}).
+
+The Waveform scope helps correct image light levels for contrast range or for conforming light levels on various scenes originally shot on different light settings. The same can be done with Waveform RGB or the convenient overlapping representation (Waveform Ply).
 
 \begin{figure}[hbtp]
     \centering
     \includegraphics[width=1.0\linewidth]{videoscope03.png}
-    \caption{Examples of waveform, waveform RGB and waveform Ply}
+    \caption{Examples of waveform (with crosshair and the coordinates' box), waveform RGB and waveform Ply}
     \label{fig:videoscope03}
 \end{figure}
 
@@ -2895,10 +3257,10 @@ The Waveform scope helps correct image light levels for contrast range or for co
 
 \begin{enumerate}
     \item Add the \textit{Brightness/Contrast}, \textit{Histogram}, \textit{Color 3 Way} or another video adjustment effect on your track/edit.
-    \item Add the Videoscope effect on the track below. Make sure that it is placed below so it can see the adjustment effect's results. If it is not, right-click and move it down. Or do not use the plugin but activate the Videoscope button in the Compositor window.
+    \item Add the Videoscope effect on the track. Make sure that it is placed below in the stack of effects, so it can see the adjustment effect's results. If it is not, right-click and move it down. Or do not use the plugin but activate the Videoscope button in the Compositor window.
     \item Show both the effect and Videoscope.
     \item Adjust the contrast while observing the waveform to match the desired light level.
-    \item Precise adjustments can be made by measuring the values on the waveform with the crosshair (by clicking LMB, and reading numeric values on top left of the window) and reporting these numbers in the effects window (\textit{Histogram Bézier}, for example).
+    \item Precise adjustments can be made by measuring the values on the waveform with the crosshair (by clicking LMB, and reading numeric values on the pop-up box) and reporting these numbers in the effects window (\textit{Histogram Bézier}, for example).
 \end{enumerate}
 
 For example, if you are looking for maximum contrast range, adjust the \textit{Brightness/Contrast} levels to align the darkest point on the scope with the $0\%$ level and the brightest portion with $100\%$. Anything above $100\%$ is over saturated. Limits may be highlighted with checkbox controls.
@@ -2921,21 +3283,16 @@ If you are producing a video for NTSC television broadcast, keep the intensity b
 \subsubsection*{Vectorscope}%
 \label{ssub:Vectorscope}
 
-The Vectorscope displays \textit{hue} (angle on the color wheel) and \textit{saturation} (radius). Each pixel in the source image is drawn as a point on the color wheel. The distance from the center is the color saturation. Gray values are close to the center, and high saturation values are near the perimeter ($100\%$). In the center there is pure white ($0\%$). By clicking with the mouse on the color wheel a radius and circle 
-will appear whose values of hue and saturation are shown at the top left of the window, similar to the values of $X$ and luminance of the Waveform and RGB Parade (figure~\ref{fig:videoscope05}).
+The Vectorscope displays \textit{hue} (angle on the color wheel) and \textit{saturation} (radius). Each pixel in the source image is drawn as a point on the color wheel. The distance from the center is the color saturation. Gray values are close to the center, and high saturation values are near the perimeter ($100\%$). In the center there is pure white ($0\%$). By clicking with the mouse on the color wheel a radius and circle will appear whose values of hue and saturation are shown in the  pop-up box at the bottom right of the window, similar to the values of $X$ and luminance of the Waveform and RGB Parade (figure~\ref{fig:videoscope05}).
 
 \begin{figure}[hbtp]
        \centering
-       \includegraphics[width=0.9\linewidth]{videoscope05.png}
-       \caption{Vectorscope (with I-Line) and VectorWheel (with IQ-Hue-Tics reticule)}
+       \includegraphics[width=0.8\linewidth]{videoscope05.png}
+       \caption{Vectorscope (with H/S pop-up box) and VectorWheel (with 3 default grids)}
        \label{fig:videoscope05}
 \end{figure}
 
-Note that when you choose \textit{VectorWheel} from \textit{Scopes} pulldown, the \textit{Overlay} pulldown
-appears where you can choose between different grids. In addition, any number of user-supplied grid patterns
-can be added in the form of a square image of type png.  The user can design and maintain individual grid
-overlays for various purposes.  The user would keep their overlays in a safe spot on their disk and make
-a copy of them in the \{cinelerra\_pathname\}/bin/plugins/scopes every time a new version of \CGG{} is installed.
+Note that when you choose \textit{VectorWheel} from \textit{Scopes} pulldown, you can choose between different grids in the \textit{Settings} pulldown. In addition, any number of user-supplied grid patterns can be added in the form of a square image of type png.  The user can design and maintain individual grid overlays for various purposes.  The user would keep their overlays in a safe spot on their disk and make a copy of them in the \texttt{\{cinelerra\_pathname\}/bin/plugins/scopes} every time a new version of \CGG{} is installed.
 
 Generally the Vectorscope has the following uses:
 
@@ -2952,7 +3309,7 @@ Generally the Vectorscope has the following uses:
 \begin{figure}[hbtp]
     \centering
     \includegraphics[width=0.9\linewidth]{videoscope04.png}
-    \caption{Balancing a yellow dominace tint}
+    \caption{Balancing a yellow color cast}
     \label{fig:videoscope04}
 \end{figure}
 
@@ -2987,18 +3344,18 @@ Modify the 411 yuv to look like 420 color space instead. If the edit to which th
 \subsection{YUVShift}%
 \label{sub:yuvshift}
 
+\begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=0.8\linewidth]{yuvshift.png}
+       \caption{Before and after YUVShift adjusting}
+       \label{fig:yuvshift}
+\end{figure}
+
 This effect is used for YUV input video from older cameras using $3$ sensors. It is possible to have misalignment of the $3$ sets of numbers: \textit{Y}, which represents the luminance or brightness component, and for \textit{U} and \textit{V} representing the chrominance (color) components. If they were misaligned in the video, you can use \textit{YUVShift} to realign. To move a specific component up/down, modify the \textit{dy} value using the slider bar in the RGBShift window. To move a component left/right, modify the corresponding \textit{dx} value. With the Clear buttons we can bring the slider to default values without affecting the other parameters. If you are using an RGB color space, you will want to use the \textit{RGBShift} effect instead.
 
 Figure~\ref{fig:yuvshift} (top) shows the blue \textit{U} component aligned too far to the left. And the red \textit{V} component is misaligned too far to the right. Note the \textit{U\_dx} current slider bar set to $0$ as shown by the yellow box value in the YUVShift plugin window. All components are currently at zero.
 A corrected video image is shown in the bottom. Now the red and blue colors are correctly aligned. Note how \textit{U\_dx} is now at $+20$ and \textit{V\_dx} is now negative to realign the image.
 
-\begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=0.8\linewidth]{yuvshift.png}
-    \caption{Before and after YUVShift adjusting}
-    \label{fig:yuvshift}
-\end{figure}
-
 \subsection{Zoom Blur}%
 \label{sub:zoom_blur}
 
@@ -3118,7 +3475,7 @@ cin/plugins/opencv/stylizeobj.plugin
     \item create a temporary directory on your computer
     \item \texttt{cd} that-directory
     \item \texttt{tar -xf} location-of-the-tarball-you-downloaded
-    \item \texttt{cp plugins/*obj.plugin <see below for your location>/.} (note the period on the end)
+    \item \texttt{cp plugins/opencv/*obj.plugin <see below for your location>/.} (note the period on the end)
     \item Start \CGG{} and look for the six plugins in Video Effects
     \item To reverse this, simply delete the six plugin files (for example:
 
@@ -3131,7 +3488,8 @@ The location for most User installs is:
 
 Location for some System installs is:
 
-\hspace{4em}\texttt{/usr/lib/cin/plugins/} (most ubuntu distros)\\
+\hspace{4em}\texttt{/usr/lib/cin/plugins/} (most ubuntu distros)
+
 \hspace{4em}\texttt{/usr/lib64/cin/plugins/} (Leap distro)
 
 \subsection{How to Build OpenCV Plugins}%
@@ -3481,6 +3839,7 @@ The following is a list of the integrated audio plug-ins.
   the data.
 \item [F\_astats]~\\Shows time domain statistics about audio
   frames.
+\item [F\_asubboost]~\\Boost subwoofer frequencies.
 \item [F\_atempo]~\\Adjusts audio tempo.
 \item [F\_atrim]~\\Pick one continuous section from the input,
   drop the rest.
@@ -3565,6 +3924,7 @@ The following is a list of the integrated audio plug-ins.
 
 The following is a list of the integrated video plug-ins.
 \begin{description}
+\item [F\_addroi]~\\Mark a region of interest in a video frame.
 \item [F\_amplify]~\\Amplify changes between successive video
   frames.
 \item [F\_atadenoise]~\\Apply an Adaptive Temporal Averaging
@@ -3572,6 +3932,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_avgblur]~\\Apply average blur filter.
 \item [F\_bbox]~\\Compute bounding box for each frame.
 \item [F\_bench]~\\Benchmarks part of a filtergraph.
+\item [F\_bilateral]~\\Apply bilateral filter, spatial smoothing while preserving edges.
 \item [F\_bitplaneoise]~\\Measure bit plane noise.
 \item [F\_blackdetect]~\\Detect video intervals that are
   (almost) black.
@@ -3580,6 +3941,7 @@ The following is a list of the integrated video plug-ins.
   settings you are able to change the power and the radius of the
   boxblur applied to luma, chroma and alpha.
 \item [F\_bwdif]~\\Deinterlaces the input image.
+\item [F\_cas]~\\Apply Contrast Adaptive Sharpen filter to video.
 \item [F\_chromakey]~\\Turns a certain color into
   transparency. Operates on YUV colors.
 \item [F\_ciescope]~\\Video CIE scope.
@@ -3598,6 +3960,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_cropdetect]~\\Auto-detect crop size.
 \item [F\_curves]~\\Adjust components curves.
 \item [F\_datascope]~\\Video data analysis.
+\item [F\_dblur]~\\Apply Directional blur filter.
 \item [F\_dctdnoiz]~\\Denoise frames using $2D DCT$.
 \item [F\_deband]~\\Debands video.
 \item [F\_deblock]~\\Deblocks video.
@@ -3631,7 +3994,13 @@ The following is a list of the integrated video plug-ins.
   on top of an image which is commonly used in filmmaking. The concept
   is that you align the key elements in the image using this grid at
   the intersection of the lines or along and within the
-  vertical/horizontal lines.
+  vertical/horizontal lines.  In general the bottom and right sides of
+  the video will not be bordered by the grid.  So for example, if you
+  only add the effect to the video, there will be a frame around the
+  video with the size of the \textit{thickness}
+  but the frame is only visible on the top and left and not on the bottom
+  or left side.  You can get a line to show by using a larger thickness
+  and specifying a negative value for x and y of -2, -3, or more. 
 \item [F\_edgedetect]~\\Detects and draws edge.
 \item [F\_elbg]~\\Apply posterize effect, using the ELBG
   algorithm.
@@ -3656,6 +4025,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_fspp]~\\Applies Fast Simple Post-processing filter.
 \item [F\_gblur]~\\Apply Gaussian Blur filter.
 \item [F\_gradfun]~\\Debands video quickly using gradients.
+\item [F\_gradients]~\\Draws a transparent gradient.
 \item [F\_graphmonitor]~\\Show various filtergraph stats.
 \item [F\_greyedge]~\\Estimates scene illumination by grey
   edge assumption.
@@ -3697,6 +4067,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_mandelbrot]~\\Render a Mandelbrot fractal.
 \item [F\_mcdeint]~\\Applies motion compensating
   deinterlacing.
+\item [F\_median]~\\Pick median pixel from rectangle defined by radius.
 \item [F\_mestimate]~\\Generate motion vectors.
 \item [F\_mpdecimate]~\\Remove near-duplicate frames.
 \item [F\_mptestsrc]~\\Generate various test pattern.
@@ -3717,6 +4088,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_perms]~\\Set permissions for the output video frame.
 \item [F\_perspective]~\\Corrects the perspective of video.
 \item [F\_phase]~\\Phases shift fields.
+\item [F\_photosensitivity]~\\Filter out photosensitive epilepsy seizure-inducing flashes.
 \item [F\_pixscope]~\\Pixel data analysis for checking color
   and levels. It will display sample values of color channels.
 \item [F\_pp]~\\Filters video using libpostproc.
@@ -3740,6 +4112,8 @@ The following is a list of the integrated video plug-ins.
 \item [F\_sab]~\\Applies shape adaptive blur.
 \item [F\_scale]~\\Scale the input video size and/or convert
   the image format.
+\item [F\_scdet]~\\Detect video scene change.
+\item [F\_scroll]~\\Scroll input video horizontally and/or vertically by constant speed.
 \item [F\_separatefields]~\\Split input video frames into
   fields.
 \item [F\_setparams]~\\Force field, or color property for the
@@ -3749,6 +4123,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_showpalette]~\\Display frame palette.
 \item [F\_shuffleframes]~\\Shuffles video frames.
 \item [F\_shuffleplanes]~\\Shuffles video planes.
+\item [F\_sierpinski]~\\Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
 \item [F\_signalstats]~\\Separates statistics from video
   analysis.
 \item [F\_smartblur]~\\Blurs the input video without impacting
@@ -3766,15 +4141,19 @@ The following is a list of the integrated video plug-ins.
 \item [F\_tblend]~\\Blend successive frames.
 \item [F\_testsrc]~\\Generate test pattern.
 \item [F\_testsrc2]~\\Generate another test pattern.
+\item [F\_thistogram]~\\Compute and draw a color distribution histogram for the input video across time.
 \item [F\_tile]~\\Tile several successive frames together.
 \item [F\_tinterlace]~\\Performs temporal field interlacing.
 \item [F\_tlut2]~\\Compute and apply a lookup table from 2
   successive frames.
+\item [F\_tmedian]~\\Pick median pixels from successive frames.
 \item [F\_tmix]~\\Mix successive video frames.
 \item [F\_transpose]~\\Transposes input video.
 \item [F\_unsharp]~\\Sharpen or blur the input videlo.
+\item [F\_untile]~\\Untile a frame into a sequence of frames.
 \item [F\_uspp]~\\Applies Ultra Simple/Slow Post-processing
   filter.
+\item [F\_v360]~\\Convert 360 videos between various formats.
 \item [F\_vaguedenoiser]~\\Applies a Wavelet based Denoiser.
 \item [F\_vectorscope]~\\Video vectorscope.
 \item [F\_vflip]~\\Flips the input video vertically.
@@ -3790,6 +4169,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_weave]~\\Weaves input video fields into frames.
 \item [F\_xbr]~\\Scales the input using $xBR$ algorithm.
 \item [F\_yadif]~\\Deinterlaces the input image.
+\item [F\_yaepblur]~\\Yet another edge preserving blur filter.
 \item [F\_yuvtestsrc]~\\Generate YUV test pattern.
 \item [F\_zoompan]~\\Applies Zoom \& Pan effect.
 \end{description}