Talk:GreyScale

From Avisynth wiki
Jump to: navigation, search

RGB behavior

This statement was recently removed from the documentation:

In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter (rec601 by default, which reflects the behaviour in old AviSynth versions).

With the following script you can see that using Grayscale() on a RGB source actually uses the "PC.601" matrix, at least in AviSynth 2.6.

ColorBars()

gray = Grayscale().Subtitle("Grayscale")

pc601 = ConvertToY8(matrix="PC.601")
pc601 = MergeRGB(pc601, pc601, pc601).Subtitle("PC.601")

rec601 = ConvertToY8(matrix="Rec601")
rec601 = MergeRGB(rec601, rec601, rec601).Subtitle("Rec601")

Interleave(gray, pc601, rec601)

#ShowRed("YV12").Histogram("levels")
That is true, but the name "Rec601" is hard coded into the filter. This is why I explained that
In all cases, Luma range is not changed
Perhaps it can be worded better? I will try something. --Raffriff42 17:09, 17 January 2016 (CET)
I hope you don't mind, but i changed it back a little bit. To keep the naming consistent with Convert we should have used PC.601 and PC.709 as matrices, but we didn't (and it's too late to change it). However when talking about coefficients, note that Rec601 and PC.601 use both the same Rec601 coefficients (idem for Rec709 and PC.709). The coefficients and the luma range are unrelated since the coefficients refer to the normalized transformations. Admin 22:58, 17 January 2016 (CET)
Not at all, that works for me. --Raffriff42 01:59, 18 January 2016 (CET)
Personal tools