wonkey_monkey
5th May 2021, 17:52
DebugColourSpaces v0.1 (http://horman.net/avisynth/)
Direct link (http://horman.net/avisynth/download/DebugColourSpaces.zip)
https://i.imgur.com/Zk89Nw1.png
DebugColourSpaces is a debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.
Usage
DebugColorSpaces(
(clip) Input*+
(int) Width*+
(bool) Interlaced*+
(enum) Colourspaces*+ (DCS_SOURCE, DCS_ALL, DCS_CLASSIC, DCS_YUV, or DSC_RGB)
(string) Filter name*
(...) Filter arguments
)
* For technical reasons none of these arguments are named.
+ These three arguments are all optional and may be specified in any order, as long as they come before the filter name.
Any arguments specified after the filter name are passed to the filter as arguments.
[u]Examples
To apply TurnRight to ColorBars, using every Avisynth+ colourspace ( https://i.imgur.com/bmlMV5X.png ):
DebugColourSpaces(ColorBars, "TurnRight")
To apply a subtitle to the implicit last clip, using only the classic Avisynth colourspaces, with a display width of 640 pixels, and various Subtitle arguments ( https://i.imgur.com/De56UWJ.png ):
DebugColourSpaces(640, DCS_CLASSIC, "Subtitle", "Lorem ipsum dolor sit amet", 0, 360, 0, 100, "", 45)
To apply SeparateFields to all non-alpha YUV colourspaces, interlaced ( https://i.imgur.com/F1By4j1.png ):
DebugColourSpaces(true, DCS_YUV, "SeparateFields")
To apply ConvertToYUY2 to all RGB colourspaces, using chaining ( https://i.imgur.com/nAbzZy8.png ):
ColorBars.DebugColourSpaces(DCS_RGB, "ConvertToYUY2")
This last example also demonstrates how error messages are handled, and how colourspace conversion by the chosen filter is indicated by cyan text.
Colourspaces
Colourspaces are selected using the following constants:
DCS_SOURCE : Only the colourspace of the source is displayed
DCS_ALL : All 60 Avisynth+ colourspaces are displayed
DCS_CLASSIC : Only the original eight Avisynth colourspaces are displayed
DCS_YUV : All non-alpha YUV colourspaces
DCS_RGB : All non-alpha RGB colourspaces
Any arguments given after the filter name are passed to that filter as arguments. Parameter names cannot be specified, so you must specify them in the order that the filter accepts arguments. You do not have to specify all arguments.
Errors
DebugColourSpaces will try to gracefully display any errors encountered while applying the filter with the following colours:
Yellow: The filter threw an AvisynthError on instantiation
Red: The filter caused an exception during instantiation
Orange: An AvisynthError or exception occurred while trying to get this frame
Direct link (http://horman.net/avisynth/download/DebugColourSpaces.zip)
https://i.imgur.com/Zk89Nw1.png
DebugColourSpaces is a debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.
Usage
DebugColorSpaces(
(clip) Input*+
(int) Width*+
(bool) Interlaced*+
(enum) Colourspaces*+ (DCS_SOURCE, DCS_ALL, DCS_CLASSIC, DCS_YUV, or DSC_RGB)
(string) Filter name*
(...) Filter arguments
)
* For technical reasons none of these arguments are named.
+ These three arguments are all optional and may be specified in any order, as long as they come before the filter name.
Any arguments specified after the filter name are passed to the filter as arguments.
[u]Examples
To apply TurnRight to ColorBars, using every Avisynth+ colourspace ( https://i.imgur.com/bmlMV5X.png ):
DebugColourSpaces(ColorBars, "TurnRight")
To apply a subtitle to the implicit last clip, using only the classic Avisynth colourspaces, with a display width of 640 pixels, and various Subtitle arguments ( https://i.imgur.com/De56UWJ.png ):
DebugColourSpaces(640, DCS_CLASSIC, "Subtitle", "Lorem ipsum dolor sit amet", 0, 360, 0, 100, "", 45)
To apply SeparateFields to all non-alpha YUV colourspaces, interlaced ( https://i.imgur.com/F1By4j1.png ):
DebugColourSpaces(true, DCS_YUV, "SeparateFields")
To apply ConvertToYUY2 to all RGB colourspaces, using chaining ( https://i.imgur.com/nAbzZy8.png ):
ColorBars.DebugColourSpaces(DCS_RGB, "ConvertToYUY2")
This last example also demonstrates how error messages are handled, and how colourspace conversion by the chosen filter is indicated by cyan text.
Colourspaces
Colourspaces are selected using the following constants:
DCS_SOURCE : Only the colourspace of the source is displayed
DCS_ALL : All 60 Avisynth+ colourspaces are displayed
DCS_CLASSIC : Only the original eight Avisynth colourspaces are displayed
DCS_YUV : All non-alpha YUV colourspaces
DCS_RGB : All non-alpha RGB colourspaces
Any arguments given after the filter name are passed to that filter as arguments. Parameter names cannot be specified, so you must specify them in the order that the filter accepts arguments. You do not have to specify all arguments.
Errors
DebugColourSpaces will try to gracefully display any errors encountered while applying the filter with the following colours:
Yellow: The filter threw an AvisynthError on instantiation
Red: The filter caused an exception during instantiation
Orange: An AvisynthError or exception occurred while trying to get this frame