GreyScale
From Avisynth wiki
(Difference between revisions)
Raffriff42 (Talk | contribs) m (note alternate spelling of filter name) |
Raffriff42 (Talk | contribs) (note AVS+ differences) |
||
Line 12: | Line 12: | ||
::In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter. | ::In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter. | ||
::*"Rec601" : Use Rec.601 coefficients (and keeping luma range unchanged) | ::*"Rec601" : Use Rec.601 coefficients (and keeping luma range unchanged) | ||
− | ::*"Rec709" : Use Rec.709 coefficients (and keeping luma range unchanged) | + | ::*"Rec709" : Use Rec.709 (HD) coefficients (and keeping luma range unchanged) |
+ | ::*"Rec2020" : Use Rec.2020 (UHD) coefficients (and keeping luma range unchanged) {{AvsPluscon}} | ||
::*"AVERAGE" : Use averaged coefficients (''Y'' = (R + G + B) / 3) | ::*"AVERAGE" : Use averaged coefficients (''Y'' = (R + G + B) / 3) | ||
− | If {{FuncArg|clip}} is [[YUV]], the chroma channels are simply set to grey (128) – {{FuncArg|matrix}} is not used '''and must not''' be specified otherwise an error will be thrown. | + | If {{FuncArg|clip}} is [[YUV]], the chroma channels are simply set to grey (128<sub>8</sub>) – {{FuncArg|matrix}} is not used '''and must not''' be specified otherwise an error will be thrown. |
See [[Color conversions]] for an explanation of the coefficients. Broadly speaking though, | See [[Color conversions]] for an explanation of the coefficients. Broadly speaking though, | ||
Line 22: | Line 23: | ||
:*using ''Average'', '''blue''' contributes more. | :*using ''Average'', '''blue''' contributes more. | ||
− | In all cases, Luma range is not changed (0-255 in → 0-255 out; 16-235 in → 16-235 out) | + | In all cases, Luma range is not changed (0-255<sub>8</sub> in → 0-255<sub>8</sub> out; 16-235<sub>8</sub> in → 16-235<sub>8</sub> out) |
[[Category:Internal filters]] | [[Category:Internal filters]] | ||
[[Category:Levels_and_Chroma_filters]] | [[Category:Levels_and_Chroma_filters]] |
Revision as of 23:12, 24 April 2017
Converts the input clip to greyscale (no color), without changing the color format.
UK (Greyscale) and US (Grayscale) spellings are both allowed.
Greyscale(clip clip [, string matrix])
Grayscale(clip clip [, string matrix])
- string matrix = "Rec601"
- In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter.
- "Rec601" : Use Rec.601 coefficients (and keeping luma range unchanged)
- "Rec709" : Use Rec.709 (HD) coefficients (and keeping luma range unchanged)
- "Rec2020" : Use Rec.2020 (UHD) coefficients (and keeping luma range unchanged) AVS+
- "AVERAGE" : Use averaged coefficients (Y = (R + G + B) / 3)
- In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter.
If clip is YUV, the chroma channels are simply set to grey (1288) – matrix is not used and must not be specified otherwise an error will be thrown.
See Color conversions for an explanation of the coefficients. Broadly speaking though,
- using Rec709, green contributes more to the output, compared to the default Rec601;
- using Average, blue contributes more.
In all cases, Luma range is not changed (0-2558 in → 0-2558 out; 16-2358 in → 16-2358 out)