Histogram

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Audiolevels mode)
m (link to RGB histograms; rephrase color 'modes'->'formats')
(13 intermediate revisions by one user not shown)
Line 1: Line 1:
{{Template:FuncDef|Histogram(clip ''clip'' [, string ''mode''] [, float ''factor''])}}
+
{{FuncDef
 +
|Histogram(clip ''clip'' [, string ''mode''] [, float ''factor''])
 +
}}
  
 
A multipurpose audio/video analysis tool, which supports the following '''''modes''''':
 
A multipurpose audio/video analysis tool, which supports the following '''''modes''''':
* [[#Classic_mode|Classic]] (default) and [[#Levels_mode|Levels]] histogram mode;  
+
* [[#Classic_mode|Classic]] (waveform) mode, the default;
* [[#Color_mode|Color]] and [[#Color2_mode|Color2]] vectorscope mode;
+
* [[#Levels_mode|Levels]] ''YUV'' histogram mode;  
 +
* [[#Color_mode|Color]] and [[#Color2_mode|Color2]] vectorscope modes;
 
* [[#Luma_mode|Luma]] special viewing mode;
 
* [[#Luma_mode|Luma]] special viewing mode;
 
* [[#Audiolevels_mode|Audiolevels]] audio level meter; and  
 
* [[#Audiolevels_mode|Audiolevels]] audio level meter; and  
Line 12: Line 15:
 
----
 
----
 
=== Classic mode ===
 
=== Classic mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram
 +
</div>
  
[[Image:histogram_classic.jpg]]
+
[[File:histogram_classic.jpg]]
  
This will add a per-line luminance graph (which is actually called a Waveform Monitor) on the right side of the video.  
+
Available in [[YUV]] color formats only. For [[RGB]] sources, try [[Histograms_in_RGB_%26_CMY#HistogramRGBParade|'''HistogramRGBParade''']].  
  
The left side of the graph represents luma=0 and the right side represents luma=255. The non-valid CCIR-601 ranges are shown in a brown/yellowish color, and a greenish line represents Y=128.
+
This will add a per-line luminance graph (usually called a [[wikipedia:Waveform_monitor|Waveform Monitor]]) on the right side of the video, increasing clip.[[Clip_properties|Width]] by 256. The left side of the graph represents luma=0 and the right side represents luma=255. Values outside the [[Limiter|valid CCIR-601 range]] are shown with a brown/yellowish color background; a greenish line represents Y=128.  
  
Available in YUV mode.
+
If you prefer to see luma=0 on bottom and luma=255 on top, use this:
 +
<div {{BoxWidthIndent|24|4}} >
 +
[[TurnRight]].Histogram.[[TurnLeft]]
 +
</div>
 +
 
 +
::[[File:Histogram_classic-v2-turned.jpg]]
 +
 
 +
</div>
  
  
 
----
 
----
 
=== Levels mode ===
 
=== Levels mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("levels")
 +
</div>
  
 
[[File:Histogram-vortex-levels.jpg]]
 
[[File:Histogram-vortex-levels.jpg]]
  
This mode will display three histograms on the right side of the video frame. This will show the distribution of the Y, U and V components in the current frame.
+
Available in all [[YUV]] [[Planar|planar]] color formats, except [[Y8]]. For [[RGB]] sources, try [[Histograms_in_RGB_%26_CMY#HistogramRGBLevels_.2F_HistogramCMYLevels|'''HistogramRGBLevels''']].
  
The top graph displays the luma (Y) distribution of the frame, where the left side represents Y=0 and the right side represents Y=255. The valid CCIR601 range has been indicated by a slightly different color and Y=128 has been marked with a dotted line. The vertical axis shows the number of pixels for a given luma (Y) value. The middle graph displays the U component, and the bottom graph displays the V component.
+
This mode will display three histograms on the right side of the video frame, increasing clip.[[Clip_properties|Width]] by 256. This will show the distribution of the ''Y'', ''U'' and ''V'' components in the current frame.
  
The ''factor'' option (100.0 by default) specifies the way how the graphs are displayed. It is specified as percentage of the total population (that is number of luma or chroma pixels in a frame). For example, Histogram("Levels", 1.5625) will achieve a 1/64th cap.
+
The top graph displays the ''Y'' (luma) distribution of the frame, where the left side represents Y=0 and the right side represents Y=255. Values outside the [[Limiter|valid CCIR601 range]] have been indicated with faded colors; Y=128 has been marked with a dotted line. The vertical axis shows the number of pixels for a given luma (Y) value.  
  
'''NOTE''', "factor" is an ''unnamed ''optional argument; <br style="line-height:60%" />
+
The middle graph is similar, and displays the ''U'' component; the bottom graph displays the ''V'' component.
<code>Histogram(mode="levels", '''factor='''2.5)</code> will not work, but <code>Histogram("levels", 2.5)</code> works fine.
+
  
Available in all planar modes, except [[Y8]].
+
The {{FuncArg|factor}} option (100.0 by default) specifies how the histograms are displayed, exaggerating the vertical scale. It is specified as percentage of the total population (that is number of luma or chroma pixels in a frame). For example:
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("levels", 0.5)
 +
</div>
 +
 
 +
[[File:Histogram-vortex-levels-v3-levels0,5.jpg]]
 +
 
 +
'''NOTE''', {{FuncArg|factor}} is an ''unnamed ''optional argument; <br style="line-height:60%" />
 +
<code>Histogram(mode="levels", '''factor='''0.5)</code> will not work, but <code>Histogram("levels", 0.5)</code> works fine.
 +
</div>
  
  
 
----
 
----
 
=== Color mode ===
 
=== Color mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("color")
 +
</div>
  
 
[[File:Histogram-vortex-color.jpg]]
 
[[File:Histogram-vortex-color.jpg]]
  
This mode will display the chroma values (U/V color placement) in a two dimensional graph (which is called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip. At the same time it is a histogram. The whiter a pixel in the vectorscope, the more pixels of the input clip correspond to that pixel (that is the more pixels have this chroma value).
+
Available in all [[YUV]] [[Planar|planar]] color formats, except [[Y8]].
 +
 
 +
This mode will display the chroma values (U/V color placement) in a two dimensional graph (called a [[wikipedia:Vectorscope|vectorscope]]) on the right side of the video frame, increasing clip.[[Clip_properties|Width]] by 256. It can be used to read of the [[wikipedia:Hue|hue]] and [[wikipedia:Colorfulness#Saturation|saturation]] of a clip. At the same time it is a histogram: the whiter a pixel in the vectorscope, the more pixels of the input clip correspond to that chroma value. The lighter background denotes the [[Limiter|valid CCIR-601 range]].
 +
 
  
<div>
+
<div id="colorvector">
 
{| border="0"  
 
{| border="0"  
 
|
 
|
[[File:Labeled-vector6b.png|left|Histogram(mode="color") output with added labels]]  
+
[[File:Labeled-vector6b.png|left|Histogram("color") output with added labels]]  
 
|style="vertical-align:top; margin-right:10%"|  
 
|style="vertical-align:top; margin-right:10%"|  
The U component is displayed on the horizontal (X) axis, with the leftmost side being U=0 and the rightmost side being U=255. The V component is displayed on the vertical (Y) axis, with the top representing V=0 and the bottom representing V=255.
+
Labels have been added to this vectorscope image for explication purposes, showing the ''U'' and ''V'' axes and degrees of hue. Spots have also been added, showing 75% saturated [[ColorBars]] (clockwise from 0°: blue, magenta, red, yellow, green and cyan).  
  
The position of a white pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the square. At the center of the square, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the square.
+
The ''U'' component is displayed on the horizontal (X) axis, with U=0 on the left and U=255 on the right. The ''V'' component is displayed on the vertical (Y) axis, with V=0 on the top and V=255 on the bottom.
 +
 
 +
The position of a spot on the scope corresponds to a chroma value from the input clip. The graph can be used to read ''hue'' and ''saturation''. As the hue of a color changes, the spot moves around the center. As the saturation changes, it moves in or out from the center. The center is where ''U'' and ''V'' equal 128, the saturation is zero and the corresponding pixel has no color. As you increase the saturation, the spot moves towards the edge.  
 
|}</div>
 
|}</div>
 +
At U=255, V=128 the hue is zero (blue) and the saturation is at maximum, that is, <br>
 +
 +
::saturation = sqrt( (U-128)<sup>2</sup> + (V-128)<sup>2</sup> ) or 127 <br>
  
Available in all planar modes except Y8.
+
When turning hue clockwise 90 degrees, the chroma is given by U=128, V=255 (red, approximately). Keeping the hue constant and decreasing the saturation, means that we move from the circle to the center of the vectorscope. Thus the color flavor remains the same, only it fades slowly to [[GreyScale|greyscale]].
 +
</div>
  
  
 
----
 
----
 
=== Color2 mode ===
 
=== Color2 mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("color2")
 +
</div>
  
 
[[File:Histogram-vortex-color2.jpg]]
 
[[File:Histogram-vortex-color2.jpg]]
  
This mode will display the pixels in a two dimensional graph (called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip.
+
Available in all [[YUV]] [[Planar|planar]] color formats, except [[Y8]].  
  
The U component is displayed on the horizontal (X) axis, with the leftmost side being U=0 and the rightmost side being U=255. The V component is displayed on the vertical (Y) axis, with the top representing V=0 and the bottom representing V=255. The grey square denotes the valid CCIR-601 range.  
+
This mode will display the pixels in a two dimensional graph (called a [[wikipedia:Vectorscope|vectorscope]]) on the right side of the video frame, increasing clip.[[Clip_properties|Width]] by 256. It can be used to read of the [[wikipedia:Hue|hue]] and [[wikipedia:Colorfulness#Saturation|saturation]] of a clip.
  
The position of a pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the circle. At the center of the circle, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the circle. A color wheel is plotted and divided into six hues (red, yellow, green, cyan, blue and magenta) to help you reading of the hue values. Also every 15 degrees a white dot is plotted.
+
The ''U'' component is displayed on the horizontal (X) axis, with the leftmost side being U=0 and the rightmost side being U=255. The ''V'' component is displayed on the vertical (Y) axis, with the top representing V=0 and the bottom representing V=255. The white square denotes the [[Limiter|valid CCIR-601 range]].
  
At U=255, V=128 the hue is zero (which corresponds to blue) and the saturation is maximal, that is, <code>sqrt( (U-128)^2 + (V-128)^2 ) = 127</code>. When turning clock-wise, say 90 degrees, the chroma is given by U=128, V=255 (which corresponds to red). Keeping the hue constant and decreasing the saturation, means that we move from the circle to the center of the vectorscope. Thus the color flavor remains the same (namely red), only it changes slowly to [[GreyScale|greyscale]].  Etc ...
 
  
Available in all planar modes except Y8.  
+
<div id="colorvector">
 +
{| border="0"
 +
|
 +
[[File:Labeled-vector-color2.png|left|Histogram("color2") output with added labels]]
 +
|style="vertical-align:top; margin-right:10%"| As [[#colorvector|above]], labels and [[ColorBars]] dots have been added to this vectorscope image for explication purposes.
 +
 
 +
The position of a spot on the scope corresponds to a chroma value from the input clip, exactly as with <code>[[#Color mode|Histogram("color")]]</code>, but the spot is brighter and in color. 
 +
 
 +
'''Color2 mode''' is also different from '''Color mode''' in that the background is black instead of shaded, and a ''color wheel'' around the circumference of the scope has been added, divided into six hues (clockwise from 0°: blue, magenta, red, yellow, green and cyan), with white tick marks at 15 degree intervals.  
 +
|}</div>
 +
</div>
  
  
 
----
 
----
 
=== Luma mode ===
 
=== Luma mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("luma")
 +
</div>
  
 
[[Image:histogram_modeluma.jpg]]
 
[[Image:histogram_modeluma.jpg]]
  
This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws.  
+
Available in [[YUV]] [[Planar|planar]] and [[YUY2]] color formats.  
  
Available in planar and YUY2 modes.
+
This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws.
 +
</div>
  
  
 
----
 
----
 
=== Audiolevels mode ===
 
=== Audiolevels mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("audiolevels")
 +
</div>
  
 
[[Image:histogram_audiolevels.jpg]]
 
[[Image:histogram_audiolevels.jpg]]
  
This mode shows the audio levels for each channel in decibels; multichannel is supported. More accurately it determines:
+
[[YUV]] [[Planar|planar]] video is required. Audio is [[ConvertAudio|converted]] to 16 bit. 
  
* the root mean square value of the samples belonging to each frame (let's say n samples) and converts this value to decibels using the following formula for each channel:
+
Shows the audio levels in [[wikipedia:Decibel|decibels]] for each channel present. For example, if the source has six channels of audio, six vertical bars will be shown.
  
::[[File:Histogram-eq-1.png|<math> RMS = 20 \cdot log_{10}( 1/32768 \cdot \sqrt{ 1/n \cdot \sum_{j=1}^{n} sample(j)^{2}} ) </math>]]
+
* The green bars show the {{Serif|''RMS''}} ([[wikipedia:Root_mean_square|Root Mean Square]]) level of the audio in each video frame (let's say {{Serif|''n''}} samples) using the following formula:
  
* the maximum volume of the samples belonging to each frame and converts this value to decibels using the following formula for each channel:
+
::[[File:Histogram-eq-1.png|x46px|<math> RMS = 20 \cdot log_{10}( 1/32768 \cdot \sqrt{ 1/n \cdot \sum_{j=1}^{n} sample(j)^{2}} ) </math>]]
  
::[[File:Histogram-eq-2.png|<math> max = 20 \cdot log_{10}(max_{j} (sample(j)) / 32768) </math>]]
+
* The blue bars show the {{Serif|''max''}} (peak) level of the audio in each video frame using the following formula:
  
The bars corresponding to the root mean square value are green, and to the maximum are blue. The filter is available in planar mode and the audio is converted to 16 bit. Note that for 16 bit audio, the maximal volume could be (since 2^16/2 = 32768)
+
::[[File:Histogram-eq-2.png|x16px|<math> max = 20 \cdot log_{10}(max_{j} (sample(j)) / 32768) </math>]]
  
::[[File:Histogram-eq-3.png|<math> 20 \cdot log_{10}(32768/32768) = 0 \ dB </math>]]
+
The maximum possible level without [[wikipedia:Clipping_%28audio%29|clipping]] is 0 dB by definition. The minimum level for 16 bit audio is therefore
  
and the minimal volume is
+
::[[File:Histogram-eq-4.png|x16px|<math> 20 \cdot log_{10}(1/32768) = - 90.31 \ dB </math>]] &nbsp;&nbsp;&nbsp;(since 2<sup>16</sup> / 2 = 32768)
 
+
</div>
::[[File:Histogram-eq-4.png|<math> 20 \cdot log_{10}(1/32768) = - 90.31 \ dB </math>]]
+
  
  
 
----
 
----
 
 
=== Stereo, StereoY8 and StereoOverlay mode ===
 
=== Stereo, StereoY8 and StereoOverlay mode ===
 +
<div style="max-width:62em" >
 +
<div {{BoxWidthIndent|24|0}} >
 +
Histogram("stereo")
 +
</div>
  
[[Image:histogram_modestereo.gif]]
+
[[Image:histogram_modestereo.gif|256px|]]
 
   
 
   
This mode shows a classic stereo graph, from the audio in the clip. Some may know these from recording studios. This can be used to see the left-right and phase distribution of the input signal. '''StereoOverlay''' will overlay the graph on top of the original. Each frame will contain only information from the current frame to the beginning of the next frame. The signal is linearly upsampled 8x, to provide clearer visuals. '''Stereo''' and '''StereoY8''' won't overlay the graph on the video, but will just return the graph (in YV12 respectively Y8 format).
+
Requires a source clip with stereo audio; '''StereoOverlay''' also requires a source clip with a [[YUV]] [[Planar|planar]] color format.  
  
This mode requires a source clip with stereo audio; StereoOverlay requires a source clip with a [[Planar|planar]] color format.
+
These modes show a classic stereo graph (or [[wikipedia:Lissajous_curve|Lissajous]] pattern) from the clip audio, often seen in recording studios. They are used to view the left-right phase distribution of the input signal. In-phase stereo appears predominantly vertical (as shown), but incorrectly phased stereo appears predominantly horizontal. Two-channel Mono appears as a vertical line.
 +
 
 +
'''StereoOverlay''' will overlay the graph on top of the original. Each frame will contain only information from the current frame to the beginning of the next frame. The signal is linearly upsampled 8x, to provide clearer visuals. '''Stereo''' and '''StereoY8''' won't overlay the graph on the video, but will just return the graph alone as a 512×512 video clip (in [[YV12]] or [[Y8]] format respectively).
 +
</div>
  
  
 
----
 
----
=== Changes ===
 
  
 +
=== Changes ===
 +
<div style="max-width:62em" >
 
{| border="1"
 
{| border="1"
 
|-
 
|-
Line 140: Line 207:
 
| Added different modes.
 
| Added different modes.
 
|}
 
|}
 +
</div>
  
  
Line 145: Line 213:
 
[[Category:Audio_filters]]
 
[[Category:Audio_filters]]
 
[[Category:Levels_and_Chroma_filters]]
 
[[Category:Levels_and_Chroma_filters]]
 +
[[Category:Debugging/Diagnostic filters]]

Revision as of 22:03, 13 March 2016

Histogram(clip clip [, string mode] [, float factor])

A multipurpose audio/video analysis tool, which supports the following modes:



Classic mode

Histogram

Histogram classic.jpg

Available in YUV color formats only. For RGB sources, try HistogramRGBParade.

This will add a per-line luminance graph (usually called a Waveform Monitor) on the right side of the video, increasing clip.Width by 256. The left side of the graph represents luma=0 and the right side represents luma=255. Values outside the valid CCIR-601 range are shown with a brown/yellowish color background; a greenish line represents Y=128.

If you prefer to see luma=0 on bottom and luma=255 on top, use this:

TurnRight.Histogram.TurnLeft
Histogram classic-v2-turned.jpg



Levels mode

Histogram("levels")

Histogram-vortex-levels.jpg

Available in all YUV planar color formats, except Y8. For RGB sources, try HistogramRGBLevels.

This mode will display three histograms on the right side of the video frame, increasing clip.Width by 256. This will show the distribution of the Y, U and V components in the current frame.

The top graph displays the Y (luma) distribution of the frame, where the left side represents Y=0 and the right side represents Y=255. Values outside the valid CCIR601 range have been indicated with faded colors; Y=128 has been marked with a dotted line. The vertical axis shows the number of pixels for a given luma (Y) value.

The middle graph is similar, and displays the U component; the bottom graph displays the V component.

The factor option (100.0 by default) specifies how the histograms are displayed, exaggerating the vertical scale. It is specified as percentage of the total population (that is number of luma or chroma pixels in a frame). For example:

Histogram("levels", 0.5)

Histogram-vortex-levels-v3-levels0,5.jpg

NOTE, factor is an unnamed optional argument;
Histogram(mode="levels", factor=0.5) will not work, but Histogram("levels", 0.5) works fine.



Color mode

Histogram("color")

Histogram-vortex-color.jpg

Available in all YUV planar color formats, except Y8.

This mode will display the chroma values (U/V color placement) in a two dimensional graph (called a vectorscope) on the right side of the video frame, increasing clip.Width by 256. It can be used to read of the hue and saturation of a clip. At the same time it is a histogram: the whiter a pixel in the vectorscope, the more pixels of the input clip correspond to that chroma value. The lighter background denotes the valid CCIR-601 range.


Histogram("color") output with added labels

Labels have been added to this vectorscope image for explication purposes, showing the U and V axes and degrees of hue. Spots have also been added, showing 75% saturated ColorBars (clockwise from 0°: blue, magenta, red, yellow, green and cyan).

The U component is displayed on the horizontal (X) axis, with U=0 on the left and U=255 on the right. The V component is displayed on the vertical (Y) axis, with V=0 on the top and V=255 on the bottom.

The position of a spot on the scope corresponds to a chroma value from the input clip. The graph can be used to read hue and saturation. As the hue of a color changes, the spot moves around the center. As the saturation changes, it moves in or out from the center. The center is where U and V equal 128, the saturation is zero and the corresponding pixel has no color. As you increase the saturation, the spot moves towards the edge.

At U=255, V=128 the hue is zero (blue) and the saturation is at maximum, that is,

saturation = sqrt( (U-128)2 + (V-128)2 ) or 127

When turning hue clockwise 90 degrees, the chroma is given by U=128, V=255 (red, approximately). Keeping the hue constant and decreasing the saturation, means that we move from the circle to the center of the vectorscope. Thus the color flavor remains the same, only it fades slowly to greyscale.



Color2 mode

Histogram("color2")

Histogram-vortex-color2.jpg

Available in all YUV planar color formats, except Y8.

This mode will display the pixels in a two dimensional graph (called a vectorscope) on the right side of the video frame, increasing clip.Width by 256. It can be used to read of the hue and saturation of a clip.

The U component is displayed on the horizontal (X) axis, with the leftmost side being U=0 and the rightmost side being U=255. The V component is displayed on the vertical (Y) axis, with the top representing V=0 and the bottom representing V=255. The white square denotes the valid CCIR-601 range.


Histogram("color2") output with added labels
As above, labels and ColorBars dots have been added to this vectorscope image for explication purposes.

The position of a spot on the scope corresponds to a chroma value from the input clip, exactly as with Histogram("color"), but the spot is brighter and in color.

Color2 mode is also different from Color mode in that the background is black instead of shaded, and a color wheel around the circumference of the scope has been added, divided into six hues (clockwise from 0°: blue, magenta, red, yellow, green and cyan), with white tick marks at 15 degree intervals.



Luma mode

Histogram("luma")

Histogram modeluma.jpg

Available in YUV planar and YUY2 color formats.

This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws.



Audiolevels mode

Histogram("audiolevels")

Histogram audiolevels.jpg

YUV planar video is required. Audio is converted to 16 bit.

Shows the audio levels in decibels for each channel present. For example, if the source has six channels of audio, six vertical bars will be shown.

  • The green bars show the RMS (Root Mean Square) level of the audio in each video frame (let's say n samples) using the following formula:
<math> RMS = 20 \cdot log_{10}( 1/32768 \cdot \sqrt{ 1/n \cdot \sum_{j=1}^{n} sample(j)^{2}} ) </math>
  • The blue bars show the max (peak) level of the audio in each video frame using the following formula:
<math> max = 20 \cdot log_{10}(max_{j} (sample(j)) / 32768) </math>

The maximum possible level without clipping is 0 dB by definition. The minimum level for 16 bit audio is therefore

<math> 20 \cdot log_{10}(1/32768) = - 90.31 \ dB </math>    (since 216 / 2 = 32768)



Stereo, StereoY8 and StereoOverlay mode

Histogram("stereo")

Histogram modestereo.gif

Requires a source clip with stereo audio; StereoOverlay also requires a source clip with a YUV planar color format.

These modes show a classic stereo graph (or Lissajous pattern) from the clip audio, often seen in recording studios. They are used to view the left-right phase distribution of the input signal. In-phase stereo appears predominantly vertical (as shown), but incorrectly phased stereo appears predominantly horizontal. Two-channel Mono appears as a vertical line.

StereoOverlay will overlay the graph on top of the original. Each frame will contain only information from the current frame to the beginning of the next frame. The signal is linearly upsampled 8x, to provide clearer visuals. Stereo and StereoY8 won't overlay the graph on the video, but will just return the graph alone as a 512×512 video clip (in YV12 or Y8 format respectively).



Changes

v2.60 Added StereoY8 mode. Added factor option.
v2.58 Added planar support. Color2 and Audiolevels modes added.
v2.56 Added invalid colors in YUY2 mode.
v2.56 Added dots to mode = "stereo" to show bias/offsets.
v2.53 Added different modes.
Personal tools