This file contains functions that allow one to downsample from 4:4:4 to 4:2:0 or upsample from 4:2:0 or 4:2:2 to 4:4:4.
Component Summary | |
int->int
|
ChannelUpsample_Vert_and_Horz
Upsamples from 4:2:0 to 4:4:4asdf |
int->int
|
ChannelUpsample_Vertical
Upsample from 4:2:2 to 4:4:4 (in the vertical direction)asdf |
int->int
|
ChannelUpsample_Horizontal
Upsample from 4:2:2 to 4:4:4 (in the horizontal direction)asdf |
int->int
|
ChannelUpsample_1D
Performs a one dimensional upsampling, doubling the pixel count Each pixel is computed from a weighted average of its two neighbors with the closer neighbor getting weight1 and the further neighbor getting weight2. |
int->int
|
DropSecond
This drops every second value from a data stream, essentially performing a very simple downsampling (used for the horizontal downsampling in color channel downsampling. |
int->int
|
ChannelDownsample_1D
This cuts a data stream in half by combining two pixels into one. |
int->int
|
ChannelDownsample
Downsample from 4:4:4 to 4:2:0asdf |
Component Detail |
int->int ChannelUpsample_Vert_and_Horz(int sourcewidth, int sourceheight)
<int>
- A 4:2:0 downsampled image
<int>
- A 4:4:4 upsampled image sourcewidth
- The width of the downsampled image
sourceheight
- The height of the downsampled image
int->int ChannelUpsample_Vertical(int sourcewidth, int sourceheight)
<int>
- A 4:2:2 downsampled in the vertical direction
<int>
- A 4:4:4 upsampled image sourcewidth
- The width of the downsampled image
sourceheight
- The height of the downsampled image
int->int ChannelUpsample_Horizontal(int sourcewidth, int sourceheight)
<int>
- A 4:2:2 downsampled in the horizontal direction
<int>
- A 4:4:4 upsampled image sourcewidth
- The width of the downsampled image
sourceheight
- The height of the downsampled image
int->int ChannelUpsample_1D
<int>
- The downsampled data stream
<int>
- The reconstructed upsampled data stream sourcelen
- The length of the downsampled data stream
weight1
- The weight of the closer neighbor
weight2
- The weight of the further neighbor
int->int DropSecond
<int>
- A data stream
<int>
- A downsampled data stream
int->int ChannelDownsample_1D(float weight1, float weight2)
<int>
- A data stream
<int>
- A data stream weight1
- The weighting used for the antecedent pixel
weight2
- The weighting used for the subsequent pixel
int->int ChannelDownsample()
<int>
- A 4:4:4 upsampled image
<int>
- A 4:2:0 downsampled image