AviSynth / AviSynthPlus

AviSynth with improvements
http://avs-plus.net
967 stars 74 forks source link

Request: Limiter - support for RGB formats #208

Open TbtBI opened 3 years ago

TbtBI commented 3 years ago

Is it possible to be added support for RGB formats?

pinterf commented 3 years ago

What is the use case for it? There is no luma or chroma in RGB, unless we convert it to YUV by using a color matrix, apply limits, then convert it back.

TbtBI commented 3 years ago

Merging two clips could go out of range 0.0..1.0 (float processing). Yes, one could do something like Expr("x 0 1 clip") but I was surprised RGB is not supported since VapourSynth Limiter is doing it.

pinterf commented 3 years ago

I see, a simple channer clipping is needed then. For the note, VS names their parameters simple as min and max. http://www.vapoursynth.com/doc/functions/limiter.html Avisynth: http://avisynth.nl/index.php/Limiter No luma or chroma is involved there, so probably there can be another variant which takes and RGB clip and "min" and "max". Supporting RGB implies a working "show" parameter as well.

TbtBI commented 3 years ago

Now when I look again at both avs and vs Limiter - it's obvious that avs function is more or less meant only for YUV format. A limiting function for RGB can come from different than Limiter plugin but if there isn't speed difference compared to Expr("x 0 1 clip"), creating such plugin eventually only for debugging (parameter show) doesn't worth it.