Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Thread Tools Search this Thread Display Modes
Old 5th May 2021, 17:52   #1  |  Link
Formerly davidh*****
wonkey_monkey's Avatar
Join Date: Jan 2004
Posts: 2,389
DebugColourSpaces - test filters against multiple colourspaces at once

DebugColourSpaces v0.1
Direct link

DebugColourSpaces is a debugging filter which applies a specified filter to multiple Avisynth+ colourspaces and displays a labelled grid of the results.


  (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.

  • 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 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.


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
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 29th October 2021 at 18:06.
wonkey_monkey is offline   Reply With Quote
Old 6th May 2021, 00:12   #2  |  Link
Registered User
Join Date: Jan 2018
Posts: 1,259
kedautinh12 is offline   Reply With Quote
Old 6th May 2021, 08:38   #3  |  Link
HeartlessS Usurer
StainlessS's Avatar
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,266
Yes, thankyou Wonkey [ Still no version numbers ]
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 23:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.