ColorBars

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(formatting; some re-phrasing.)
Line 1: Line 1:
 
{{Template:Func2Def|ColorBars([int ''width''] [, int ''height''] [, string ''pixel_type''])|ColorBarsHD([int ''width''] [, int ''height''] [, string ''pixel_type''])}}
 
{{Template:Func2Def|ColorBars([int ''width''] [, int ''height''] [, string ''pixel_type''])|ColorBarsHD([int ''width''] [, int ''height''] [, string ''pixel_type''])}}
  
The ColorBars filter produces a video clip containing SMPTE color bars (Rec. ITU-R BT.801-1) scaled to any image size. By default, a clip is produced of 640x480, RGB32 [16,235], 29.97 fps, 1 hour long, alpha channel opaque. <br>
+
'''ColorBars''' produces a video clip containing SMPTE color bars (Rec. ITU-R BT.801-1) scaled to any image size.  
The ColorBarsHD filter (added in v2.60) produces a video clip containing SMPTE color bars (Rec. ITU-R BT.709 / [http://www.arib.or.jp/english/html/overview/img/arib_std-b28v1.0_e.pdf arib std b28 v1.0]) scaled to any image size. By default, a clip is produced of 1288x720, YV24, 29.97 fps, 1 hour long.  
+
  
For both filters, a test tone is also generated. Test tone is a 440Hz sine at 48KHz, 16 bit, stereo. The tone pulses in the RIGHT speaker, being turned on and off once every second.
+
:By default, a clip is produced of 640x480, RGB32 (alpha channel opaque), 29.97 fps, 1 hour long.
 +
 +
:''pixel_type'' may be any of the following: "YUY2" (v2.56), "YV12" (v2.56), "YV24" (v2.60), or (default) "RGB32".
  
For ColorBars the following pixel types are supported: "YUY2" (v2.56), "YV12" (v2.56), "YV24" (v2.60), or (default) "RGB32". For ColorsBarsHD only "YV24" is supported.
+
'''ColorBarsHD''' (added in v2.60) produces a video clip containing SMPTE (Rec. ITU-R BT.709 / [http://www.arib.or.jp/english/html/overview/img/arib_std-b28v1.0_e.pdf arib std b28 v1.0]) color bars, scaled to any image size.  
  
 +
:By default, a clip is produced of 1288x720, YV24, TV range (see above), 29.97 fps, 1 hour long.
 +
 +
:''pixel_type'' must be "YV24".
 +
 +
For both filters, in all color formats, luminance levels are [[Luminance_levels#What_are_luminance_levels.3F|TV range]], where 0 IRE "black"=16 and 100 IRE "white"=235, within a total possible range of 0-255.
 +
The [[#pluge]] (see below) goes 'blacker than black'.
 +
 +
For both filters, an '''audio tone''' is also generated. Test tone is a 440Hz sine at 48KHz, 16 bit, stereo. The tone pulses in the RIGHT speaker, being turned on and off once every second. Level is [https://en.wikipedia.org/wiki/DBFS 0 dBFS] (wikipedia).
 +
 +
 +
----
 
Note, that for example
 
Note, that for example
  
 
  ColorBars(pixel_type="YUY2")
 
  ColorBars(pixel_type="YUY2")
  
is equivalent with
+
is equivalent to
  
 
  ColorBars(pixel_type="RGB32")
 
  ColorBars(pixel_type="RGB32")
  ConvertToYUY2(matrix="PC.601")  # doesn't scale the luma range
+
  ConvertToYUY2(matrix="PC.601")  # "PC.xxx" doesn't scale the luma range
  
 
When directly generating YUV format data the color transitions are arranged to occur on a chroma aligned boundary.
 
When directly generating YUV format data the color transitions are arranged to occur on a chroma aligned boundary.
  
The lower part of ColorBars is called the pluge. From left to right it consists of: -I, white, +Q, black, -4/0/+4 IRE levels and black. The -4/0/4 IRE levels can be used to set the brightness correctly. The -4 IRE and 0 IRE should have the same brightness, and the +4 IRE should be a little brighter than -4/0 IRE. The -I/+Q levels are not really interesting, since they are not used anymore for NTSC (analog TV), but they were used to set the chrominance correctly. More information about the colorbars and the pluge can be found [[ColorBars_theory|here]].
 
  
 +
To verify luma range, use the following code:
 +
 +
([[Clip_properties|IsRGB]]) ? [[RGBAdjust]](analyze=true) : [[ColorYUV]](analyze=true)
 +
 +
For TV range, "LooseMinimum" will be '''7''' (with -4 IRE pluge bar) and "LooseMaximum" will be 235.
 +
 +
 +
----
 +
=====pluge=====
 +
The lower part of ColorBars is called the [https://en.wikipedia.org/wiki/Picture_line-up_generation_equipment '''pluge'''] (wikipedia). From left to right it consists of: -I, white, +Q, black, -4/0/+4 IRE levels and black. The -4/0/4 IRE levels can be used to set the brightness correctly. The -4 IRE and 0 IRE should have the same brightness, and the +4 IRE should be a little brighter than -4/0 IRE. The -I/+Q levels are not really interesting, since they are not used anymore for NTSC (analog TV), but they were used to set the chrominance correctly. More information about the colorbars and the pluge can be found on the [[ColorBars_theory]] page.
 +
 +
 +
----
 
'''Changes:'''
 
'''Changes:'''
 
{| border="1"
 
{| border="1"

Revision as of 00:16, 15 September 2014

ColorBars([int width] [, int height] [, string pixel_type])
ColorBarsHD([int width] [, int height] [, string pixel_type])

ColorBars produces a video clip containing SMPTE color bars (Rec. ITU-R BT.801-1) scaled to any image size.

By default, a clip is produced of 640x480, RGB32 (alpha channel opaque), 29.97 fps, 1 hour long.
pixel_type may be any of the following: "YUY2" (v2.56), "YV12" (v2.56), "YV24" (v2.60), or (default) "RGB32".

ColorBarsHD (added in v2.60) produces a video clip containing SMPTE (Rec. ITU-R BT.709 / arib std b28 v1.0) color bars, scaled to any image size.

By default, a clip is produced of 1288x720, YV24, TV range (see above), 29.97 fps, 1 hour long.
pixel_type must be "YV24".

For both filters, in all color formats, luminance levels are TV range, where 0 IRE "black"=16 and 100 IRE "white"=235, within a total possible range of 0-255. The #pluge (see below) goes 'blacker than black'.

For both filters, an audio tone is also generated. Test tone is a 440Hz sine at 48KHz, 16 bit, stereo. The tone pulses in the RIGHT speaker, being turned on and off once every second. Level is 0 dBFS (wikipedia).



Note, that for example

ColorBars(pixel_type="YUY2")

is equivalent to

ColorBars(pixel_type="RGB32")
ConvertToYUY2(matrix="PC.601")  # "PC.xxx" doesn't scale the luma range

When directly generating YUV format data the color transitions are arranged to occur on a chroma aligned boundary.


To verify luma range, use the following code:

(IsRGB) ? RGBAdjust(analyze=true) : ColorYUV(analyze=true)

For TV range, "LooseMinimum" will be 7 (with -4 IRE pluge bar) and "LooseMaximum" will be 235.



pluge

The lower part of ColorBars is called the pluge (wikipedia). From left to right it consists of: -I, white, +Q, black, -4/0/+4 IRE levels and black. The -4/0/4 IRE levels can be used to set the brightness correctly. The -4 IRE and 0 IRE should have the same brightness, and the +4 IRE should be a little brighter than -4/0 IRE. The -I/+Q levels are not really interesting, since they are not used anymore for NTSC (analog TV), but they were used to set the chrominance correctly. More information about the colorbars and the pluge can be found on the ColorBars_theory page.



Changes:

v2.56 Added pixel_type="YUY2"/"YV12".
v2.60
  • Added pixel_type="YV24" to ColorBars.
  • Initial release of ColorBarsHD.
Personal tools