YV12To422
From Avisynth wiki
(Difference between revisions)
(YV12To422: add documentation) |
m |
||
Line 1: | Line 1: | ||
− | + | {{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Colourspace_Conversion}} | |
{{Filter3 | {{Filter3 | ||
|{{Author/Chikuzen}} | |{{Author/Chikuzen}} |
Latest revision as of 14:37, 25 May 2020
Abstract | |
---|---|
Author | Chikuzen |
Version | v1.0.2 |
Download | YV12To422-1.0.2.zip |
Category | Colourspace Conversion |
License | GPLv2 |
Discussion |
Contents |
[edit] Description
YV12To422 is an AviSynth filter plugin which based on YV12ToYUY2(ddcc.dll) written by Kevin Stone(a.k.a tritical) and was written from scratch.
[edit] Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Supported color formats: YUY2, YV12, YV16
- SSE2 Capable CPU
- *** vcredist_x86.exe is required for YV12To422-x86
- *** vcredist_x64.exe is required for YV12To422-x64
[edit] Syntax and Parameters
- YV12To422 (clip, bool "interlaced", int "itype", int "cplace", bool "lshift", bool "yuy2", bool "avx2", bool "threads", float "b", float "c")
- clip =
- Input clip must be YV12. Output format is YUY2(default) or YV16.
- clip =
- bool interlaced = false
- Sets whether or not the input video is interlaced or progressive.
- Default: false
- bool interlaced = false
- int itype = 2
- Sets interpolation method. Possible settings:
- 0 : duplicate (nearest neighbor)
- 1 : linear interpolation
- 2 : Mitchell-Netravali two-part cubic interpolation (adjustable b/c parameters to adjust blurring/ringing)
- Default: 2
- Sets interpolation method. Possible settings:
- int itype = 2
- int cplace =
- Specifies vertical chroma placement. Possible settings:
- int cplace =
progressive input (interlaced=false, progressive upsampling): 0 - chroma is aligned with top line of each two line pair within the frame This would be the case if during 4:2:2 -> 4:2:0 conversion the chroma values of odd lines were simply dropped. 1 - chroma is centered between lines of each two line pair within the frame (*** h261, h263, mpeg1, mpeg2, mpeg4, h264 standard progressive conversion) This would be the case if during 4:2:2 -> 4:2:0 conversion the chroma from every two line pair was averaged, or if an interlaced 4:2:2 -> 4:2:0 conversion was performed by using 75/25 averaging of top field pairs and 25/75 averaging of bottom field pairs. 2 - chroma is aligned with top line of each two line pair within each field This would be the case if the 4:2:2 -> 4:2:0 conversion was performed by separating the fields, and then doing a 4:2:2 -> 4:2:0 conversion on each field by dropping odd line chroma values. 3 - chroma is centered between lines of each two line pair within each field This would be the case if the 4:2:2 -> 4:2:0 conversion was performed by separating the fields, and then doing a 4:2:2 -> 4:2:0 conversion on each field by averaging chroma from every two line pair. interlaced input (interlaced=true, interlaced upsampling): 0 - chroma is aligned with top line of each two line pair within each field This would be the case if the 4:2:2 -> 4:2:0 conversion was performed by separating the fields, and then doing a 4:2:2 -> 4:2:0 conversion on each field by dropping odd line chroma values. 1 - chroma is centered between lines of each two line pair within each field This would be the case if the 4:2:2 -> 4:2:0 conversion was performed by separating the fields, and then doing a 4:2:2 -> 4:2:0 conversion on each field by averaging chroma from every two line pair. 2 - top field chroma is 1/4 pixel below even lines in the top field, and bottom field chroma is 1/4 pixel above odd lines in the bottom field. (*** mpeg2, mpeg4, h264 standard interlaced conversion) This would be the case if the 4:2:2 -> 4:2:0 conversion was performed by averaging top field pairs using 75/25 weighting, and averaging bottom field pairs using 25/75 weighting. This results in the same chroma placement as progressive cplace option 1. 3 - U is aligned with top line of each two line pair within each field, and V is aligned with bottom line of each pair within each field. (*** DV-PAL standerd interlaced conversion) ** Progressive option 1 and interlaced option 2 are actually the same in terms of chroma placement. If a progressive frame was converted to yv12 using interlaced method 2, then it is safe (actually better) to convert it to yuy2 using progressive method 1. However, if a progressive frame was converted to yv12 using a different type of interlaced sampling, resulting in different chroma placement (such as those described by interlaced options 0 or 1), then it is best to convert it to yv16/yuy2 using progressive upsampling, but with the cplace option that correctly specifies the positioning of the chroma. default: 1 (if interlaced = false) 2 (if interlaced = true)
- bool lshift = false
- If set this to true, chroma placement will shift to 1/4 sample to the left.
- Default: false
- If set this to true, chroma placement will shift to 1/4 sample to the left.
- bool lshift = false
- bool yuy2 = true
- Sets whether or not the output video format is packed(YUY2) or planar(YV16).
- Default: true (YUY2 output)
- bool yuy2 = true
- bool avx2 = false
- Sets whether AVX2 is used or not.
- Default: false (use SSE2)
- bool avx2 = false
** Currentry, AviSynth 2.60 can't make memory alignment anything but 16bytes. Thus, if you use AviSynth 2.60, you shouldn't to set this true. AviSynth+ has no problem. see https://github.com/AviSynth/AviSynthPlus/commit/ab4ea303b4ca78620c2ef90fdaad184bc18b7708
- bool threads = false
- When sets this to true, V-plain is processed with a different thread at the same time with U-plain. However, processing doesn't always become speedy by this.
- Default: false (use single thread)
- bool threads = false
- float b = 0.0
- float C = 0.75
- Adjusts properties of cubic interpolation (itype=2). Same as AviSynth's BicubicResize filter.
- default: 0.0,0.75
- float b = 0.0
[edit] Examples
[edit] External Links
- GitHub - Source code repository.
Back to External Filters ←