|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.video.ChromaSubsampler
public class ChromaSubsampler
Performs chromacity subsampling on byte values. Subsampling is performed either in only in the horizontal direction (usable for eg. Y'CbCr 4:2:2) or in both directions (usable for eg. Y'CbCr 4:2:0).
Field Summary | |
---|---|
private boolean |
vertical
|
Constructor Summary | |
---|---|
ChromaSubsampler(boolean vertical)
Class constructor. |
Method Summary | |
---|---|
private void |
copyArray(int[][] from,
int[][] to)
|
boolean |
getSubsampleVertical()
Determines whether or not vertical subsampling is enabled or not. |
void |
setSubsampleVertical(boolean subsampleVertical)
Sets whether subsampling should be performed in the vertical direction or not. |
int[][] |
subsample(int[][] values)
Subsamples image data, given as a two-dimensional array. |
int[][] |
subsample(int[] values,
int height,
int width)
Subsamples image data, given as an one-dimensional array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean vertical
Constructor Detail |
---|
public ChromaSubsampler(boolean vertical)
vertical
- Whether vertical subsampling should be performed or not, as by a call ot setSubsampleVertical().Method Detail |
---|
public boolean getSubsampleVertical()
public void setSubsampleVertical(boolean subsampleVertical)
subsampleVertical
- Whether vertical subsampling should be enabled or not.public int[][] subsample(int[] values, int height, int width)
values
- The input data. Must be height * width in length, and in a row-major arrangement.height
- The height of the input data in rows.width
- The width of the input data, in columns.
public int[][] subsample(int[][] values)
values
- The input data. Must be in a row-major arrangement. Every sub-array (corresponding to the rows)
must be of the same length. The width and height are extracted from the array's dimensions.
private void copyArray(int[][] from, int[][] to)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |