|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.video.RGBToYCbCrConverter
public class RGBToYCbCrConverter
A converter from RGB ro YCbCr colour space.
| Field Summary | |
|---|---|
private double[] |
coefficients
The coefficient table to use for this converter. |
static double[] |
ITU_R_BT_470_2_COEFFICIENTS
If sequence header matrix coefficients value == 5. |
static double[] |
ITU_R_BT_709_COEFFICIENTS
If sequence header matrix coefficients value == 1. |
| Constructor Summary | |
|---|---|
RGBToYCbCrConverter()
Initializes with default coefficients. |
|
RGBToYCbCrConverter(double[] c)
Initializes with given coefficients. |
|
| Method Summary | |
|---|---|
int[] |
convert(int red,
int green,
int blue)
Converts an RGB value to an YCbCr value. |
void |
setCoefficients(double[] coefficients)
Sets the coefficients. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double[] ITU_R_BT_709_COEFFICIENTS
public static final double[] ITU_R_BT_470_2_COEFFICIENTS
private double[] coefficients
| Constructor Detail |
|---|
public RGBToYCbCrConverter()
RGBToYCbCrConverter object and uses
ITU_R_BT_709_COEFFICIENTS as the coefficients for conversion.
public RGBToYCbCrConverter(double[] c)
c - coefficient table to use for conversion.| Method Detail |
|---|
public void setCoefficients(double[] coefficients)
coefficients - array containing the matrix coefficients used in conversion.
public int[] convert(int red,
int green,
int blue)
RGBToYCbCrConverter object.
red - RGB red value (0..255)green - RGB green value (0..255)blue - RGB blue value (0..255)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||