18.05.2023, 23:19
I'm wrote some code so that users could add filters/scripts to Hybrid. (in Avisynth&Vapoursynth)
The idea is, that a user could take for example Avisynths KillPulse and write a 'simple' xml file like:
and Hybrid would add something like the attached image to the gui.
This would allow users to extend Hybrids filter support by their own, without really being able to program.
Are there users interested in this? Would users share their xml files?
Theoretically, in the long run, the xml-structure might extend to support additional options and at some point most of the existing filters might be replaced with xml-files.
Cu Selur
The idea is, that a user could take for example Avisynths KillPulse and write a 'simple' xml file like:
Code:
<CustomScript name="KillPulse" version="0.0.1">
<General> <!-- General Avisynt Script Description-->
<FileName>KillPulse.dll</FileName>
<Architecture>Avisynth</Architecture> <!-- What type of script it is: 'Avisynth' or 'Vapoursynth' -->
<Architecture_BitDepth>32</Architecture_BitDepth> <!-- BitDepth of the dlls used. Can be: '32' or '32,64' or '64' -->
<Description>KillPulse is a pulse noise reduction plug-in for AviSynth. Similar to DePulse.</Description>
<FilterQueueAfter>DePulse</FilterQueueAfter>
</General>
<Function>
<FunctionName>KillPulse</FunctionName>
<Supported_ColorSpace>YUY2</Supported_ColorSpace> <!-- Supported input color spaces. Can be a single Avisynth or Vapoursynth color space, 'all' or a comma separated list of them -->
<Supports_Interlaced>true</Supports_Interlaced> <!-- Whether the script supports interlaced input. Can be 'true' or 'false' -->
<Output_ColorSpace>unchanged</Output_ColorSpace> <!-- The output color space. Can be: a specific ColorSpace or 'unchanged' -->
<FilterBitDepth>8</FilterBitDepth> <!-- -1 all bitdepth are supported -->
<FilterOutputBitDepth>-1</FilterOutputBitDepth> <!-- -1 <> same as input -->
<Output_Interlaced>unchanged</Output_Interlaced> <!-- Whether the output is interlaced. Can be: 'unchanged', 'true', 'false' -->
<Category>Other</Category>
<Parameters>
<Parameter>
<Name>clip</Name>
<Type>clip</Type>
</Parameter>
<Parameter>
<Name>times</Name>
<Type>int</Type> <!-- Type of the parameter. Can be: int/float/double/string/string_list/clip -->
<Default>2</Default> <!-- default value; must be set, unless type is clip-->
<Minimum>1</Minimum> <!-- minimum value; must be set for int/float/double -->
<Maximum>5</Maximum> <!-- the maximum value; must be set for int/float/double -->
<Step>1</Step> <!-- the maximum value; must be set for int/float/double -->
<UI>
<LabelText>Times</LabelText>
<Position>
<row>0</row> <!-- Position in the UI, can be 0-2 -->
</Position>
<Description>The number of times the filter is applied. The greater the number of times, the heavier it becomes.
Range: 1-5 (default 2)</Description> <!-- tool tip of the parameter -->
</UI>
</Parameter>
<Parameter>
<Name>motion </Name>
<Type>int</Type> <!-- Type of the parameter. Can be: int/float/double/string/string_list/clip -->
<Default>10</Default> <!-- default value; must be set, unless type is clip-->
<Minimum>0</Minimum> <!-- minimum value; must be set for int/float/double -->
<Maximum>255</Maximum> <!-- the maximum value; must be set for int/float/double -->
<Step>1</Step> <!-- the maximum value; must be set for int/float/double -->
<UI>
<LabelText>Motion</LabelText>
<Position>
<row>1</row> <!-- Position in the UI, can be 0-2 -->
</Position>
<Description>Either motion judgment = "difference in brightness from previous frame" or "difference in brightness from subsequent frame".
If it is less than this number, do not apply the filter to that dot. Prevents collapse of telops and reduces wasteful processing.
Range: 0-255 (default 10) </Description> <!-- tool tip of the parameter -->
</UI>
</Parameter>
<Parameter>
<Name>complex</Name>
<Type>int</Type> <!-- Type of the parameter. Can be: int/float/double/string/string_list/clip -->
<Default>20</Default> <!-- default value; must be set, unless type is clip-->
<Minimum>0</Minimum> <!-- minimum value; must be set for int/float/double -->
<Maximum>255</Maximum> <!-- the maximum value; must be set for int/float/double -->
<Step>1</Step> <!-- the maximum value; must be set for int/float/double -->
<UI>
<LabelText>Complex</LabelText>
<Position>
<row>0</row> <!-- Position in the UI, can be 0-2 -->
</Position>
<Description>If the brightness is different from the pixels in the front and back (upper and lower) fields for d or more, it is determined as noise. (Common for white and black noise).
Range: 0-255</Description> <!-- tool tip of the parameter -->
</UI>
</Parameter>
<Parameter>
<Name>complex2</Name>
<Type>int</Type> <!-- Type of the parameter. Can be: int/float/double/string/string_list/clip -->
<Default>20</Default> <!-- default value; must be set, unless type is clip-->
<Minimum>0</Minimum> <!-- minimum value; must be set for int/float/double -->
<Maximum>255</Maximum> <!-- the maximum value; must be set for int/float/double -->
<Step>1</Step> <!-- the maximum value; must be set for int/float/double -->
<UI>
<LabelText>Complex2</LabelText>
<Position>
<row>0</row> <!-- Position in the UI, can be 0-2 -->
</Position>
<Description>Ancillary parameter of complex. The smaller the number, the more difficult it is to get noise, but it prevents the picture from falling apart.
Range: 0-255 (default 20)</Description> <!-- tool tip of the parameter -->
</UI>
</Parameter>
<Parameter>
<Name>mode</Name>
<Type>string_list</Type> <!-- Type of the parameter. Can be: int/float/double/string/string_list/clip -->
<Default>Basic</Default> <!-- default value; must be set, unless type is clip-->
<PossibleValues>Basic ### Median progressive + judgement ### Median interlace + judgment ### Median progressive ### Meidan interlace</PossibleValues>
<IndexUse>true</IndexUse>
<UI>
<LabelText>Mode</LabelText>
<Position>
<row>2</row> <!-- Position in the UI, can be 0-2 -->
</Position>
<Description> You can select from 5 types of filter modes, default is 0.
0 : Basic mode. This is a filter mode that removes only pulse noise. Automatically supports interlaced & progressive.
1 : Forcibly apply the median filter as progressive. Motion judgment is performed.
2 : Forcibly apply median filter as interlace. Motion judgment is performed.
3 : Forcibly apply the median filter as progressive. No motion judgment is made.
4 : Forcibly apply median filter as interlace. No motion judgment is made.
Picture breaks occur in modes other than 0. Please use it together with a function that applies a filter to a part of the image. </Description> <!-- tool tip of the parameter -->
</UI>
</Parameter>
</Parameters>
</Function>
</CustomScript>
This would allow users to extend Hybrids filter support by their own, without really being able to program.
Are there users interested in this? Would users share their xml files?
Theoretically, in the long run, the xml-structure might extend to support additional options and at some point most of the existing filters might be replaced with xml-files.
Cu Selur