ConvertStacked: Difference between revisions
From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs) m "bits" argument verified; add example |
No edit summary |
||
| Line 13: | Line 13: | ||
<div style="max-width:42em" > | <div style="max-width:42em" > | ||
*In '''[[Stack16]]''', the picture is made of two parts: one containing the highest 8 bits (MSB) for each pixel, stacked on top of another containing the lowest 8 bits (LSB). | *In '''[[Stack16]]''', the picture is made of two parts: one containing the highest 8 bits (MSB) for each pixel, stacked on top of another containing the lowest 8 bits (LSB). | ||
*'''Double-Width''' is similar, but the MSBs and LSBs are horizontally ''interleaved''. [[TODO|TODO: verify]]. | *'''Double-Width''' is similar, but the MSBs and LSBs are horizontally ''interleaved'' which is like Native, and it's faster. [[TODO|TODO: verify]]. | ||
</div> | </div> | ||
| Line 41: | Line 41: | ||
[[LSMASHSource/LWLibavVideoSource|LWLibavVideoSource]](<''path''>, stacked=true, format="YUV420P10") | [[LSMASHSource/LWLibavVideoSource|LWLibavVideoSource]](<''path''>, stacked=true, format="YUV420P10") | ||
'''ConvertFromStacked'''(bits=10) | '''ConvertFromStacked'''(bits=10) | ||
[[ConvertBits]](8, dither=0) ## '0' means on, '-1' means off | |||
</div> | |||
::Double-Width example, | |||
<div {{BoxWidthIndent|46|4}} > | |||
## Decoding 10bit, YUV 4:2:0 source | |||
'''ConvertToDoubleWidth'''() | |||
[[F3KDB]](Input_Mode=2,Input_Depth=10,Output_Mode=2,Output_Depth=10) | |||
'''ConvertFromDoubleWidth'''(bits=10) | |||
[[ConvertBits]](8, dither=0) ## '0' means on, '-1' means off | [[ConvertBits]](8, dither=0) ## '0' means on, '-1' means off | ||
</div> | </div> | ||
Revision as of 16:04, 28 May 2019
| AVS+ |
|---|
| This feature is specific to AviSynthPlus. It is not supported in other AviSynth versions. |
These conversion filters are to allow filters that use 16-bit video in a pseudo-8-bit colorspace to interact with AviSyth+ high bit depth formats. They are intended to serve as a stopgap until more plugins appear supporting true high bit depth.
Notes
- In Stack16, the picture is made of two parts: one containing the highest 8 bits (MSB) for each pixel, stacked on top of another containing the lowest 8 bits (LSB).
- Double-Width is similar, but the MSBs and LSBs are horizontally interleaved which is like Native, and it's faster. TODO: verify.
Syntax and Parameters
Accepts a 16-bit clip and returns a stacked 8-bit clip.
ConvertToStacked(clip clip ] )
ConvertToDoubleWidth(clip clip ] )
- clip clip =
- Source clip. Must be native 16 bit: YUV420P16, YUV422P16, YUV444P16, Y16.
Accepts a stacked 8-bit clip and returns a 16-bit clip.
ConvertFromStacked(clip clip, int bits ] )
ConvertFromDoubleWidth(clip clip, int bits ] )
- clip clip =
- Source clip. Must be YV12, YV16, YV24 or Y8.
- int bits = 16
- Bit depth of returned clip. Must match the original bit depth. For example,
## Decoding 10bit, YUV 4:2:0 source LWLibavVideoSource(<path>, stacked=true, format="YUV420P10") ConvertFromStacked(bits=10) ConvertBits(8, dither=0) ## '0' means on, '-1' means off
- Double-Width example,
## Decoding 10bit, YUV 4:2:0 source ConvertToDoubleWidth() F3KDB(Input_Mode=2,Input_Depth=10,Output_Mode=2,Output_Depth=10) ConvertFromDoubleWidth(bits=10) ConvertBits(8, dither=0) ## '0' means on, '-1' means off
Changes
| 20170310 r2440 | first added |